From 0fe6fd5dd5bb96022a44b9a3f5725dfa8f7490e4 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Sun, 4 Apr 2021 13:06:57 +0300 Subject: [PATCH] get localized component title from sys.ini file --- .../com_jedchecker/views/uploads/tmpl/default.php | 3 --- .../components/com_jedchecker/views/uploads/view.html.php | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_jedchecker/views/uploads/tmpl/default.php b/administrator/components/com_jedchecker/views/uploads/tmpl/default.php index 8c00e18..897c722 100644 --- a/administrator/components/com_jedchecker/views/uploads/tmpl/default.php +++ b/administrator/components/com_jedchecker/views/uploads/tmpl/default.php @@ -47,9 +47,6 @@ JHtml::script('media/com_jedchecker/js/script.js'); $options = json_encode($this->jsOptions); JFactory::getDocument()->addScriptDeclaration("var jed_options = $options;"); -// Load translation for "JED Checker" title from sys.ini file -JFactory::getLanguage()->load('com_jedchecker.sys', JPATH_ADMINISTRATOR); - ?>
diff --git a/administrator/components/com_jedchecker/views/uploads/view.html.php b/administrator/components/com_jedchecker/views/uploads/view.html.php index afb2d7a..fb87a47 100644 --- a/administrator/components/com_jedchecker/views/uploads/view.html.php +++ b/administrator/components/com_jedchecker/views/uploads/view.html.php @@ -34,6 +34,9 @@ class JedcheckerViewUploads extends JViewLegacy { $this->path = JFactory::getConfig()->get('tmp_path') . '/jed_checker'; + // Load translation for "JED Checker" title from sys.ini file + JFactory::getLanguage()->load('com_jedchecker.sys', JPATH_ADMINISTRATOR); + $this->setToolbar(); $this->jsOptions['url'] = JUri::base(); $this->jsOptions['rules'] = $this->getRules(); @@ -91,7 +94,8 @@ class JedcheckerViewUploads extends JViewLegacy JToolbarHelper::custom('check', 'search', 'search', JText::_('COM_JEDCHECKER_TOOLBAR_CHECK'), false); } - JToolbarHelper::title('JED checker'); + JToolbarHelper::title(JText::_('COM_JEDCHECKER')); + if ( file_exists($this->path) ) { JToolbarHelper::custom('uploads.clear', 'delete', 'delete', JText::_('COM_JEDCHECKER_TOOLBAR_CLEAR'), false);