I have written a php script for searching for language text keys used in the whole php code. This script finds only almost all used keys, but anyway I can check on whether all keys are to be found in any language definition file (.ini file).
The following used keys are missing (list of all code lines using a missing key - a key may be listed more than once):
Source code from stage cloned. Currently, this 3.6.0-beta1-dev.
PHP 7.0.6
The ones I've searched against are all legit and all non-compound keys.
The SOME_ERROR_CODE
stuff should all NOT be JText
keys anyway. That's just bad error handling across the system not defining a proper integer error code on error objects (which with scalar typehinting would cause a PHP Error).
COM_TAGSS_REBUILD_FAILURE
is a typo. And the two for the Hathor com_banners overrides are just missing the COM_
prefixes. That's as far as I've gone.
Yep, some strings missing and typos to correct.
@brianteeman
I can solve easily the ones with typos and existing strings:
COM_TAGSS_REBUILD_FAILURE => COM_TAGS_REBUILD_FAILURE
COM_LANGS_SEARCH_IN_TITLE => COM_LANGUAGES_SEARCH_IN_TITLE
ERRORUNKOWNEXTENSION => JLIB_INSTALLER_ERROR_PLG_UNINSTALL_ERRORUNKOWNEXTENSION
BANNERS_SEARCH_IN_TITLE => COM_BANNERS_SEARCH_IN_TITLE
BANNERS_SELECT_TYPE => COM_BANNERS_SELECT_TYPE
Change
JFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY
to
JLIB_PLUGIN_ERROR_FOLDER_EMPTY
and change the code from
JLog::add(JText::_('JFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY'), JLog::WARNING, 'jerror');
to
JLog::add(JText::sprintf('JLIB_PLUGIN_ERROR_FOLDER_EMPTY', $folder), JLog::WARNING, 'jerror');
and create the string.
`JLIB_PLUGIN_ERROR_FOLDER_EMPTY="Error: the %s plugin folder is empty."
"Rename failed" for folder is a bit more complex as we do have a string ( JLIB_FILESYSTEM_ERROR_FOLDER_RENAME="Rename failed: %s") which is used correctly in one context but not sure it could as a sprintf in the 2 others.
If you want, I can start a PR. Concerning the missing strings, as they need a good English writer, you could propose a patch against mine.
What do you think?
That was my to-do list for this morning as soon as I finished this coffee.
If you want to start it then I will just have to assist with the strings
that is fine by me.
My thought was to do TWO pr. One with the simple typos and keys that are
named wrong and another pr for missing strings.
That should make it easier for the tt
not really easier on TTs. I let you do things then.
My main findings are above.
OK I will start soon
Started at #10804
Closed
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-06-13 11:18:14 |
Closed_By | ⇒ | brianteeman |
@beni71 apologies for suggesting that these were false positives
Labels |
Added:
?
|
No problem - it's a bit special issue .. But I am very pleased to see that you and your team have the thing tackled as quickly. Thanks a lot.
As with any script its results are only as good as the script. There are
many compound keys in Joomla that it looks like you are missing.