diff --git a/administrator/components/com_config/model/form/application.xml b/administrator/components/com_config/model/form/application.xml index 1dc1bc51543bb..98a3a318dc1af 100644 --- a/administrator/components/com_config/model/form/application.xml +++ b/administrator/components/com_config/model/form/application.xml @@ -320,6 +320,20 @@ + + + + +
diff --git a/administrator/language/en-GB/en-GB.com_config.ini b/administrator/language/en-GB/en-GB.com_config.ini index 1e5ce8a813741..89cd11ca43e3c 100644 --- a/administrator/language/en-GB/en-GB.com_config.ini +++ b/administrator/language/en-GB/en-GB.com_config.ini @@ -62,10 +62,14 @@ COM_CONFIG_FIELD_DATABASE_TYPE_DESC="The type of database in use, selected durin COM_CONFIG_FIELD_DATABASE_TYPE_LABEL="Database Type" COM_CONFIG_FIELD_DATABASE_USERNAME_DESC="The username for access to your database entered during the installation process. Do not edit this field unless absolutely necessary (eg the transfer of the database to a new hosting provider)." COM_CONFIG_FIELD_DATABASE_USERNAME_LABEL="Database Username" +COM_CONFIG_FIELD_DEBUG_CONST="Constant" +COM_CONFIG_FIELD_DEBUG_CONST_LANG_LABEL="Language Display" +COM_CONFIG_FIELD_DEBUG_CONST_LANG_DESC="Select if you should display the language constant or the language value when debugging the language strings." COM_CONFIG_FIELD_DEBUG_LANG_DESC="Select if the debugging indicators (** ... **) or (?? ... ??) for the Joomla Language files will be displayed. Debug Language will work without Debug System being activated, but you will not get the additional detailed references that will help you correct any errors." COM_CONFIG_FIELD_DEBUG_LANG_LABEL="Debug Language" COM_CONFIG_FIELD_DEBUG_SYSTEM_DESC="If enabled, diagnostic information, language translation and SQL errors (if present) will be displayed. The information will be displayed at the foot of every page you view within the Joomla Backend and Frontend. It is not advisable to leave the debug mode activated when running a live website." COM_CONFIG_FIELD_DEBUG_SYSTEM_LABEL="Debug System" +COM_CONFIG_FIELD_DEBUG_VALUE="Value" COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_DESC="Select the default access level for new content, menu items and other items created on your site." COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_LABEL="Default Access Level" COM_CONFIG_FIELD_DEFAULT_EDITOR_DESC="Select the default text editor for your site. Registered Users will be able to change their preference in their personal details if you allow that option." diff --git a/installation/configuration.php-dist b/installation/configuration.php-dist index efe2d77592dc0..293902446b2f1 100644 --- a/installation/configuration.php-dist +++ b/installation/configuration.php-dist @@ -122,6 +122,7 @@ class JConfig /* Debug Settings */ public $debug = '0'; public $debug_lang = '0'; + public $debug_lang_const = '1'; /* Meta Settings */ public $MetaDesc = 'Joomla! - the dynamic portal engine and content management system'; diff --git a/installation/model/configuration.php b/installation/model/configuration.php index 44e080f7f5bce..088782aed3c19 100644 --- a/installation/model/configuration.php +++ b/installation/model/configuration.php @@ -78,6 +78,7 @@ public function createConfiguration($options) // Debug settings. $registry->set('debug', 0); $registry->set('debug_lang', 0); + $registry->set('debug_lang_const', 1); // Database settings. $registry->set('dbtype', $options->db_type); diff --git a/libraries/src/Language/Language.php b/libraries/src/Language/Language.php index 72acb92a1739c..29cd72639d7b9 100644 --- a/libraries/src/Language/Language.php +++ b/libraries/src/Language/Language.php @@ -332,11 +332,14 @@ public function _($string, $jsSafe = false, $interpretBackSlashes = true) if (isset($this->strings[$key])) { - $string = $this->debug ? '**' . $this->strings[$key] . '**' : $this->strings[$key]; + $string = $this->strings[$key]; // Store debug information if ($this->debug) { + $value = \JFactory::getApplication()->get('debug_lang_const') == 0 ? $key : $string; + $string = '**' . $value . '**'; + $caller = $this->getCallerInfo(); if (!array_key_exists($key, $this->used))