From 3f118ef08f2c09af3665359da74db2ce47977bf2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 3 Aug 2013 20:18:28 +0200 Subject: [PATCH] Translations: Switch to Transifex format - Based on new (last) translation download from getlocalization.com - Removed untranslated strings. Getlocalization started including those at some point which is highly annoying, unnecessary and breaks the new transfix system, since it'll mark all of the english strings as actual translations - Avoid dots in entities. It confuses the Transifex YML parser - Removed some locales unknown to Transifex which didn't have any translations anyway - Removed "lolcat" locale, uses custom notation (en@lolcal) which SilverStripe's i18n system can't handle (needs mapping from SS naming to Zend naming) - Renamed "Te Reo/Maori" locale from "mi_NZ" to "mi" (Transifex/CLDR notation) - Namespaced all entities used in templates (deprecated usage) - Converted dots to underscores where template filenames are used for namespaces, since Transifex YML parsing handles them as separate YML keys otherwise - Removed whitespace in entity names, SilverStripe i18n can't handle it --- .tx/config | 8 + code/controllers/AssetAdmin.php | 8 +- code/controllers/CMSMain.php | 4 +- lang/af.yml | 370 +----------- lang/ar.yml | 262 ++------- lang/ast.yml | 408 +------------ lang/az.yml | 352 +---------- lang/bg.yml | 206 ++----- lang/bs.yml | 352 +---------- lang/ca.yml | 334 +---------- lang/cs.yml | 175 +++--- lang/da.yml | 199 ++----- lang/de.yml | 209 +++---- lang/el.yml | 433 +------------- lang/en.yml | 20 +- lang/en_GB.yml | 420 +------------ lang/eo.yml | 281 +++++---- lang/es.yml | 142 ++--- lang/es_AR.yml | 255 +------- lang/es_MX.yml | 262 +-------- lang/et_EE.yml | 178 ++---- lang/fa_IR.yml | 354 +---------- lang/fi.yml | 217 ++++--- lang/fo.yml | 383 +----------- lang/fr.yml | 159 ++--- lang/gl_ES.yml | 213 +------ lang/grk.yml | 436 -------------- lang/he_IL.yml | 153 ++--- lang/hr.yml | 380 +----------- lang/hu.yml | 254 ++------ lang/hy_AM.yml | 433 -------------- lang/id.yml | 349 +---------- lang/is.yml | 360 +----------- lang/it.yml | 155 ++--- lang/ja_JP.yml | 401 +++++-------- lang/km.yml | 426 +------------- lang/ko.yml | 433 -------------- lang/lc_XX.yml | 54 -- lang/lt.yml | 177 +++--- lang/lv.yml | 299 +--------- lang/{mi_NZ.yml => mi.yml} | 162 ++--- lang/ms.yml | 383 +----------- lang/my.yml | 433 -------------- lang/nb.yml | 555 +++++++++--------- lang/ne.yml | 401 +------------ lang/nl.yml | 196 +++---- lang/pa.yml | 420 +------------ lang/pes_IR.yml | 436 -------------- lang/pl.yml | 149 ++--- lang/pt.yml | 155 ++--- lang/pt_BR.yml | 340 +---------- lang/ro.yml | 399 +------------ lang/ru.yml | 183 +++--- lang/si.yml | 371 +----------- lang/sk.yml | 163 +++-- lang/sl.yml | 189 ++---- lang/sr.yml | 332 +---------- lang/sv.yml | 213 ++++--- lang/th.yml | 420 ++++++------- lang/tl.yml | 433 -------------- lang/tr.yml | 264 ++------- lang/uk.yml | 180 ++---- lang/uz.yml | 429 +------------- lang/vi_VN.yml | 407 +------------ lang/zh_CN.yml | 426 ++------------ lang/zh_TW.yml | 382 ++---------- .../CMSPageHistoryController_versions.ss | 12 +- .../CMSPagesController_ContentToolbar.ss | 2 +- .../Includes/CMSPagesController_Tools.ss | 4 +- templates/email/ViewArchivedEmail.ss | 4 +- 70 files changed, 2538 insertions(+), 16419 deletions(-) create mode 100644 .tx/config delete mode 100644 lang/grk.yml delete mode 100644 lang/lc_XX.yml rename lang/{mi_NZ.yml => mi.yml} (82%) delete mode 100644 lang/pes_IR.yml diff --git a/.tx/config b/.tx/config new file mode 100644 index 00000000..1db7d558 --- /dev/null +++ b/.tx/config @@ -0,0 +1,8 @@ +[main] +host = https://www.transifex.com + +[silverstripe-cms.master] +file_filter = lang/.yml +source_file = lang/en.yml +source_lang = en +type = YML \ No newline at end of file diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index a2ad5a00..e28256c1 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -375,9 +375,9 @@ JS $fields = $context->getSearchFields(); $actions = new FieldList( - FormAction::create('doSearch', _t('CMSMain_left.ss.APPLY FILTER', 'Apply Filter')) + FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Apply Filter')) ->addExtraClass('ss-ui-action-constructive'), - Object::create('ResetFormAction', 'clear', _t('CMSMain_left.ss.RESET', 'Reset')) + Object::create('ResetFormAction', 'clear', _t('CMSMain_left_ss.RESET', 'Reset')) ); $form = new Form($this, 'filter', $fields, $actions); @@ -401,7 +401,7 @@ JS new HiddenField('ParentID', false, $this->request->getVar('ParentID')) ), new FieldList( - FormAction::create('doAdd', _t('AssetAdmin_left.ss.GO','Go')) + FormAction::create('doAdd', _t('AssetAdmin_left_ss.GO','Go')) ->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept') ->setTitle(_t('AssetAdmin.ActionAdd', 'Add folder')) ) @@ -667,7 +667,7 @@ JS */ class AssetAdmin_DeleteBatchAction extends CMSBatchAction { public function getActionTitle() { - // _t('AssetAdmin_left.ss.SELECTTODEL','Select the folders that you want to delete and then click the button below') + // _t('AssetAdmin_left_ss.SELECTTODEL','Select the folders that you want to delete and then click the button below') return _t('AssetAdmin_DeleteBatchAction.TITLE', 'Delete folders'); } diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 6ee6552f..8d2f96c1 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -296,9 +296,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr // Create the Search and Reset action $actions = new FieldList( - FormAction::create('doSearch', _t('CMSMain_left.ss.APPLY FILTER', 'Apply Filter')) + FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Apply Filter')) ->addExtraClass('ss-ui-action-constructive'), - Object::create('ResetFormAction', 'clear', _t('CMSMain_left.ss.RESET', 'Reset')) + Object::create('ResetFormAction', 'clear', _t('CMSMain_left_ss.RESET', 'Reset')) ); // Use