From b97971967f1e9af8746eff8ef25df3636d681054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thierry=20Fran=C3=A7ois?= Date: Wed, 28 Feb 2018 21:26:30 +0200 Subject: [PATCH] FIX js lang template and i18n js requirements path --- client/lang/cs.js | 2 +- client/lang/de.js | 2 +- client/lang/en.js | 2 +- client/lang/fi.js | 2 +- client/lang/fr.js | 2 +- client/lang/it.js | 2 +- client/lang/nl.js | 2 +- client/lang/pl.js | 2 +- client/lang/ru.js | 2 +- client/lang/sk.js | 2 +- src/BulkManager/BulkManager.php | 2 +- src/BulkUploader/BulkUploader.php | 2 +- transifex.js | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/lang/cs.js b/client/lang/cs.js index 44efd1a..20b9b13 100644 --- a/client/lang/cs.js +++ b/client/lang/cs.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(cs, { + ss.i18n.addDictionary('cs', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Musíte vybrat alespoň jednu položku.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "Data budou nenávratně ztracena. Opravdu chcete pokračovat?" diff --git a/client/lang/de.js b/client/lang/de.js index 4a4ec35..d17d882 100644 --- a/client/lang/de.js +++ b/client/lang/de.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(de, { + ss.i18n.addDictionary('de', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Übertrage %s Datei(en). %s erfolgreich übertragen. %s Fehler.", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Sie müssen mindestens ein Element auswählen.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "Wollen Sie dieses Element wirklich unwiderruflich löschen?" diff --git a/client/lang/en.js b/client/lang/en.js index dcafa17..50fc25a 100644 --- a/client/lang/en.js +++ b/client/lang/en.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(en, { + ss.i18n.addDictionary('en', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "You must select at least one record.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "The data will be lost permanently. Do you want to continue?" diff --git a/client/lang/fi.js b/client/lang/fi.js index 3f2b2d7..ffbaaee 100644 --- a/client/lang/fi.js +++ b/client/lang/fi.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(fi, { + ss.i18n.addDictionary('fi', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Lataa %s tiedosto(ja). %s Valmis. %s virhe(itä).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Sinun täytyy valita vähintään yksi tallenne. ", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "Tiedostosi häviävät pysyvästi. Haluatko jatkaa?" diff --git a/client/lang/fr.js b/client/lang/fr.js index 12094ad..cbf4c97 100644 --- a/client/lang/fr.js +++ b/client/lang/fr.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(fr, { + ss.i18n.addDictionary('fr', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "%s fichier(s) en transfert. %s terminer. %s erreur(s).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Vous devez sélectionner au moins une entrée.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "Les données serons perdu définitivement. Voulez vous continuer?" diff --git a/client/lang/it.js b/client/lang/it.js index bcb00eb..80d5951 100644 --- a/client/lang/it.js +++ b/client/lang/it.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(it, { + ss.i18n.addDictionary('it', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Caricamento del/dei file(s) %s. %s completato. %s errore(i).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Devi selezionare almeno una voce.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "I dati saranno persi per sempre. Vuoi continuare?" diff --git a/client/lang/nl.js b/client/lang/nl.js index d2bfd3f..136f9e9 100644 --- a/client/lang/nl.js +++ b/client/lang/nl.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(nl, { + ss.i18n.addDictionary('nl', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "U moet minstens een item te selecteren.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "De gegevens zullen permanent verloren. Weet je zeker dat je de pagina wilt verlaten?" diff --git a/client/lang/pl.js b/client/lang/pl.js index f4474b5..1b0e56c 100644 --- a/client/lang/pl.js +++ b/client/lang/pl.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(pl, { + ss.i18n.addDictionary('pl', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Wgrywanie %s plików. Ukończono %s. %s błędów.", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Musisz wybrać przynajmniej jedną pozycję.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "Dane zostaną bezpowrotnie usunięte. Czy chcesz kontynuować?" diff --git a/client/lang/ru.js b/client/lang/ru.js index e3e7e1a..fd4a280 100644 --- a/client/lang/ru.js +++ b/client/lang/ru.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(ru, { + ss.i18n.addDictionary('ru', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Загружается %s файл(ов). %s завершено. %s ошибка(и).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Вы должны выбрать как минимум одну запись.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "Ваши данные будут безвозвратно удалены. Вы хотите продолжить?" diff --git a/client/lang/sk.js b/client/lang/sk.js index 58736c3..1d6bf1c 100644 --- a/client/lang/sk.js +++ b/client/lang/sk.js @@ -1,7 +1,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(sk, { + ss.i18n.addDictionary('sk', { "GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Nahrávam %s súbor(y/ov). %s hotovo. %s chyb(a/y).", "GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "Musíte vybrať aspoň jednu položku.", "GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "Dáta budú nenávratne stratené. Chcete pokračovať?" diff --git a/src/BulkManager/BulkManager.php b/src/BulkManager/BulkManager.php index f77c416..bca9259 100644 --- a/src/BulkManager/BulkManager.php +++ b/src/BulkManager/BulkManager.php @@ -257,7 +257,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G { Requirements::javascript('colymba/gridfield-bulk-editing-tools:client/dist/js/bulkTools.js'); Requirements::css('colymba/gridfield-bulk-editing-tools:client/dist/styles/bulkTools.css'); - Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:lang'); + Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:client/lang'); if (!count($this->config['actions'])) { user_error('Trying to use BulkManager without any bulk action.', E_USER_ERROR); diff --git a/src/BulkUploader/BulkUploader.php b/src/BulkUploader/BulkUploader.php index 51f86a9..3d51ef9 100644 --- a/src/BulkUploader/BulkUploader.php +++ b/src/BulkUploader/BulkUploader.php @@ -380,7 +380,7 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler Requirements::javascript('colymba/gridfield-bulk-editing-tools:client/dist/js/bulkTools.js'); Requirements::css('colymba/gridfield-bulk-editing-tools:client/dist/styles/bulkTools.css'); - Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:lang'); + Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:client/lang'); return array( 'before' => $data->renderWith('Colymba\\BulkUpload\\BulkUploader'), diff --git a/transifex.js b/transifex.js index 6e97a23..ab49d30 100644 --- a/transifex.js +++ b/transifex.js @@ -22,7 +22,7 @@ fs.readdir(PATHS.SRC, function(err, files) var fileData = `if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { - ss.i18n.addDictionary(${lang}, ${data}); + ss.i18n.addDictionary('${lang}', ${data}); }`; fs.writeFile(PATHS.DIST + '/' + lang + '.js', fileData, "utf8", function(err) {