Improved how the filters in the langauge translation are behave when no language is found. gh-651

This commit is contained in:
Llewellyn van der Merwe 2021-01-18 19:37:05 +02:00
parent 3357f2cb40
commit 30cb1a531a
Signed by untrusted user: Llewellyn
GPG Key ID: EFC0C720A240551C
5 changed files with 29 additions and 10 deletions

View File

@ -147,7 +147,7 @@ TODO
+ *Version*: 2.12.5 + *Version*: 2.12.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **292966** + *Line count*: **292985**
+ *Field count*: **1611** + *Field count*: **1611**
+ *File count*: **1934** + *File count*: **1934**
+ *Folder count*: **322** + *Folder count*: **322**

View File

@ -147,7 +147,7 @@ TODO
+ *Version*: 2.12.5 + *Version*: 2.12.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **292966** + *Line count*: **292985**
+ *Field count*: **1611** + *Field count*: **1611**
+ *File count*: **1934** + *File count*: **1934**
+ *Folder count*: **322** + *Folder count*: **322**

View File

@ -8092,6 +8092,7 @@ COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked"
COM_COMPONENTBUILDER_NO_FOUND="No Found" COM_COMPONENTBUILDER_NO_FOUND="No Found"
COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found" COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found"
COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key."
COM_COMPONENTBUILDER_NO_LANGUAGES_FOUND="No Languages Found"
COM_COMPONENTBUILDER_NO_LANGUAGES_UPDATE_SERVER_FOUND="No Languages Update server found." COM_COMPONENTBUILDER_NO_LANGUAGES_UPDATE_SERVER_FOUND="No Languages Update server found."
COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version" COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version"
COM_COMPONENTBUILDER_NO_RESULTS_MATCH="No results match" COM_COMPONENTBUILDER_NO_RESULTS_MATCH="No results match"
@ -8284,7 +8285,7 @@ COM_COMPONENTBUILDER_SELECT_ADMIN_VIEW="Select Admin View"
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option" COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_SELECT_A_PROPERTY="Select a property" COM_COMPONENTBUILDER_SELECT_A_PROPERTY="Select a property"
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet" COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
COM_COMPONENTBUILDER_SELECT_EXTENSION="Select extension" COM_COMPONENTBUILDER_SELECT_EXTENSION="Select Extension"
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile" COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import." COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT="Select the package to import" COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT="Select the package to import"

View File

@ -69,11 +69,20 @@ class ComponentbuilderModelLanguage_translations extends JModelList
'type' => 'list', 'type' => 'list',
'onchange' => 'this.form.submit();', 'onchange' => 'this.form.submit();',
); );
// no languages found notice
$options = array( $options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_TRANSLATED_IN') . ' -', '' => '- ' . JText::_('COM_COMPONENTBUILDER_NO_LANGUAGES_FOUND') . ' -'
'all' => JText::_('COM_COMPONENTBUILDER_EVERY_LANGUAGE')
); );
$options = array_merge($options, ComponentbuilderHelper::getAvailableLanguages()); // check if we have languages set
if (($languages = ComponentbuilderHelper::getAvailableLanguages()) !== false)
{
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_TRANSLATED_IN') . ' -',
'all' => JText::_('COM_COMPONENTBUILDER_EVERY_LANGUAGE')
);
$options = array_merge($options, $languages);
}
$form->setField(ComponentbuilderHelper::getFieldXML($attributes, $options),'filter'); $form->setField(ComponentbuilderHelper::getFieldXML($attributes, $options),'filter');
$form->setValue( $form->setValue(
@ -89,11 +98,20 @@ class ComponentbuilderModelLanguage_translations extends JModelList
'type' => 'list', 'type' => 'list',
'onchange' => 'this.form.submit();', 'onchange' => 'this.form.submit();',
); );
// no languages found notice
$options = array( $options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_NOT_TRANSLATED_IN') . ' -', '' => '- ' . JText::_('COM_COMPONENTBUILDER_NO_LANGUAGES_FOUND') . ' -'
'none' => JText::_('COM_COMPONENTBUILDER_ANY_LANGUAGE')
); );
$options = array_merge($options, ComponentbuilderHelper::getAvailableLanguages()); // check if we have languages set
if ($languages)
{
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_NOT_TRANSLATED_IN') . ' -',
'none' => JText::_('COM_COMPONENTBUILDER_ANY_LANGUAGE')
);
$options = array_merge($options, $languages);
}
$form->setField(ComponentbuilderHelper::getFieldXML($attributes, $options),'filter'); $form->setField(ComponentbuilderHelper::getFieldXML($attributes, $options),'filter');
$form->setValue( $form->setValue(

View File

@ -68,7 +68,7 @@ COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
COM_COMPONENTBUILDER_PLUGIN="Plugin" COM_COMPONENTBUILDER_PLUGIN="Plugin"
COM_COMPONENTBUILDER_PROPERTY="Property" COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_A_BGITHUB_ACCESS_TOKENB_TO_COMPONENTBUILDER_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_TO_GITHUB_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO_TO_RETRIEVE_S="%s<br />You can add a <b>gitHub Access Token</b> to Componentbuilder global options to make authenticated requests to gitHub. An access token with only public access will do to retrieve %s." COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_A_BGITHUB_ACCESS_TOKENB_TO_COMPONENTBUILDER_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_TO_GITHUB_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO_TO_RETRIEVE_S="%s<br />You can add a <b>gitHub Access Token</b> to Componentbuilder global options to make authenticated requests to gitHub. An access token with only public access will do to retrieve %s."
COM_COMPONENTBUILDER_SELECT_EXTENSION="Select extension" COM_COMPONENTBUILDER_SELECT_EXTENSION="Select Extension"
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>." COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it."
COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE="Sorry this placeholder is already in use!" COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE="Sorry this placeholder is already in use!"