Language values (all Joomla versions) shows some terms surrounded by colons (:)
as in
JFolder: :delete: Path is not a folder. Path: %s
JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER
File: en-GB.lib_joomla.ini
JFolder: :files: Path is not a folder. Path: %s
JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FILES
File: en-GB.lib_joomla.ini
JFolder: :folder: Path is not a folder. Path: %s
JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FOLDER
File: lib_joomla.ini
JFolder: :files: Path is not a folder. Path: %s
JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FILES
File: en-GB.ini
Are those of to be translated? Are they placeholders? Or just technical terms (as in method names)?
It should be clear for translators if they can be or not translated.
If they are to be translated maybe the sentences could be in better english (not my field as I'm not a proper english speaker!)
Labels |
Added:
?
|
Ideally classes and methods should be passed as variables instead of being hardcoded in language strings.
Also classes and methods? They will not change, are not dependent on the context. So I think that hard coded language strings are all right. Otherwise the scripts must be changed.
@brianteeman maybe I understood this wrong
Someone uses in a script: i.e. $tmp = JFolder::folder('jbrian');
The message is now: JFolder: :folder: Path is not a folder. Path: jbrian
A better message could be: JFolder :folder: could not find the path 'jbrian'
Class and Method (here JFolder :: folder ) are an important information, but kind of constant and think they must not be variables and cannot be translated
Good luck for whoever decides to make a PR using hardcoded stuff.
In lib.joomla.ini, we have 139 occurrences of : :
+ 3 in installation ini
These corresponds to various methods which should provide the hardcoded part.
It is not only JFolder: :folder
or JFolder: :files
but JInstaller, JFTP, JApplication, JModel, JView, etc. etc.
As many class names have changed with namespacing, this could indeed be a challenge.
Class and Method (here JFolder :: folder ) are an important information
I would say to remove them all !!
A USER seeing an error/warning notice doesn't need to know it comes from JFolder
class or JFile
class, they just need to know the message.
JFolder\JFile
class names are of no use whatsoever to the end user.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-11-25 16:09:49 |
Closed_By | ⇒ | Quy |
These strings are method names and may not be translated. It is a good idea to make this clear for translators in the doc block. I let this for a native speaker.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30234.