Skip to content

Commit

Permalink
move some hard coded texts to lang file
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgurkaragoz authored and ifox committed Jun 8, 2021
1 parent f137b21 commit 2053480
Show file tree
Hide file tree
Showing 32 changed files with 337 additions and 166 deletions.
1 change: 1 addition & 0 deletions dist/assets/admin/css/chunk-common.b7821042.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/admin/css/chunk-common.fec10329.css

This file was deleted.

2 changes: 1 addition & 1 deletion dist/assets/admin/css/main-buckets.b3760912.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/assets/admin/css/main-dashboard.7e178125.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/admin/css/main-form.34549069.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/admin/css/main-form.d15c3c53.css

This file was deleted.

1 change: 1 addition & 0 deletions dist/assets/admin/css/main-listing.32e2c205.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/admin/css/main-listing.66c1fdf3.css

This file was deleted.

1 change: 1 addition & 0 deletions dist/assets/admin/js/chunk-common.cc6b8da8.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/admin/js/chunk-common.f7f117f9.js

This file was deleted.

99 changes: 0 additions & 99 deletions dist/assets/admin/js/chunk-vendors.750de529.js

This file was deleted.

100 changes: 100 additions & 0 deletions dist/assets/admin/js/chunk-vendors.f65f36f0.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/admin/js/main-buckets.38d7b5bc.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/assets/admin/js/main-buckets.7244e4c4.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/admin/js/main-form.196dbf07.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/assets/admin/js/main-form.8aebb83a.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/assets/admin/js/main-listing.0d462895.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/admin/js/main-listing.54a3c8e0.js

This file was deleted.

20 changes: 10 additions & 10 deletions dist/assets/admin/twill-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
"Inter-MediumItalic.woff2": "/assets/admin/fonts/Inter-MediumItalic.7a7fd735.woff2",
"Inter-Regular.woff": "/assets/admin/fonts/Inter-Regular.aebfbb3c.woff",
"Inter-Regular.woff2": "/assets/admin/fonts/Inter-Regular.bffaed79.woff2",
"chunk-common.css": "/assets/admin/css/chunk-common.fec10329.css",
"chunk-common.js": "/assets/admin/js/chunk-common.f7f117f9.js",
"chunk-common.css": "/assets/admin/css/chunk-common.b7821042.css",
"chunk-common.js": "/assets/admin/js/chunk-common.cc6b8da8.js",
"chunk-vendors.css": "/assets/admin/css/chunk-vendors.e0f3ef32.css",
"chunk-vendors.js": "/assets/admin/js/chunk-vendors.750de529.js",
"chunk-vendors.js": "/assets/admin/js/chunk-vendors.f65f36f0.js",
"icons-files.svg": "/assets/admin/icons/icons-files.3cdbddfb2725088d.svg",
"icons-wysiwyg.svg": "/assets/admin/icons/icons-wysiwyg.63f0e2d625dc615e.svg",
"icons.svg": "/assets/admin/icons/icons.0ee79e71b68bc72f.svg",
"main-buckets.css": "/assets/admin/css/main-buckets.b3760912.css",
"main-buckets.js": "/assets/admin/js/main-buckets.38d7b5bc.js",
"main-buckets.js": "/assets/admin/js/main-buckets.7244e4c4.js",
"main-dashboard.css": "/assets/admin/css/main-dashboard.7e178125.css",
"main-dashboard.js": "/assets/admin/js/main-dashboard.258f0385.js",
"main-form.css": "/assets/admin/css/main-form.d15c3c53.css",
"main-form.js": "/assets/admin/js/main-form.196dbf07.js",
"main-free.js": "/assets/admin/js/main-free.75070804.js",
"main-listing.css": "/assets/admin/css/main-listing.66c1fdf3.css",
"main-listing.js": "/assets/admin/js/main-listing.54a3c8e0.js"
"main-dashboard.js": "/assets/admin/js/main-dashboard.9396d91b.js",
"main-form.css": "/assets/admin/css/main-form.34549069.css",
"main-form.js": "/assets/admin/js/main-form.8aebb83a.js",
"main-free.js": "/assets/admin/js/main-free.94ff6746.js",
"main-listing.css": "/assets/admin/css/main-listing.32e2c205.css",
"main-listing.js": "/assets/admin/js/main-listing.0d462895.js"
}
6 changes: 3 additions & 3 deletions frontend/js/components/MediaField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@

<!-- Metadatas options -->
<div class="media__metadatas--options" :class="{ 's--active' : metadatas.active }" v-if="hasMedia && withAddInfo">
<a17-mediametadata :name='metadataName' label="Alt Text" id="altText" :media="media" :maxlength="altTextMaxLength" @change="updateMetadata"/>
<a17-mediametadata v-if="withCaption" :name='metadataName' label="Caption" id="caption" :media="media" :maxlength="captionMaxLength" @change="updateMetadata"/>
<a17-mediametadata v-if="withVideoUrl" :name='metadataName' label="Video URL (optional)" id="video" :media="media" @change="updateMetadata"/>
<a17-mediametadata :name='metadataName' :label="$trans('fields.medias.alt-text', 'Alt Text')" id="altText" :media="media" :maxlength="altTextMaxLength" @change="updateMetadata"/>
<a17-mediametadata v-if="withCaption" :name='metadataName' :label="$trans('fields.medias.caption', 'Caption')" id="caption" :media="media" :maxlength="captionMaxLength" @change="updateMetadata"/>
<a17-mediametadata v-if="withVideoUrl" :name='metadataName' :label="$trans('fields.medias.video-url', 'Video URL (optional)')" id="video" :media="media" @change="updateMetadata"/>
<template v-for="field in extraMetadatas">
<a17-mediametadata v-if="extraMetadatas.length > 0"
:key="field.name"
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
</a>
</li>
<li class="search__no-result" v-show="loading">
Loading…
{{ $trans('dashboard.search.loading', 'Loading…') }}
</li>
<li class="search__no-result" v-show="readyToShowResult && !searchResults.length && !loading">
No results found.
{{ $trans('dashboard.search.no-result', 'No results found.') }}
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/editor/EditorPreview.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="editorPreview" :editorPreviewClass="editorPreviewClass" @mousedown="unselectBlock">
<div class="editorPreview__empty" v-if="!blocks.length">
<b>Drag and drop content from the left navigation</b>
<b>{{ $trans('previewer.drag-and-drop', 'Drag and drop content from the left navigation') }}</b>
</div>
<draggable class="editorPreview__content" v-model="blocks" :options="{ group: 'editorBlocks', handle: handle }" @add="onAdd" @update="onUpdate">
<div class="editorPreview__item" :class="{ 'editorPreview__item--active' : isBlockActive(block.id), 'editorPreview__item--hover' : activeItem === index }" v-for="(block, index) in blocks" :ref="block.id" :key="block.id" @mousedown.stop >
Expand Down
13 changes: 11 additions & 2 deletions frontend/js/components/media-library/MediaLibrary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,17 @@
return this.modalTitlePrefix
},
btnLabel: function () {
if (this.indexToReplace > -1) return this.btnLabelUpdate + ' ' + this.type
return (this.selectedMedias.length > 1 ? this.btnLabelMulti + ' ' + this.type + 's' : this.btnLabelSingle + ' ' + this.type)
let type = this.$trans('media-library.types.single.' + this.type, this.type)
if (this.indexToReplace > -1) {
return this.btnLabelUpdate + ' ' + type
} else {
if (this.selectedMedias.length > 1) {
type = this.$trans('media-library.types.multiple.' + this.type, this.type)
}
return this.btnLabelSingle + ' ' + type
}
},
usedMedias: function () {
return this.selected[this.connector] || []
Expand Down
19 changes: 15 additions & 4 deletions frontend/js/components/media-library/MediaSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<a17-vselect v-if="!fieldsRemovedFromBulkEditing.includes('tags')" :label="$trans('media-library.sidebar.tags')"
:key="firstMedia.id + '-' + medias.length" name="tags" :multiple="true"
:selected="hasMultipleMedias ? sharedTags : firstMedia.tags" :searchable="true"
emptyText="Sorry, no tags found." :taggable="true" :pushTags="true" size="small"
:emptyText="$trans('media-library.no-tags-found', 'Sorry, no tags found.')" :taggable="true" :pushTags="true" size="small"
:endpoint="type.tagsEndpoint" @change="save" maxHeight="175px"/>
<span
v-if="extraMetadatas.length && isImage && hasMultipleMedias && !fieldsRemovedFromBulkEditing.includes('tags')"
Expand Down Expand Up @@ -108,7 +108,7 @@
</template>

<a17-modal class="modal--tiny modal--form modal--withintro" ref="warningDelete" title="Warning Delete">
<p class="modal--tiny-title"><strong>Are you sure ?</strong></p>
<p class="modal--tiny-title"><strong>{{ $trans('media-library.dialogs.delete.title', 'Are you sure ?') }}</strong></p>
<p>{{ warningDeleteMessage }}</p>
<a17-inputframe>
<a17-button variant="validate" @click="deleteSelectedMedias">Delete ({{ mediasIdsToDelete.length }})
Expand Down Expand Up @@ -230,8 +230,19 @@
}))
},
warningDeleteMessage: function () {
const prefix = this.hasMultipleMedias ? this.allowDelete ? 'Some files are' : 'This files are' : 'This file is'
return this.allowDelete ? prefix + ' used and can\'t be deleted. Do you want to delete the others ?' : prefix + ' used and can\'t be deleted.'
if (this.allowDelete) {
if (this.hasMultipleMedias) {
return this.$trans('media-library.dialogs.delete.allow-delete-multiple-medias', 'Some files are used and can\'t be deleted. Do you want to delete the others ?')
} else {
return this.$trans('media-library.dialogs.delete.allow-delete-one-media', 'This file is used and can\'t be deleted. Do you want to delete the others ?')
}
} else {
if (this.hasMultipleMedias) {
return this.$trans('media-library.dialogs.delete.dont-allow-delete-multiple-medias', 'This files are used and can\'t be deleted.')
} else {
return this.$trans('media-library.dialogs.delete.dont-allow-delete-one-media', 'This file is used and can\'t be deleted.')
}
}
},
containerClasses: function () {
return {
Expand Down
4 changes: 3 additions & 1 deletion frontend/js/components/table/BulkEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<div class="bulkEditor">
<div class="bulkEditor__inner" v-if="bulkIds.length">
<div class="container">
<p class="bulkEditor__infos">{{ bulkIds.length }} item{{ bulkIds.length > 1 ? 's' : '' }} selected</p>
<p class="bulkEditor__infos">
{{ bulkIds.length }} {{ bulkIds.length > 1 ? $trans('listing.bulk-selected-items') : $trans('listing.bulk-selected-item') }}
</p>
<div class="bulkEditor__dropdown">
<a17-dropdown ref="bulkActionsDown" position="bottom-left" width="full" :offset="0">
<a17-button variant="dropdown" size="small" @click="$refs.bulkActionsDown.toggle()">{{ $trans('listing.bulk-actions') }}</a17-button>
Expand Down
88 changes: 88 additions & 0 deletions lang/en/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
'my-drafts' => 'My drafts',
'search-placeholder' => 'Search everything...',
'statitics' => 'Statistics',
'search' => [
'loading' => 'Loading…',
'no-result' => 'No results found.',
'last-edit' => 'Last edited',
],
'activities' => [
'created' => 'Created',
'updated' => 'Updated',
Expand Down Expand Up @@ -110,6 +115,9 @@
'edit-close' => 'Close info',
'edit-info' => 'Edit info',
'original-dimensions' => 'Original',
'alt-text' => 'Alt Text',
'caption' => 'Caption',
'video-url' => 'Video URL (optional)',
],
],
'filter' => [
Expand Down Expand Up @@ -143,6 +151,8 @@
'add-new-button' => 'Add new',
'bulk-actions' => 'Bulk actions',
'bulk-clear' => 'Clear',
'bulk-selected-item' => 'item selected',
'bulk-selected-items' => 'items selected',
'columns' => [
'featured' => 'Featured',
'name' => 'Name',
Expand Down Expand Up @@ -187,6 +197,53 @@
'paginate' => [
'rows-per-page' => 'Rows per page:',
],
'reorder' => [
'success' => ':modelTitle order changed!',
'error' => ':modelTitle order was not changed. Something wrong happened!',
],
'restore' => [
'success' => ':modelTitle restored!',
'error' => ':modelTitle was not restored. Something wrong happened!',
],
'bulk-restore' => [
'success' => ':modelTitle items restored!',
'error' => ':modelTitle items were not restored. Something wrong happened!',
],
'force-delete' => [
'success' => ':modelTitle destroyed!',
'error' => ':modelTitle was not destroyed. Something wrong happened!',
],
'bulk-force-delete' => [
'success' => ':modelTitle items destroyed!',
'error' => ':modelTitle items were not destroyed. Something wrong happened!',
],
'delete' => [
'success' => ':modelTitle moved to trash!',
'error' => ':modelTitle was not moved to trash. Something wrong happened!',
],
'bulk-delete' => [
'success' => ':modelTitle items moved to trash!',
'error' => ':modelTitle items were not moved to trash. Something wrong happened!',
],
'duplicate' => [
'success' => ':modelTitle duplicated with Success!',
'error' => ':modelTitle was not duplicated. Something wrong happened!',
],
'publish' => [
'unpublished' => ':modelTitle unpublished!',
'published' => ':modelTitle published!',
'error' => ':modelTitle was not published. Something wrong happened!',
],
'featured' => [
'unfeatured' => ':modelTitle unfeatured!',
'featured' => ':modelTitle featured!',
'error' => ':modelTitle was not featured. Something wrong happened!',
],
'bulk-featured' => [
'unfeatured' => ':modelTitle items unfeatured!',
'featured' => ':modelTitle items featured!',
'error' => ':modelTitle items were not featured. Something wrong happened!',
],
],
'main' => [
'create' => 'Create',
Expand All @@ -212,6 +269,36 @@
'title' => 'Media Library',
'update' => 'Update',
'unused-filter-label' => 'Show unused only',
'no-tags-found' => 'Sorry, no tags found.',
'dialogs' => [
'delete' => [
'delete-media-title' => 'Delete media',
'delete-media-desc' => 'Are you sure ?<br />This change can\'t be undone.',
'delete-media-confirm' => 'Delete',
'title' => 'Are you sure ?',
'allow-delete-multiple-medias' => 'Some files are used and can\'t be deleted. Do you want to delete the others ?',
'allow-delete-one-media' => 'This file is used and can\'t be deleted. Do you want to delete the others ?',
'dont-allow-delete-multiple-medias' => 'This files are used and can\'t be deleted.',
'dont-allow-delete-one-media' => 'This file is used and can\'t be deleted.',
],
'replace' => [
'replace-media-title' => 'Replace media',
'replace-media-desc' => 'Are you sure ?<br />This change can\'t be undone.',
'replace-media-confirm' => 'Replace',
],
],
'types' => [
'single' => [
'image' => 'image',
'video' => 'video',
'file' => 'file',
],
'multiple' => [
'image' => 'images',
'video' => 'videos',
'file' => 'files',
],
],
],
'modal' => [
'create' => [
Expand Down Expand Up @@ -269,6 +356,7 @@
'single-view' => 'Single view',
'title' => 'Preview changes',
'unsaved' => 'Previewing with your unsaved changes',
'drag-and-drop' => 'Drag and drop content from the left navigation',
],
'publisher' => [
'cancel' => 'Cancel',
Expand Down
Loading

0 comments on commit 2053480

Please sign in to comment.