From 2af63a84efd1b0a91985ea877fc65447c198ea02 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Mon, 9 May 2016 15:31:31 +1200 Subject: [PATCH] FIX add_i18n_javascript calls not being updated after JS move This fixes alert / confirm boxes that were popping up without text (for example silverstripe-cms/issues/1476), although ideally we wouldn't show empty dialog boxes on this sort of error - we'd have some default, or a way to detect the issue. --- .tx/config | 4 ++-- code/controllers/AssetAdmin.php | 2 +- code/controllers/CMSMain.php | 2 +- code/forms/SiteTreeURLSegmentField.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.tx/config b/.tx/config index 56c35b00..4d62faab 100644 --- a/.tx/config +++ b/.tx/config @@ -8,7 +8,7 @@ source_lang = en type = YML [silverstripe-cms.master-js] -file_filter = javascript/lang/src/.js -source_file = javascript/lang/src/en.js +file_filter = client/lang/src/.js +source_file = client/lang/src/en.js source_lang = en type = KEYVALUEJSON \ No newline at end of file diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index d71ff9bf..2491a2d9 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -66,7 +66,7 @@ class AssetAdmin extends LeftAndMain implements PermissionProvider{ Versioned::set_stage(Versioned::DRAFT); Requirements::javascript(CMS_DIR . "/client/dist/js/AssetAdmin.js"); - Requirements::add_i18n_javascript(CMS_DIR . '/client/src/lang', false, true); + Requirements::add_i18n_javascript(CMS_DIR . '/client/lang', false, true); Requirements::css(CMS_DIR . '/client/dist/styles/bundle.css'); CMSBatchActionHandler::register('delete', 'AssetAdmin_DeleteBatchAction', 'Folder'); } diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 7ede328e..bbbc8292 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -70,7 +70,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr Requirements::css(CMS_DIR . '/client/dist/styles/bundle.css'); Requirements::customCSS($this->generatePageIconsCss()); - Requirements::add_i18n_javascript(CMS_DIR . '/client/src/lang', false, true); + Requirements::add_i18n_javascript(CMS_DIR . '/client/lang', false, true); Requirements::javascript(CMS_DIR . '/client/dist/js/bundle-legacy.js', [ 'provides' => [ CMS_DIR . '/client/dist/js/CMSMain.AddForm.js', diff --git a/code/forms/SiteTreeURLSegmentField.php b/code/forms/SiteTreeURLSegmentField.php index 9ade6f4f..b00c26d5 100644 --- a/code/forms/SiteTreeURLSegmentField.php +++ b/code/forms/SiteTreeURLSegmentField.php @@ -38,7 +38,7 @@ class SiteTreeURLSegmentField extends TextField { public function Field($properties = array()) { Requirements::javascript(CMS_DIR . '/client/dist/js/SiteTreeURLSegmentField.js'); - Requirements::add_i18n_javascript(CMS_DIR . '/client/src/lang', false, true); + Requirements::add_i18n_javascript(CMS_DIR . '/client/lang', false, true); Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/bundle.css'); return parent::Field($properties); }