From 1a93f00282389643a7804d513888262a9c0789ca Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Mon, 18 Mar 2019 17:35:36 +0300 Subject: [PATCH 1/2] Remove locales MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1348 Locales have been outdated for some time, while we were planning on updating everything. The docs for each plugin https://uppy.io/docs/drag-drop/#locale and source code are the source of truth right now. The reason the folder is around, is we thought we’ll use some of the old strings to help translate the news ones. Can do that using history, so removing to avoid confusion. --- locales/README.md | 3 --- locales/cs_CZ.js | 63 ----------------------------------------------- locales/de_DE.js | 54 ---------------------------------------- locales/en_US.js | 54 ---------------------------------------- locales/es_ES.js | 54 ---------------------------------------- locales/fi_FI.js | 54 ---------------------------------------- locales/id_ID.js | 54 ---------------------------------------- locales/it_IT.js | 54 ---------------------------------------- locales/nb_NO.js | 54 ---------------------------------------- locales/pl_PL.js | 61 --------------------------------------------- locales/pt_BR.js | 52 -------------------------------------- locales/ru_RU.js | 35 -------------------------- locales/tr_TR.js | 54 ---------------------------------------- locales/zh_CN.js | 34 ------------------------- 14 files changed, 680 deletions(-) delete mode 100644 locales/README.md delete mode 100644 locales/cs_CZ.js delete mode 100644 locales/de_DE.js delete mode 100644 locales/en_US.js delete mode 100644 locales/es_ES.js delete mode 100644 locales/fi_FI.js delete mode 100644 locales/id_ID.js delete mode 100644 locales/it_IT.js delete mode 100644 locales/nb_NO.js delete mode 100644 locales/pl_PL.js delete mode 100644 locales/pt_BR.js delete mode 100644 locales/ru_RU.js delete mode 100644 locales/tr_TR.js delete mode 100644 locales/zh_CN.js diff --git a/locales/README.md b/locales/README.md deleted file mode 100644 index cde462d2b5..0000000000 --- a/locales/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Unused - -These locale files are not currently used by Uppy. We are keeping them around because they will, hopefully, be used in the future. diff --git a/locales/cs_CZ.js b/locales/cs_CZ.js deleted file mode 100644 index 1de0cc8fbb..0000000000 --- a/locales/cs_CZ.js +++ /dev/null @@ -1,63 +0,0 @@ -/* eslint camelcase: 0 */ - -const cs_CZ = {} - -cs_CZ.strings = { - chooseFile: 'Vyberte soubor', - orDragDrop: 'nebo ho sem přetáhněte', - youHaveChosen: 'Vybrali jste: %{fileName}', - filesChosen: { - 0: '%{smart_count} soubor vybrán', - 1: '%{smart_count} soubory vybrány', - 2: '%{smart_count} souborů vybráno' - }, - filesUploaded: { - 0: '%{smart_count} soubor nahrán', - 1: '%{smart_count} soubory nahrány', - 2: '%{smart_count} souborů nahráno' - }, - files: { - 0: '%{smart_count} soubor', - 1: '%{smart_count} soubory', - 2: '%{smart_count} souborů' - }, - uploadFiles: { - 0: 'Nahrát %{smart_count} soubor', - 1: 'Nahrát %{smart_count} soubory', - 2: 'Nahrát %{smart_count} souborů' - }, - selectToUpload: 'Vybrat soubory k nahrání', - closeModal: 'Zavřít okno', - upload: 'Nahrát', - importFrom: 'Importovat soubory z', - dashboardWindowTitle: 'Uppy Dashboard okno (Pro zavření stiskněte Escape)', - dashboardTitle: 'Uppy Dashboard', - copyLinkToClipboardSuccess: 'Odkaz zkopírován do schránky.', - copyLinkToClipboardFallback: 'Zkopírovat následující odkaz', - done: 'Hotovo', - localDisk: 'Disk', - dropPasteImport: 'Přetáhněte soubory, vložte je, importujte je z některých výše uvedených služeb, nebo', - dropPaste: 'Přetáhněte soubory, vložte je, nebo', - browse: 'procházejte', - fileProgress: 'Nahrávání: rychlost nahrávání a zbývající čas', - numberOfSelectedFiles: 'Počet vybraných souborů', - uploadAllNewFiles: 'Nahrát všechny nové soubory' -} - -cs_CZ.pluralize = function (n) { - if (n === 1) { - return 0 - } - - if (n >= 2 && n <= 4) { - return 1 - } - - return 2 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.cs_CZ = cs_CZ -} - -module.exports = cs_CZ diff --git a/locales/de_DE.js b/locales/de_DE.js deleted file mode 100644 index a400ff5789..0000000000 --- a/locales/de_DE.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const de_DE = {} - -de_DE.strings = { - chooseFile: 'Wähle eine Datei', - youHaveChosen: 'Du hast gewählt: %{fileName}', - orDragDrop: 'oder schiebe Sie hier her', - filesChosen: { - 0: '%{smart_count} Datei gewählt', - 1: '%{smart_count} Dateien gewählt' - }, - filesUploaded: { - 0: '%{smart_count} Datei hochgeladen', - 1: '%{smart_count} Dateien hochgeladen' - }, - files: { - 0: '%{smart_count} Datei', - 1: '%{smart_count} Dateien' - }, - uploadFiles: { - 0: 'Upload %{smart_count} Datei', - 1: 'Upload %{smart_count} Dateien' - }, - selectToUpload: 'Ausgewählten Dateien wurden hochgeladen', - closeModal: 'Schließen Modal', - upload: 'Hochladen', - importFrom: 'Importiere Daten von', - dashboardWindowTitle: 'Uppy Dashboard Fenster (Drücke Escape zum schließen)', - dashboardTitle: 'Uppy Dashboard', - copyLinkToClipboardSuccess: 'Link wurde in Zwischenablage kopiert.', - copyLinkToClipboardFallback: 'Kopiere die untere URL', - done: 'Fertig', - localDisk: 'Lokale Festplatte', - dropPasteImport: 'Ziehe Dateien hier her, einfügen, importieren aus einer der oberen Quellen oder', - dropPaste: 'Zihe Dateien hier her, einfügen oder', - browse: 'Durchsuchen', - fileProgress: 'Datei Fortschritt: Upload Geschwindigkeit und ETA', - numberOfSelectedFiles: 'Anzahl gewählter Dateien', - uploadAllNewFiles: 'Alle neuen Dateien hochladen' -} - -de_DE.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.de_DE = de_DE -} - -module.exports = de_DE diff --git a/locales/en_US.js b/locales/en_US.js deleted file mode 100644 index 09bc5c38a2..0000000000 --- a/locales/en_US.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const en_US = {} - -en_US.strings = { - chooseFile: 'Choose a file', - youHaveChosen: 'You have chosen: %{fileName}', - orDragDrop: 'or drag it here', - filesChosen: { - 0: '%{smart_count} file selected', - 1: '%{smart_count} files selected' - }, - filesUploaded: { - 0: '%{smart_count} file uploaded', - 1: '%{smart_count} files uploaded' - }, - files: { - 0: '%{smart_count} file', - 1: '%{smart_count} files' - }, - uploadFiles: { - 0: 'Upload %{smart_count} file', - 1: 'Upload %{smart_count} files' - }, - selectToUpload: 'Select files to upload', - closeModal: 'Close Modal', - upload: 'Upload', - importFrom: 'Import files from', - dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)', - dashboardTitle: 'Uppy Dashboard', - copyLinkToClipboardSuccess: 'Link copied to clipboard.', - copyLinkToClipboardFallback: 'Copy the URL below', - done: 'Done', - localDisk: 'Local Disk', - dropPasteImport: 'Drop files here, paste, import from one of the locations above or', - dropPaste: 'Drop files here, paste or', - browse: 'browse', - fileProgress: 'File progress: upload speed and ETA', - numberOfSelectedFiles: 'Number of selected files', - uploadAllNewFiles: 'Upload all new files' -} - -en_US.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.en_US = en_US -} - -module.exports = en_US diff --git a/locales/es_ES.js b/locales/es_ES.js deleted file mode 100644 index 7868258110..0000000000 --- a/locales/es_ES.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const es_ES = {} - -es_ES.strings = { - chooseFile: 'Selecciona un fichero', - youHaveChosen: 'Has seleccionado: %{fileName}', - orDragDrop: 'o arrástralo aquí', - filesChosen: { - 0: '%{smart_count} fichero seleccionado', - 1: '%{smart_count} ficheros seleccionados' - }, - filesUploaded: { - 0: '%{smart_count} fichero subido', - 1: '%{smart_count} ficheros subidos' - }, - files: { - 0: '%{smart_count} fichero', - 1: '%{smart_count} ficheros' - }, - uploadFiles: { - 0: 'Subir %{smart_count} fichero', - 1: 'Subir %{smart_count} ficheros' - }, - selectToUpload: 'Selecciona los ficheros a subir', - closeModal: 'Cerrar modal', - upload: 'Subir', - importFrom: 'Importar ficheros desde', - dashboardWindowTitle: 'Panel de Uppy (Pulsa escape para cerrar)', - dashboardTitle: 'Panel de Uppy', - copyLinkToClipboardSuccess: 'Enlace copiado al portapapeles.', - copyLinkToClipboardFallback: 'Copiar la siguiente URL', - done: 'Hecho', - localDisk: 'Disco local', - dropPasteImport: 'Arrasta ficheros aquí, pega, importa de alguno de los servicios de arriba o', - dropPaste: 'Arrastra ficheros aquí, pega o', - browse: 'navegar', - fileProgress: 'Progreso: velocidad de subida y tiempo estimado', - numberOfSelectedFiles: 'Número de ficheros seleccionados', - uploadAllNewFiles: 'Subir todos los nuevos ficheros' -} - -es_ES.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.es_ES = es_ES -} - -module.exports = es_ES diff --git a/locales/fi_FI.js b/locales/fi_FI.js deleted file mode 100644 index 30dd26e82e..0000000000 --- a/locales/fi_FI.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const fi_FI = {} - -fi_FI.strings = { - chooseFile: 'Valitse tiedosto', - youHaveChosen: 'Valitsit: %{fileName}', - orDragDrop: 'tai raahaa se tähän', - filesChosen: { - 0: '%{smart_count} tiedosto valittu', - 1: '%{smart_count} tiedostoa valittu' - }, - filesUploaded: { - 0: '%{smart_count} tiedosto siirretty', - 1: '%{smart_count} tiedostoa siirretty' - }, - files: { - 0: '%{smart_count} tiedosto', - 1: '%{smart_count} tiedostoa' - }, - uploadFiles: { - 0: 'Siirrä %{smart_count} tiedosto', - 1: 'Siirrä %{smart_count} tiedostoa' - }, - selectToUpload: 'Valitse siirrettävät tiedostot', - closeModal: 'Sulje ikkuna', - upload: 'Siirrä', - importFrom: 'Tuo tiedostoja', - dashboardWindowTitle: 'Uppy-ohjausnäkymä (Sulje Esc-näppäimellä)', - dashboardTitle: 'Uppy-ohjausnäkymä', - copyLinkToClipboardSuccess: 'Linkki kopioitu leikepöydälle.', - copyLinkToClipboardFallback: 'Kopioi allaoleva linkki', - done: 'Valmis', - localDisk: 'Paikallinen levy', - dropPasteImport: 'Pudota tiedosto(t) tähän, liitä, tuo tiedostoja ylläolevista sijainneista tai', - dropPaste: 'Pudota tiedosto(t) tähän, liitä tai', - browse: 'selaa', - fileProgress: 'Siirron edistyminen: lähetysnopeus ja arvioitu valmistumisaika', - numberOfSelectedFiles: 'Valittujen tiedostojen lukumäärä', - uploadAllNewFiles: 'Siirrä kaikki uudet tiedostot' -} - -fi_FI.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.fi_FI = fi_FI -} - -module.exports = fi_FI diff --git a/locales/id_ID.js b/locales/id_ID.js deleted file mode 100644 index 0cd37712f4..0000000000 --- a/locales/id_ID.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const id_ID = {} - -id_ID.strings = { - chooseFile: 'Pilih berkas', - youHaveChosen: 'Berkas yang dipilih: %{fileName}', - orDragDrop: 'atau tarik dan taruh berkas ke sini', - filesChosen: { - 0: '%{smart_count} berkas dipilih', - 1: '%{smart_count} berkas dipilih' - }, - filesUploaded: { - 0: '%{smart_count} berkas terunggah', - 1: '%{smart_count} berkas terunggah' - }, - files: { - 0: '%{smart_count} berkas', - 1: '%{smart_count} berkas' - }, - uploadFiles: { - 0: 'Unggah %{smart_count} berkas', - 1: 'Unggah %{smart_count} berkas' - }, - selectToUpload: 'Pilih berkas untuk mengunggah', - closeModal: 'Tutup Modal', - upload: 'Unggah', - importFrom: 'Import berkas dari', - dashboardWindowTitle: 'Uppy Beranda Window (Tekan escape untuk menutup)', - dashboardTitle: 'Beranda Uppy', - copyLinkToClipboardSuccess: 'Link tersalin.', - copyLinkToClipboardFallback: 'Salin URL di bawah ini', - done: 'Selesai', - localDisk: 'Penyimpanan Lokal', - dropPasteImport: 'Taruh berkas di sini, tempel, import dari salah satu lokasi di atas atau', - dropPaste: 'Taruh berkas di sini, tempel atau', - browse: 'cari', - fileProgress: 'Proses berkas: kecepatan unggah dan ETA', - numberOfSelectedFiles: 'Total berkas yang di pilih', - uploadAllNewFiles: 'Unggah semua berkas baru' -} - -id_ID.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.id_ID = id_ID -} - -module.exports = id_ID diff --git a/locales/it_IT.js b/locales/it_IT.js deleted file mode 100644 index 73c31f867e..0000000000 --- a/locales/it_IT.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const it_IT = {} - -it_IT.strings = { - chooseFile: 'Seleziona un file', - youHaveChosen: 'Hai scelto: %{fileName}', - orDragDrop: 'oppure trascinalo qui', - filesChosen: { - 0: '%{smart_count} file selezionato', - 1: '%{smart_count} file selezionati' - }, - filesUploaded: { - 0: '%{smart_count} file caricato', - 1: '%{smart_count} file caricati' - }, - files: { - 0: '%{smart_count} file', - 1: '%{smart_count} file' - }, - uploadFiles: { - 0: 'Carica %{smart_count} file', - 1: 'Carica %{smart_count} file' - }, - selectToUpload: 'Seleziona i file da caricare', - closeModal: 'Chiudi la finestra', - upload: 'Carica', - importFrom: 'Importa i file da', - dashboardWindowTitle: 'Uppy Dashboard Window (Premi escape per chiuderla)', - dashboardTitle: 'Uppy Dashboard', - copyLinkToClipboardSuccess: 'Collegamento copiato negli appunti.', - copyLinkToClipboardFallback: 'Copia il seguente indirizzo', - done: 'Fatto', - localDisk: 'Disco locale', - dropPasteImport: 'Trascina i file qui, incolla, importa da uno dei servizi sopra oppure', - dropPaste: 'Trascina i file qui, incolla oppure', - browse: 'sfoglia', - fileProgress: 'Avanzamento del file: velocità di caricamento e tempo rimanente', - numberOfSelectedFiles: 'Numero di file selezionati', - uploadAllNewFiles: 'Carica tutti i nuovi file' -} - -it_IT.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.it_IT = it_IT -} - -module.exports = it_IT diff --git a/locales/nb_NO.js b/locales/nb_NO.js deleted file mode 100644 index 66dea89ff2..0000000000 --- a/locales/nb_NO.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const nb_NO = {} - -nb_NO.strings = { - chooseFile: 'Velg en fil', - youHaveChosen: 'Du har valgt: %{fileName}', - orDragDrop: 'eller slipp den her', - filesChosen: { - 0: '%{smart_count} fil valgt', - 1: '%{smart_count} filer valgt' - }, - filesUploaded: { - 0: '%{smart_count} fil lastet opp', - 1: '%{smart_count} filer lastet opp' - }, - files: { - 0: '%{smart_count} fil', - 1: '%{smart_count} filer' - }, - uploadFiles: { - 0: 'Lastet opp %{smart_count} fil', - 1: 'Lastet opp %{smart_count} filer' - }, - selectToUpload: 'Velg filer å laste opp', - closeModal: 'Lukk dialogboksen', - upload: 'Last opp', - importFrom: 'Importer filer fra', - dashboardWindowTitle: 'Uppy Dashboard-vindu (Trykk escape for å lukke)', - dashboardTitle: 'Uppy Dashboard', - copyLinkToClipboardSuccess: 'Lenken ble kopiert til utklippstavla.', - copyLinkToClipboardFallback: 'Kopier URL-en under', - done: 'Ferdig', - localDisk: 'Lokal disk', - dropPasteImport: 'Du kan slippe eller lime inn filer her, importere fra en en av plasseringene ovenfor eller', - dropPaste: 'Du kan slippe eller lime inn filer her eller', - browse: 'velge dem', - fileProgress: 'Filstatus: Opplastingshastighet og ETA', - numberOfSelectedFiles: 'Antall valgte filer', - uploadAllNewFiles: 'Last opp alle nye filer' -} - -nb_NO.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.nb_NO = nb_NO -} - -module.exports = nb_NO diff --git a/locales/pl_PL.js b/locales/pl_PL.js deleted file mode 100644 index 072d29bafb..0000000000 --- a/locales/pl_PL.js +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint camelcase: 0 */ - -const pl_PL = {} - -pl_PL.strings = { - chooseFile: 'Wybierz plik', - youHaveChosen: 'Wybrałeś: %{fileName}', - orDragDrop: 'lub przeciągnij tutaj', - filesChosen: { - 0: '%{smart_count} wybrany plik', - 1: '%{smart_count} wybrane pliki', - 2: '%{smart_count} wybranych plików' - }, - filesUploaded: { - 0: '%{smart_count} wysłany plik', - 1: '%{smart_count} wysłane pliki', - 2: '%{smart_count} wysłanych plików' - }, - files: { - 0: '%{smart_count} plik', - 1: '%{smart_count} pliki', - 2: '%{smart_count} plików' - }, - uploadFiles: { - 0: 'Wyślij %{smart_count} plik', - 1: 'Wyślij %{smart_count} pliki', - 2: 'Wyślij %{smart_count} plików' - }, - selectToUpload: 'Wybierz pliki do wysłania', - closeModal: 'Zamknij okno', - upload: 'Wyślij', - importFrom: 'Zaimportuj pliki z', - dashboardWindowTitle: 'Okno Uppy Dashboard (Wciśnij esc, aby zamknąć)', - dashboardTitle: 'Uppy Dashboard', - copyLinkToClipboardSuccess: 'Link skopiowany do schowka.', - copyLinkToClipboardFallback: 'Skopiuj poniższy link', - done: 'Gotowe', - localDisk: 'Dysk lokalny', - dropPasteImport: 'Upuść, wklej lub zaimportuj pliki tutaj albo', - dropPaste: 'Upuść lub wklej pliki tutaj albo', - browse: 'przeglądaj', - fileProgress: 'Postęp pliku: prędkość wysyłania i przewidywany pozostały czas', - numberOfSelectedFiles: 'Ilość wybranych plików', - uploadAllNewFiles: 'Wyślij wszystkie nowe pliki' -} - -pl_PL.pluralize = function (n) { - if (n === 1) { - return 0 - } - if (n >= 2 && n <= 4) { - return 1 - } - return 2 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.pl_PL = pl_PL -} - -module.exports = pl_PL diff --git a/locales/pt_BR.js b/locales/pt_BR.js deleted file mode 100644 index 43be669782..0000000000 --- a/locales/pt_BR.js +++ /dev/null @@ -1,52 +0,0 @@ -/* eslint camelcase: 0 */ - -const pt_BR = {} - -pt_BR.strings = { - chooseFile: 'Escolha um arquivo', - youHaveChosen: 'Você escolheu: %{fileName}', - orDragDrop: 'ou arraste-o aqui', - filesChosen: { - 0: '%{smart_count} arquivo selecionado', - 1: '%{smart_count} arquivos selecionados' - }, - filesUploaded: { - 0: '%{smart_count} arquivo enviado', - 1: '%{smart_count} arquivos enviados' - }, - files: { - 0: '%{smart_count} arquivo', - 1: '%{smart_count} arquivos' - }, - uploadFiles: { - 0: 'Enviar %{smart_count} arquivo', - 1: 'Enviar %{smart_count} arquivos' - }, - selectToUpload: 'Selecione arquivos para enviar', - closeModal: 'Fechar Modal', - upload: 'Enviar', - importFrom: 'Importar arquivos de', - dashboardWindowTitle: 'Painel do Uppy (Aperte Esc para fechar)', - dashboardTitle: 'Painel do Uppy', - copyLinkToClipboardSuccess: 'Link copiado para área de transferência.', - copyLinkToClipboardFallback: 'Copie a URL abaixo', - done: 'Finalizado', - localDisk: 'Disco Local', - dropPasteImport: 'Arraste arquivos até aqui, cole-os ou importe de:', - fileProgress: 'Progresso de Arquivo: velocidade de envio e estimativas', - numberOfSelectedFiles: 'Números de arquivos selecionados', - uploadAllNewFiles: 'Enviar todos os arquivos novos' -} - -pt_BR.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.pt_BR = pt_BR -} - -module.exports = pt_BR diff --git a/locales/ru_RU.js b/locales/ru_RU.js deleted file mode 100644 index 9ff817e854..0000000000 --- a/locales/ru_RU.js +++ /dev/null @@ -1,35 +0,0 @@ -/* eslint camelcase: 0 */ - -const ru_RU = {} - -ru_RU.strings = { - chooseFile: 'Выберите файл', - orDragDrop: 'или перенесите его сюда', - youHaveChosen: 'Вы выбрали: %{file_name}', - filesChosen: { - 0: 'Выбран %{smart_count} файл', - 1: 'Выбрано %{smart_count} файла', - 2: 'Выбрано %{smart_count} файлов' - }, - upload: 'Загрузить', - localDisk: 'Диск', - dropPasteImport: 'Перенесите файлы сюда, вставьте из буфера обмена или импортируйте из сервисов выше' -} - -ru_RU.pluralize = function (n) { - if (n % 10 === 1 && n % 100 !== 11) { - return 0 - } - - if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)) { - return 1 - } - - return 2 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.ru_RU = ru_RU -} - -module.exports = ru_RU diff --git a/locales/tr_TR.js b/locales/tr_TR.js deleted file mode 100644 index dac95debac..0000000000 --- a/locales/tr_TR.js +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint camelcase: 0 */ - -const tr_TR = {} - -tr_TR.strings = { - chooseFile: 'Dosya Seçin', - youHaveChosen: 'Seçmiş olduğun dosya: %{fileName}', - orDragDrop: 'yada bırakın', - filesChosen: { - 0: '%{smart_count} adet dosya seçili', - 1: '%{smart_count} adet dosyalar seçili' - }, - filesUploaded: { - 0: '%{smart_count} adet dosya yüklendi', - 1: '%{smart_count} adet dosyalar yüklendi' - }, - files: { - 0: '%{smart_count} dosya', - 1: '%{smart_count} dosyalar' - }, - uploadFiles: { - 0: 'Yüklenen %{smart_count} dosya', - 1: 'Yüklenen %{smart_count} dosyalar' - }, - selectToUpload: 'Yüklemek için dosyaları seçin', - closeModal: 'Pencereyi Kapat', - upload: 'Yükle', - importFrom: 'Dosyaları içeri aktar', - dashboardWindowTitle: 'Uppy Panel Pencerisi (kapatmak için esc kullanın)', - dashboardTitle: 'Uppy Panel', - copyLinkToClipboardSuccess: 'Bağlantı kopyalandı.', - copyLinkToClipboardFallback: 'Bağlantıyı kopyala.', - done: 'Bitti', - localDisk: 'Lokal Dosyalar', - dropPasteImport: 'Dosyaları buraya bırakın, yukarıdaki konumlardan birinden yapıştırın, içeri aktarın veya', - dropPaste: 'Dosyaları buraya bırak, yapıştır veya', - browse: 'Gözat', - fileProgress: 'Dosya ilerlemesi: yükleme hızı ve süresi', - numberOfSelectedFiles: 'Seçilen dosya sayısı', - uploadAllNewFiles: 'Tüm yeni dosyaları yükle' -} - -tr_TR.pluralize = function (n) { - if (n === 1) { - return 0 - } - return 1 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.tr_TR = tr_TR -} - -module.exports = tr_TR diff --git a/locales/zh_CN.js b/locales/zh_CN.js deleted file mode 100644 index b54bcef46e..0000000000 --- a/locales/zh_CN.js +++ /dev/null @@ -1,34 +0,0 @@ -/* eslint camelcase: 0 */ - -const zh_CN = {} - -zh_CN.strings = { - chooseFile: '选择文件', - youHaveChosen: '你已经选择了: %{fileName}', - orDragDrop: '或者拖到这里来', - filesChosen: { - 0: '已选 %{smart_count} 个文件' - }, - filesUploaded: { - 0: '已上传 %{smart_count} 个文件' - }, - files: { - 0: '%{smart_count} 个文件' - }, - uploadFiles: { - 0: '上传 %{smart_count} 个文件' - }, - selectToUpload: '选择文件以上传', - closeModal: '关闭对话框', - upload: '上传' -} - -zh_CN.pluralize = function (n) { - return 0 -} - -if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') { - window.Uppy.locales.zh_CN = zh_CN -} - -module.exports = zh_CN From a0355dbbe8315e2a89786c7cecd8aefa66016ffb Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 19 Mar 2019 14:45:56 +0300 Subject: [PATCH 2/2] use stubs instead of removed locales --- packages/@uppy/utils/src/Translator.test.js | 43 +++++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/packages/@uppy/utils/src/Translator.test.js b/packages/@uppy/utils/src/Translator.test.js index 952c3c96f4..e0c9e07909 100644 --- a/packages/@uppy/utils/src/Translator.test.js +++ b/packages/@uppy/utils/src/Translator.test.js @@ -1,7 +1,44 @@ const Translator = require('./Translator') -// TODO use stubs instead -const russian = require('../../../../locales/ru_RU') -const english = require('../../../../locales/en_US') + +const english = { + strings: { + chooseFile: 'Choose a file', + youHaveChosen: 'You have chosen: %{fileName}', + filesChosen: { + 0: '%{smart_count} file selected', + 1: '%{smart_count} files selected' + }, + pluralize: function (n) { + if (n === 1) { + return 0 + } + return 1 + } + } +} + +const russian = { + strings: { + chooseFile: 'Выберите файл', + youHaveChosen: 'Вы выбрали: %{file_name}', + filesChosen: { + 0: 'Выбран %{smart_count} файл', + 1: 'Выбрано %{smart_count} файла', + 2: 'Выбрано %{smart_count} файлов' + } + }, + pluralize: function (n) { + if (n % 10 === 1 && n % 100 !== 11) { + return 0 + } + + if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)) { + return 1 + } + + return 2 + } +} describe('Translator', () => { describe('translate', () => {