From 0be03f216f61dc9689d4055150c4e56cf2abfbab Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 23 May 2025 20:51:36 +0900 Subject: [PATCH] Fix setting lang codes directly to xe object, not xe.lang --- .../ckeditor/plugins/rx_paste/plugin.js | 2 +- .../js/plugins/jquery.fileupload/js/main.js | 16 +++++------ modules/admin/tpl/_header.html | 8 +++--- modules/admin/tpl/js/admin.js | 28 +++++++++---------- .../editor/skins/ckeditor/file_upload.html | 12 ++++---- modules/menu/tpl/sitemap.html | 4 +-- modules/module/tpl/multilingual_v17.html | 14 +++++----- .../tpl/widget_generate_code_in_page.html | 8 +++--- 8 files changed, 46 insertions(+), 46 deletions(-) diff --git a/common/js/plugins/ckeditor/ckeditor/plugins/rx_paste/plugin.js b/common/js/plugins/ckeditor/ckeditor/plugins/rx_paste/plugin.js index de53074e3..f5e95f925 100644 --- a/common/js/plugins/ckeditor/ckeditor/plugins/rx_paste/plugin.js +++ b/common/js/plugins/ckeditor/ckeditor/plugins/rx_paste/plugin.js @@ -102,7 +102,7 @@ CKEDITOR.plugins.add('rx_paste', { * Display an error message. */ const displayError = function(type, message) { - alert(window.xe.msg_file_upload_error + ' (Type ' + type + ")\n" + message); + alert(Rhymix.lang('msg_file_upload_error') + ' (Type ' + type + ")\n" + message); }; } diff --git a/common/js/plugins/jquery.fileupload/js/main.js b/common/js/plugins/jquery.fileupload/js/main.js index cb52a126c..6d7be5095 100644 --- a/common/js/plugins/jquery.fileupload/js/main.js +++ b/common/js/plugins/jquery.fileupload/js/main.js @@ -106,7 +106,7 @@ $.each(item.files, function(index, file) { if(data.settings.maxFileSize > 0 && data.settings.maxFileSize < file.size) { dfd.reject(); - alert(window.xe.msg_exceeds_limit_size); + alert(window.xe.lang.msg_exceeds_limit_size); return false; } dfd.resolve(); @@ -133,19 +133,19 @@ if (res.result.message) { alert(res.result.message); } else { - alert(window.xe.msg_file_upload_error + " (Type 1)"); + alert(window.xe.lang.msg_file_upload_error + " (Type 1)"); } return chunkStatus = false; } } else { - alert(window.xe.msg_file_upload_error + " (Type 2)"); + alert(window.xe.lang.msg_file_upload_error + " (Type 2)"); return chunkStatus = false; } }, chunkfail: function(e, res) { lastUploadTime = Date.now(); if (chunkStatus) { - alert(window.xe.msg_file_upload_error + " (Type 3)" + "
\n" + res.errorThrown + "
\n" + res.textStatus); + alert(window.xe.lang.msg_file_upload_error + " (Type 3)" + "
\n" + res.errorThrown + "
\n" + res.textStatus); return chunkStatus = false; } }, @@ -162,14 +162,14 @@ var result = res.response().result; var temp_code = ''; if (!result) { - alert(window.xe.msg_file_upload_error + " (Type 4)"); + alert(window.xe.lang.msg_file_upload_error + " (Type 4)"); return false; } if (!jQuery.isPlainObject(result)) { result = jQuery.parseJSON(result); } if (!result) { - alert(window.xe.msg_file_upload_error + " (Type 5)" + "
\n" + res.response().result); + alert(window.xe.lang.msg_file_upload_error + " (Type 5)" + "
\n" + res.response().result); return false; } @@ -215,7 +215,7 @@ return false; } else { $container.data('editorStatus', null); - alert(window.xe.msg_file_upload_error + " (Type 6)" + "
\n" + res.response().result); + alert(window.xe.lang.msg_file_upload_error + " (Type 6)" + "
\n" + res.response().result); return false; } }, @@ -229,7 +229,7 @@ } }, 1000); if (chunkStatus) { - alert(window.xe.msg_file_upload_error + " (Type 7)" + "
\n" + res.errorThrown + "
\n" + res.textStatus); + alert(window.xe.lang.msg_file_upload_error + " (Type 7)" + "
\n" + res.errorThrown + "
\n" + res.textStatus); return false; } }, diff --git a/modules/admin/tpl/_header.html b/modules/admin/tpl/_header.html index 5abe09c9f..729ca60e1 100644 --- a/modules/admin/tpl/_header.html +++ b/modules/admin/tpl/_header.html @@ -4,10 +4,10 @@ {@ Context::addMetaTag("viewport", "width=device-width, user-scalable=yes")} diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index f3152ef88..7881bcdf5 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -977,7 +977,7 @@ jQuery(function($){ tmpCount++; // add html - var $btn = $('' + xe.cmd_find + ''); + var $btn = $('' + xe.lang.cmd_find + ''); var $displayInput = $(''); $this.after($btn).after(' ').after($displayInput).hide(); $btn.xeModuleSearch(); @@ -1050,10 +1050,10 @@ jQuery(function($){ $.xeMsgBox = { htOptions : {} }; - //xe.cmd_cancel = "{$lang->cmd_cancel}"; - //xe.cmd_confirm = "{$lang->cmd_confirm}"; + //xe.lang.cmd_cancel = "{$lang->cmd_cancel}"; + //xe.lang.cmd_confirm = "{$lang->cmd_confirm}"; var $msgBox = $.xeMsgBox.$msgBox = $("
").addClass("x_modal _common x").hide().css('z-index', 9999); - $msgBox.html('

'); + $msgBox.html('

'); $("body").append($msgBox); $msgBox.find("._ok").click(function(){ $.xeMsgBox.fnOnOK(); @@ -1513,13 +1513,13 @@ jQuery(function($){ // change text if(options.create_type != 'save_and_use'){ - $g11n_create.find('.save-useit').text(xe.cmd_save); + $g11n_create.find('.save-useit').text(xe.lang.cmd_save); } // #lang_create confirm function g11n_create_save_confirm(){ if($g11n_create.is(':visible') && is_create_changed){ - if(confirm(xe.msg_confirm_save_and_use_multilingual)){ + if(confirm(xe.lang.msg_confirm_save_and_use_multilingual)){ $g11n_create.find('.save-useit').trigger('click'); } } @@ -1531,7 +1531,7 @@ jQuery(function($){ function g11n_search_save_confirm(){ if($g11n_search.is(':visible') && $g11n_search.find('.editMode').length){ var $search_item = $g11n_search.find('.editMode'); - if(confirm(xe.msg_confirm_save_and_use_multilingual)){ + if(confirm(xe.lang.msg_confirm_save_and_use_multilingual)){ $search_item.find('.save').trigger('click'); }else{ $search_item.find('.cancel').trigger('click'); @@ -1701,7 +1701,7 @@ jQuery(function($){ if(!options.view_modify) $g11n_search.find('.modify').hide(); if(!options.view_delete) $g11n_search.find('.delete').hide(); if(options.modify_type == 'save'){ - $g11n_search.find('.save').text(xe.cmd_save); + $g11n_search.find('.save').text(xe.lang.cmd_save); } // Modify click @@ -1727,7 +1727,7 @@ jQuery(function($){ // Delete click $g11n_search.find('.delete').click(function(){ - if(!confirm(xe.confirm_delete)) return; + if(!confirm(xe.lang.confirm_delete)) return; var $this = $(this); @@ -1827,7 +1827,7 @@ jQuery(function($){ }); if(!current_lang_value){ - alert(xe.msg_empty_multilingual); + alert(xe.lang.msg_empty_multilingual); return false; } @@ -1933,8 +1933,8 @@ jQuery(function($){ } $displayInput.attr('placeholder', $this.attr('placeholder')); - var $remover = $('').data('lang-target', id); - var $setter = $('' + xe.cmd_set_multilingual_text + '').data('lang-target', id); + var $remover = $('').data('lang-target', id); + var $setter = $('' + xe.lang.cmd_set_multilingual_text + '').data('lang-target', id); $this.parent().addClass('g11n').addClass('x_input-append'); $this.after($displayInput, $remover, $setter); @@ -2377,7 +2377,7 @@ jQuery(function($){ $.xeMenuSelectorVar.$container = $.xeMsgBox.$msgBox; $.xeMsgBox.confirmDialog({ - sTitle : xe.msg_select_menu, + sTitle : xe.lang.msg_select_menu, sText : '
', @@ -2447,7 +2447,7 @@ jQuery(function($){ var sDisallowedType = $this.attr('data-disallowedType'); // add html - var $btn = $('' + xe.cmd_find + ''); + var $btn = $('' + xe.lang.cmd_find + ''); $btn.data('multiple', sMultiple); $btn.data('allowedType', sAllowedType); $btn.data('disallowedType', sDisallowedType); diff --git a/modules/editor/skins/ckeditor/file_upload.html b/modules/editor/skins/ckeditor/file_upload.html index 4bfd9ac34..7d808c24f 100644 --- a/modules/editor/skins/ckeditor/file_upload.html +++ b/modules/editor/skins/ckeditor/file_upload.html @@ -58,10 +58,10 @@ diff --git a/modules/menu/tpl/sitemap.html b/modules/menu/tpl/sitemap.html index 5f6dc29eb..8466159de 100644 --- a/modules/menu/tpl/sitemap.html +++ b/modules/menu/tpl/sitemap.html @@ -1522,12 +1522,12 @@ jQuery(function($){ $(document.body).on("click", '._menuSelector_menuTreeContainer a', function(){ if($(this).hasClass('_nodeType_1')){ - $.xeMsgBox.alert(xe.msg_no_root); + $.xeMsgBox.alert(xe.lang.msg_no_root); return; } if($(this).hasClass('_nodeType_3')){ - $.xeMsgBox.alert(xe.msg_no_shortcut); + $.xeMsgBox.alert(xe.lang.msg_no_shortcut); return; } diff --git a/modules/module/tpl/multilingual_v17.html b/modules/module/tpl/multilingual_v17.html index 0fa7a68c5..23754d4d4 100644 --- a/modules/module/tpl/multilingual_v17.html +++ b/modules/module/tpl/multilingual_v17.html @@ -41,11 +41,11 @@ diff --git a/modules/widget/tpl/widget_generate_code_in_page.html b/modules/widget/tpl/widget_generate_code_in_page.html index 7c17c8019..9fc0f407c 100644 --- a/modules/widget/tpl/widget_generate_code_in_page.html +++ b/modules/widget/tpl/widget_generate_code_in_page.html @@ -5,10 +5,10 @@