31
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-05-31 04:40:47 +00:00

get localized component title from sys.ini file

This commit is contained in:
Denis Ryabov 2021-04-04 13:06:57 +03:00
parent c0b7c05e6f
commit 0fe6fd5dd5
2 changed files with 5 additions and 4 deletions

View File

@ -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);
?>
<div id="jedchecker">
<div class="row g-3">

View File

@ -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);