Skip to content

Commit

Permalink
Merge pull request #1467 from transloadit/locale/ru_RU
Browse files Browse the repository at this point in the history
Add Russian language pack (ru_RU)
  • Loading branch information
arturi authored Apr 23, 2019
2 parents 13e237c + 636ca26 commit 6c6531a
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 83 deletions.
5 changes: 4 additions & 1 deletion packages/@uppy/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
}
}

Expand Down Expand Up @@ -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 = {}
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/dashboard/src/components/AddFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
}
Expand Down
3 changes: 2 additions & 1 deletion packages/@uppy/dashboard/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
3 changes: 3 additions & 0 deletions packages/@uppy/locales/src/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
161 changes: 84 additions & 77 deletions packages/@uppy/locales/src/ru_RU.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} файлов'
}
}

Expand Down
9 changes: 7 additions & 2 deletions packages/@uppy/provider-views/src/AuthView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion packages/@uppy/provider-views/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)
}
Expand Down

0 comments on commit 6c6531a

Please sign in to comment.