Selaa lähdekoodia

Merge pull request #1467 from transloadit/locale/ru_RU

Add Russian language pack (ru_RU)
Artur Paikin 6 vuotta sitten
vanhempi
commit
6c6531a30a

+ 4 - 1
packages/@uppy/core/src/index.js

@@ -53,7 +53,9 @@ class Uppy {
         logOut: 'Log out',
         filter: 'Filter',
         resetFilter: 'Reset filter',
-        loading: 'Loading...'
+        loading: 'Loading...',
+        authenticateWithTitle: 'Please authenticate with %{pluginName} to select files',
+        authenticateWith: 'Connect to %{pluginName}'
       }
     }
 
@@ -83,6 +85,7 @@ class Uppy {
     this.translator = new Translator([ this.defaultLocale, this.opts.locale ])
     this.locale = this.translator.locale
     this.i18n = this.translator.translate.bind(this.translator)
+    this.i18nArray = this.translator.translateArray.bind(this.translator)
 
     // Container for different types of plugins
     this.plugins = {}

+ 1 - 1
packages/@uppy/dashboard/src/components/AddFiles.js

@@ -3,7 +3,7 @@ const { localIcon } = require('./icons')
 const { h, Component } = require('preact')
 
 const poweredByUppy = (props) => {
-  return <a tabindex="-1" href="https://uppy.io" rel="noreferrer noopener" target="_blank" class="uppy-Dashboard-poweredBy">Powered by <svg aria-hidden="true" class="UppyIcon uppy-Dashboard-poweredByIcon" width="11" height="11" viewBox="0 0 11 11">
+  return <a tabindex="-1" href="https://uppy.io" rel="noreferrer noopener" target="_blank" class="uppy-Dashboard-poweredBy">{props.i18n('poweredBy')} <svg aria-hidden="true" class="UppyIcon uppy-Dashboard-poweredByIcon" width="11" height="11" viewBox="0 0 11 11">
     <path d="M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z" fill-rule="evenodd" />
   </svg><span class="uppy-Dashboard-poweredByUppy">Uppy</span></a>
 }

+ 2 - 1
packages/@uppy/dashboard/src/index.js

@@ -104,7 +104,8 @@ module.exports = class Dashboard extends Plugin {
           0: 'Added %{smart_count} file from %{folder}',
           1: 'Added %{smart_count} files from %{folder}',
           2: 'Added %{smart_count} files from %{folder}'
-        }
+        },
+        poweredBy: 'Powered by'
       }
     }
 

+ 3 - 0
packages/@uppy/locales/src/en_US.js

@@ -7,6 +7,8 @@ en_US.strings = {
   addingMoreFiles: 'Adding more files',
   allowAccessDescription: 'In order to take pictures or record video with your camera, please allow camera access for this site.',
   allowAccessTitle: 'Please allow access to your camera',
+  authenticateWith: 'Connect to %{pluginName}',
+  authenticateWithTitle: 'Please authenticate with %{pluginName} to select files',
   back: 'Back',
   browse: 'browse',
   cancel: 'Cancel',
@@ -64,6 +66,7 @@ en_US.strings = {
   pause: 'Pause',
   pauseUpload: 'Pause upload',
   paused: 'Paused',
+  poweredBy: 'Powered by',
   preparingUpload: 'Preparing upload...',
   processingXFiles: {
     '0': 'Processing %{smart_count} file',

+ 84 - 77
packages/@uppy/locales/src/ru_RU.js

@@ -3,129 +3,136 @@
 const ru_RU = {}
 
 ru_RU.strings = {
-  addMoreFiles: 'Добавить дополнительные файлы',
+  addMoreFiles: 'Добавить еще файлы',
   addingMoreFiles: 'Добавление дополнительных файлов',
-  allowAccessDescription: 'Чтобы сделать фото или видео с помощью вашей камеры, пожалуйста разрешите доступ к камере для этого сайта',
-  allowAccessTitle: 'Пожалуйста, разрешите доступ к камере',
+  allowAccessDescription: 'Чтобы сделать фото или видео, пожалуйста, разрешите доступ к камере для этого сайта',
+  allowAccessTitle: 'Пожалуйста, разрешите доступ к вашей камере',
+  authenticateWithTitle: 'Пожалуйста, авторизуйтесь в %{pluginName} чтобы выбрать файлы',
+  authenticateWith: 'Подключиться к %{pluginName}',
   back: 'Назад',
   browse: 'выберите',
-  cancel: 'Отмена',
+  cancel: 'Отменить',
   cancelUpload: 'Отменить загрузку',
   chooseFiles: 'Выбрать файлы',
   closeModal: 'Закрыть окно',
   companionAuthError: 'Требуется авторизация',
-  companionError: 'Connection with Companion failed',
+  companionError: 'Не удалось подключиться к Companion',
+  // «Готово» вместо «загрузка завершена», потому что кроме загрузки бывает encoding — транскодирование файлов
   complete: 'Готово',
+  // «Нет подключения к интернету» — «Подключено к интернету»
   connectedToInternet: 'Подключено к интернету',
   copyLink: 'Скопировать ссылку',
-  copyLinkToClipboardFallback: 'Copy the URL below',
+  copyLinkToClipboardFallback: 'Скопируйте ссылку',
   copyLinkToClipboardSuccess: 'Ссылка скопирована в буфер обмена',
-  creatingAssembly: 'Preparing upload...',
-  creatingAssemblyFailed: 'Transloadit: Could not create Assembly',
-  dashboardTitle: 'Uppy Dashboard',
-  dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',
-  dataUploadedOfTotal: '%{complete} of %{total}',
+  creatingAssembly: 'Подготовка загрузки...',
+  creatingAssemblyFailed: 'Transloadit: Не удалось создать Assembly',
+  dashboardTitle: 'Загрузчик файлов',
+  dashboardWindowTitle: 'Окно загрузчика файлов (Нажмите escape, чтобы закрыть)',
+  dataUploadedOfTotal: '%{complete} из %{total}',
   done: 'Готово',
-  dropHereOr: 'Перетащите файлы сюда или %{browse}',
-  dropPaste: 'Drop files here, paste or %{browse}',
-  dropPasteImport: 'Перенесите файлы сюда, вставьте, %{browse} или импортируйте',
+  dropHereOr: 'Перетащите файлы или %{browse}',
+  dropHint: 'Перетащите файлы сюда',
+  dropPaste: 'Перетащите файлы, вставьте или %{browse}',
+  dropPasteImport: 'Перетащите файлы, вставьте, %{browse} или импортируйте',
   edit: 'Редактировать',
   editFile: 'Редактировать файл',
   editing: 'Редактируется %{file}',
-  emptyFolderAdded: 'No files were added from empty folder',
-  encoding: 'Encoding...',
-  enterCorrectUrl: 'Incorrect URL: Please make sure you are entering a direct link to a file',
-  enterUrlToImport: 'Введите адрес URL, чтобы импортировать файл',
-  exceedsSize: 'This file exceeds maximum allowed size of',
-  failedToFetch: 'Companion failed to fetch this URL, please make sure it’s correct',
-  failedToUpload: 'Failed to upload %{file}',
-  fileSource: 'File source: %{name}',
+  emptyFolderAdded: 'Файлы не были добавлены — папка пуста',
+  encoding: 'Обработка...',
+  enterCorrectUrl: 'Неправильный адрес: пожалуйста, убедитесь что вы используете прямую ссылку на файл',
+  enterUrlToImport: 'Введите адрес, чтобы импортировать файл',
+  exceedsSize: 'Этот файл больше максимально разрешенного размера в',
+  failedToFetch: 'Companion не смог загрузить файл по ссылке, пожалуйста, убедитесь, что адрес верный',
+  failedToUpload: 'Ошибка загрузки %{file}',
+  fileSource: 'Источник файла: %{name}',
   filesUploadedOfTotal: {
-    '0': '%{complete} of %{smart_count} file uploaded',
-    '1': '%{complete} of %{smart_count} files uploaded',
-    '2': '%{complete} of %{smart_count} files uploaded'
+    '0': '%{complete} из %{smart_count} файла загружено',
+    '1': '%{complete} из %{smart_count} файлов загружено',
+    '2': '%{complete} из %{smart_count} файлов загружено'
   },
   filter: 'Фильтр',
-  finishEditingFile: 'Finish editing file',
+  finishEditingFile: 'Закончить редактирование файла',
   folderAdded: {
-    '0': 'Added %{smart_count} file from %{folder}',
-    '1': 'Added %{smart_count} files from %{folder}',
-    '2': 'Added %{smart_count} files from %{folder}'
+    '0': 'Добавлен %{smart_count} файл из %{folder}',
+    '1': 'Добавлено %{smart_count} файла из %{folder}',
+    '2': 'Добавлено %{smart_count} файлов из %{folder}'
   },
   import: 'Импортировать',
   importFrom: 'Импортировать из %{name}',
   link: 'Ссылка',
+  loading: 'Загрузка...',
   logOut: 'Выйти',
   myDevice: 'Мое устройство',
-  noFilesFound: 'You have no files or folders here',
+  noFilesFound: 'Здесь нет файлов или папок',
   noInternetConnection: 'Нет подключения к интернету',
   pause: 'Поставить на паузу',
-  pauseUpload: 'Pause upload',
+  pauseUpload: 'Поставить загрузку на паузу',
   paused: 'На паузе',
-  preparingUpload: 'Приготовление к загрузке...',
+  preparingUpload: 'Подготовка к загрузке...',
   processingXFiles: {
-    '0': 'Processing %{smart_count} file',
-    '1': 'Processing %{smart_count} files',
-    '2': 'Processing %{smart_count} files'
+    '0': 'Обрабатывается %{smart_count} файл',
+    '1': 'Обрабатываются %{smart_count} файла',
+    '2': 'Обрабатываются %{smart_count} файлов'
   },
-  removeFile: 'Remove file',
-  resetFilter: 'Reset filter',
-  resume: 'Resume',
-  resumeUpload: 'Resume upload',
-  retry: 'Retry',
-  retryUpload: 'Retry upload',
+  poweredBy: 'Работает на',
+  removeFile: 'Удалить файл',
+  resetFilter: 'Сбросить фильтр',
+  resume: 'Продолжить',
+  resumeUpload: 'Продолжить загрузку',
+  retry: 'Повторить попытку',
+  retryUpload: 'Повторить попытку загрузки',
   saveChanges: 'Сохранить изменения',
   selectXFiles: {
-    '0': 'Select %{smart_count} file',
-    '1': 'Select %{smart_count} files',
-    '2': 'Select %{smart_count} files'
+    '0': 'Выбрать %{smart_count} файл',
+    '1': 'Выбрать %{smart_count} файла',
+    '2': 'Выбрать %{smart_count} файлов'
   },
-  smile: 'Smile!',
-  startRecording: 'Begin video recording',
-  stopRecording: 'Stop video recording',
-  takePicture: 'Take a picture',
-  timedOut: 'Upload stalled for %{seconds} seconds, aborting.',
-  upload: 'Upload',
-  uploadComplete: 'Upload complete',
-  uploadFailed: 'Upload failed',
-  uploadPaused: 'Upload paused',
+  smile: 'Улыбнитесь!',
+  startRecording: 'Начать запись видео',
+  stopRecording: 'Закончить запись видео',
+  takePicture: 'Сделать фотографию',
+  timedOut: 'Загрузка остановилась на %{seconds} секунд, отмена',
+  upload: 'Загрузить',
+  uploadComplete: 'Загрузка завершена',
+  uploadFailed: 'Загрузка не удалась',
+  uploadPaused: 'Загрузка на паузе',
   uploadXFiles: {
-    '0': 'Upload %{smart_count} file',
-    '1': 'Upload %{smart_count} files',
-    '2': 'Upload %{smart_count} files'
+    '0': 'Загрузить %{smart_count} файл',
+    '1': 'Загрузить %{smart_count} файла',
+    '2': 'Загрузить %{smart_count} файлов'
   },
   uploadXNewFiles: {
-    '0': 'Upload +%{smart_count} file',
-    '1': 'Upload +%{smart_count} files',
-    '2': 'Upload +%{smart_count} files'
+    '0': 'Загрузить +%{smart_count} файл',
+    '1': 'Загрузить +%{smart_count} файла',
+    '2': 'Загрузить +%{smart_count} файлов'
   },
-  uploading: 'Uploading',
+  uploading: 'Загрузка',
   uploadingXFiles: {
-    '0': 'Uploading %{smart_count} file',
-    '1': 'Uploading %{smart_count} files',
-    '2': 'Uploading %{smart_count} files'
+    '0': 'Загружается %{smart_count} файл',
+    '1': 'Загружается %{smart_count} файла',
+    '2': 'Загружается %{smart_count} файлов'
   },
   xFilesSelected: {
-    '0': '%{smart_count} file selected',
-    '1': '%{smart_count} files selected',
-    '2': '%{smart_count} files selected'
+    '0': '%{smart_count} файл выбран',
+    '1': '%{smart_count} файла выбрано',
+    '2': '%{smart_count} файлов выбрано'
   },
   xMoreFilesAdded: {
-    '0': '%{smart_count} more file added',
-    '1': '%{smart_count} more files added',
-    '2': '%{smart_count} more files added'
+    '0': '%{smart_count} дополнительный файл добавлен',
+    '1': '%{smart_count} дополнительных файла добавлено',
+    '2': '%{smart_count} дополнительных файлов добавлено'
   },
-  xTimeLeft: '%{time} left',
-  youCanOnlyUploadFileTypes: 'You can only upload: %{types}',
+  xTimeLeft: 'осталось %{time}',
+  youCanOnlyUploadFileTypes: 'Вы можете загрузить только: %{types}',
   youCanOnlyUploadX: {
-    '0': 'You can only upload %{smart_count} file',
-    '1': 'You can only upload %{smart_count} files',
-    '2': 'You can only upload %{smart_count} files'
+    '0': 'Вы можете загрузить только %{smart_count} файл',
+    '1': 'Вы можете загрузить только %{smart_count} файла',
+    '2': 'Вы можете загрузить только %{smart_count} файлов'
   },
   youHaveToAtLeastSelectX: {
-    '0': 'You have to select at least %{smart_count} file',
-    '1': 'You have to select at least %{smart_count} files',
-    '2': 'You have to select at least %{smart_count} files'
+    '0': 'Вы должны выбрать хотя бы %{smart_count} файл',
+    '1': 'Вы должны выбрать хотя бы %{smart_count} файла',
+    '2': 'Вы должны выбрать хотя бы %{smart_count} файлов'
   }
 }
 

+ 7 - 2
packages/@uppy/provider-views/src/AuthView.js

@@ -9,16 +9,21 @@ class AuthBlock extends Component {
   }
 
   render () {
+    const pluginNameComponent = (
+      <span class="uppy-Provider-authTitleName">{this.props.pluginName}<br /></span>
+    )
     return <div class="uppy-Provider-auth">
       <div class="uppy-Provider-authIcon">{this.props.pluginIcon()}</div>
-      <h1 class="uppy-Provider-authTitle">Please authenticate with <span class="uppy-Provider-authTitleName">{this.props.pluginName}</span><br /> to select files</h1>
+      <div class="uppy-Provider-authTitle">
+        {this.props.i18nArray('authenticateWithTitle', { pluginName: pluginNameComponent })}
+      </div>
       <button
         type="button"
         class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn"
         onclick={this.props.handleAuth}
         ref={(el) => { this.connectButton = el }}
       >
-        Connect to {this.props.pluginName}
+        {this.props.i18nArray('authenticateWith', { pluginName: this.props.pluginName })}
       </button>
       {this.props.demo &&
         <button class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn" onclick={this.props.handleDemoAuth}>Proceed with Demo Account</button>

+ 3 - 1
packages/@uppy/provider-views/src/index.js

@@ -536,7 +536,9 @@ module.exports = class ProviderView {
             pluginIcon={this.plugin.icon}
             demo={this.plugin.opts.demo}
             handleAuth={this.handleAuth}
-            handleDemoAuth={this.handleDemoAuth} />
+            handleDemoAuth={this.handleDemoAuth}
+            i18n={this.plugin.uppy.i18n}
+            i18nArray={this.plugin.uppy.i18nArray} />
         </CloseWrapper>
       )
     }