Restructure language files
This commit is contained in:
@@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if(!this.project.editable) {
|
||||
this.logs = [this.lang.get('upload_mode_archived', [this.project.name])];
|
||||
this.logs = [this.lang.get('upload.mode_archived', [this.project.name])];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
const uploadedFiles = response?.body?.files || [];
|
||||
uploadedFiles.forEach((uploadedFile) => {
|
||||
const hasError = Object.prototype.hasOwnProperty.call(uploadedFile, 'error');
|
||||
this.logs.push(hasError ? uploadedFile.error : this.lang.get('upload_success', [uploadedFile.name]));
|
||||
this.logs.push(hasError ? uploadedFile.error : this.lang.get('upload.success', [uploadedFile.name]));
|
||||
if(!hasError) this.files.push({...uploadedFile, content: ''});
|
||||
});
|
||||
});
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
id: oFile.id,
|
||||
content: oFile.content
|
||||
})
|
||||
.then((asData) => {this.logs.push(this.lang.get('media_comment_update', asData.filename));})
|
||||
.then((asData) => {this.logs.push(this.lang.get('media.comment_update', asData.filename));})
|
||||
.catch((sMsgId) => {this.logs.push(this.lang.get(sMsgId));});
|
||||
},
|
||||
addPosition() {
|
||||
@@ -118,8 +118,8 @@ export default {
|
||||
</script>
|
||||
<template>
|
||||
<div id="upload">
|
||||
<a name="back" class="button" href="#project"><SpotIcon :icon="'back'" :text="lang.get('nav_back')" /></a>
|
||||
<h1>{{ lang.get('upload_media_title') }}</h1>
|
||||
<a name="back" class="button" href="#project"><SpotIcon :icon="'back'" :text="lang.get('action.back')" /></a>
|
||||
<h1>{{ lang.get('upload.media.title') }}</h1>
|
||||
<h2>{{ this.project.name }}</h2>
|
||||
<div class="section" v-if="project.editable">
|
||||
<input id="fileupload" type="file" name="files[]" multiple accept=".gif,.jpg,.jpeg,.png,.mov,.mp4" @change="onFileChange" />
|
||||
@@ -132,12 +132,12 @@ export default {
|
||||
<div class="form">
|
||||
<input class="content" name="content" type="text" v-model="file.content" />
|
||||
<input class="id" name="id" type="hidden" :value="file.id" />
|
||||
<SpotButton :classes="'save'" :icon="'save'" :text="lang.get('save')" @click="addComment(file)" />
|
||||
<SpotButton :classes="'save'" :icon="'save'" :text="lang.get('action.save')" @click="addComment(file)" />
|
||||
</div>
|
||||
</div>
|
||||
<h1>{{ lang.get('upload_pos_title') }}</h1>
|
||||
<h1>{{ lang.get('upload.position.title') }}</h1>
|
||||
<div class="section location">
|
||||
<SpotButton :icon="'message'" :text="lang.get('new_position')" @click="addPosition()" />
|
||||
<SpotButton :icon="'message'" :text="lang.get('upload.position.new')" @click="addPosition()" />
|
||||
</div>
|
||||
<div class="section logs" v-if="logs.length > 0">
|
||||
<p class="log" v-for="log in logs">{{ log }}.</p>
|
||||
|
||||
Reference in New Issue
Block a user