Skip to content

Commit

Permalink
Translations
Browse files Browse the repository at this point in the history
  • Loading branch information
nilov committed Jan 23, 2016
1 parent 1808f79 commit 86b1fc8
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 39 deletions.
31 changes: 31 additions & 0 deletions Resources/translations/messages.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
dropzone:
button_add_file: Add file
mark_for_deletion: Loaded, mark for deletion
modal_title_error_size: Large file size
modal_error_size: File size exceeds the maximum allowed value.
modal_title_error_format: Invalid format
modal_error_format: Invalid file format.
modal_close: Close
loading_error: An error occurred when loading.
files_uploaded: Files were uploaded
browser_not_support_drag_n_drop: "Your browser does not support drag'n drop uploading."
file_size_too_large: File size too large.
wrong_format: You cannot download files in this format.
disable_adblocker: Most likely you have enabled adblocker. Disable it for this site.
cancel_upload: Cancel download
cancel_upload_confirmation: Are you sure you want to cancel the download?
remove_file: Delete a file
max_files_exceeded: You can not upload more files.
drag_or_click_files: Drag files here (or click)
reached_maximum_uploaded_files: You have reached the maximum number of uploaded files.
insert_link: Insert link
image_url: The URL of the image
download: Download
downloading: Downloading
url_must_contain_link_image: The URL must contain a link to an image.
modal_file_delete_confirmation_title: File removal confirmation
modal_file_delete_confirmation_boby: Are you sure you want to delete this file?
delete: Delete
cancel: Cancel
edit: Edit
save: Save
37 changes: 30 additions & 7 deletions Resources/translations/messages.ru.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
dropzone:
button_add_file: Добавить файл
mark_for_deletion: Загруженные, пометить на удаление
modal_title_error_size: Большой размер файла
modal_error_size: Размер Файла превышает максимальное допустимое значение: 4 МБ.
modal_title_error_format: Неверный формат
modal_error_format: Неверный формат файла.
modal_close: Закрыть
button_add_file: Добавить файл
mark_for_deletion: Загруженные, пометить на удаление
modal_title_error_size: Большой размер файла
modal_error_size: Размер Файла превышает максимальное допустимое значение.
modal_title_error_format: Неверный формат
modal_error_format: Неверный формат файла.
modal_close: Закрыть
loading_error: При загрузке произошла ошибка.
files_uploaded: Файлы были загружены
browser_not_support_drag_n_drop: "Ваш браузер не поддерживает drag'n drop загрузку."
file_size_too_large: Размер файла слишком большой.
wrong_format: Вы не можете загружать файлы данного формата.
disable_adblocker: Скорее всего у вас включен блокировщик рекламы. Отключите его для данного сайта.
cancel_upload: Отмена загрузки
cancel_upload_confirmation: Вы действительно хотите отменить загрузку?
remove_file: Удаление файла
max_files_exceeded: Вы не можете загрузить больше файлов.
drag_or_click_files: Перетащите или выберите файлы
reached_maximum_uploaded_files: Достигнуто максимальное количество загруженных файлов.
insert_link: Вставьте ссылку
image_url: URL изображения
download: Закачать
downloading: Загрузка
url_must_contain_link_image: URL должен содержать ссылку на изображение.
modal_file_delete_confirmation_title: Подтверждение удаления файла
modal_file_delete_confirmation_boby: Вы уверены, что хотите удалить этот файл?
delete: Удалить
cancel: Отмена
edit: Редактировать
save: Сохранить
21 changes: 10 additions & 11 deletions Resources/views/Form/fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
display: block;
float: left;
margin-right: 30px;
margin-bottom: 30px;
}
.dz-progress {
Expand Down Expand Up @@ -193,7 +192,7 @@
var message = errorMessage;
if (typeof errorMessage == "string" && errorMessage.length > 200) {
message = 'При загрузке произошла ошибка.';
message = "{{ 'dropzone.loading_error'|trans }}";
this.files.pop();
}
Expand All @@ -214,16 +213,16 @@
return false;
}
},
dictDefaultMessage: "Файлы были загружены",
dictFallbackMessage: "Ваш браузер не поддерживает drag'n'drop загрузку.",
dictFileTooBig: "Размер файла слишком большой.",
dictInvalidFileType: "Вы не можете загружать файлы данного формата.",
dictResponseError: "Скорее всего у вас включен блокировщик рекламы. Отключите его для данного сайта.",
dictCancelUpload: "Отмена загрузки",
dictCancelUploadConfirmation: "Вы действительно хотите отменить загрузку?",
dictRemoveFile: "Удаление файла",
dictDefaultMessage: "{{ 'dropzone.files_uploaded'|trans }}",
dictFallbackMessage: "{{ 'dropzone.browser_not_support_drag_n_drop'|trans }}",
dictFileTooBig: "{{ 'dropzone.file_size_too_large'|trans }}",
dictInvalidFileType: "{{ 'dropzone.wrong_format'|trans }}",
dictResponseError: "{{ 'dropzone.disable_adblocker'|trans }}",
dictCancelUpload: "{{ 'dropzone.cancel_upload'|trans }}",
dictCancelUploadConfirmation: "{{ 'dropzone.cancel_upload_confirmation'|trans }}",
dictRemoveFile: "{{ 'dropzone.remove_file'|trans }}",
dictRemoveFileConfirmation: null,
dictMaxFilesExceeded: "Вы не можете загрузить больше файлов.",
dictMaxFilesExceeded: "{{ 'dropzone.max_files_exceeded'|trans }}"
});
{% for media in files %}
Expand Down
4 changes: 2 additions & 2 deletions Resources/views/Form/view-form.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="dz-clickable dz-message clearfix js-file-upload {% if countFiles >= maxFiles %} js-file-upload-hide {% endif %}" id="file-upload">
Перетащите или выберите файлы
{{ 'dropzone.drag_or_click_files'|trans }}
</div>
<div class="js-reached-limit-message {% if countFiles < maxFiles %}js-file-upload-hide{% endif %}">
Достигнуто максимальное количество загруженных файлов.
{{ 'dropzone.reached_maximum_uploaded_files'|trans }}
</div>
10 changes: 5 additions & 5 deletions Resources/views/Form/view-link.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<div class="uploader-link" id="uploader-link">
<div class="uploader-link__label">
<div class="uploader-link-label">
URL изображения
{{ 'dropzone.image_url'|trans }}
</div>
</div>
<div class="uploader-link__control">
<input onblur="uploaderUploadLinkBlur()" type="text" class="js-uploader-link-control form-control uploader-link-control" placeholder="Вставьте ссылку" name="uploadlink"/>
<span class="js-uploadlink-button hidden" >Закачать</span>
<input onblur="uploaderUploadLinkBlur()" type="text" class="js-uploader-link-control form-control uploader-link-control" placeholder="{{ 'dropzone.insert_link'|trans }}" name="uploadlink"/>
<span class="js-uploadlink-button hidden">{{ 'dropzone.download'|trans }}</span>
</div>
<div class="js-uploader-link-load uploader-link__load hidden">
<span>Загрузка.</span>
<span>{{ 'dropzone.downloading'|trans }}.</span>
</div>
<div class="js-uploader-link-error uploader-link__error hidden">
<span class="uploader-link-error">URL должен содержать ссылку на изображение.</span>
<span class="uploader-link-error">{{ 'dropzone.url_must_contain_link_image'|trans }}</span>
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion Resources/views/Form/view-modal-error-default.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<p id="modalRemoveDefaultBodyLabel"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans %}dropzone.modal_close{% endtrans %}</button>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'dropzone.modal_close'|trans }}</button>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions Resources/views/Form/view-modal-error-format.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="modalRemoveFileLabel">{% trans %}modal_title_error_format{% endtrans %}</h4>
<h4 class="modal-title" id="modalRemoveFileLabel">{{ 'dropzone.modal_title_error_format'|trans }}</h4>
</div>
<div class="modal-body">
<p>{% trans %}modal_error_format{% endtrans %}</p>
<p>{{ 'dropzone.modal_error_format'|trans }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'dropzone.modal_close'|trans }}</button>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions Resources/views/Form/view-modal-error.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="modalRemoveFileLabel">{% trans %}dropzone.modal_title_error_size{% endtrans %}</h4>
<h4 class="modal-title" id="modalRemoveFileLabel">{{ 'dropzone.modal_title_error_size'|trans }}</h4>
</div>
<div class="modal-body">
<p>{% trans %}dropzone.modal_error_size{% endtrans %}</p>
<p>{{ 'dropzone.modal_error_size'|trans }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans %}dropzone.modal_close{% endtrans %}</button>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'dropzone.modal_close'|trans }}</button>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions Resources/views/Form/view-modal-remove.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
{# MODAL:HEADER #}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="modalRemoveFileLabel">Подтверждение удаления файла</h4>
<h4 class="modal-title" id="modalRemoveFileLabel">{{ 'dropzone.modal_file_delete_confirmation_title'|trans }}</h4>
</div>
{# //MODAL:HEADER #}

{# MODAL:BODY #}
<div class="modal-body">
Вы уверены, что хотите удалить этот файл?
{{ 'dropzone.modal_file_delete_confirmation_boby'|trans }}
</div>
{# MODAL:BODY #}

{# MODAL:FOOTER #}
<div class="modal-footer">
<button type="button" class="btn btn-success do-remove-file" data-file-id="0">Удалить</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
<button type="button" class="btn btn-success do-remove-file" data-file-id="0">{{ 'dropzone.delete'|trans }}</button>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'dropzone.cancel'|trans }}</button>
</div>
{# MODAL:FOOTER #}

Expand Down
6 changes: 3 additions & 3 deletions Resources/views/Form/view-modal-rename.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{# MODAL:HEADER #}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="modalRenameFileLabel">Редактировать</h4>
<h4 class="modal-title" id="modalRenameFileLabel">{{ 'edit'|trans }}</h4>
</div>
{# //MODAL:HEADER #}

Expand All @@ -31,8 +31,8 @@

{# MODAL:FOOTER #}
<div class="modal-footer">
<button type="button" class="btn btn-success do-rename-file" data-file-id="0">Сохранить</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
<button type="button" class="btn btn-success do-rename-file" data-file-id="0">{{ 'dropzone.save'|trans }}</button>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'dropzone.cancel'|trans }}</button>
</div>
{# MODAL:FOOTER #}

Expand Down

0 comments on commit 86b1fc8

Please sign in to comment.