User tests: Successful: Unsuccessful:
Pull Request for #29884 (comment) .
This Pull Request (PR) changes the language strings used in the upload function of the Joomla Update model when raising exceptions from com_installer strings (which currently are not translated) to com_joomlaupdate or global strings, depending if they should be same for both the installer and the Joomla Update component (ans possibly other, 3rd party extensions) and adds the necessary strings to the com_joomlaupdate global language files. This fixes the strings not being translated, because the com_installer language is not loaded in the com_joomlaupdate model.
In addition it fixes a missing use of translation (i.e. JText::_
call) here: https://github.com/joomla/joomla-cms/pull/29899/files#diff-35b54662480daa18b046886a634f00d6L951 .
Finally this PR changes the install model of com_installer so it uses the language strings which have been changed to global strings as mentioned before. The previosly used strings are marked as deprecated in the com_installer language file.
This does not change com_installer language string which are used in the default_upload.php view of com_joomlaupdate Those strings are translated well because the language is loaded, so I did not see the need to change them.
Will be added soon. As long as this is not done I'll leave this PR in draft status.
Will be added soon.
Will be added soon.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_joomlaupdate Language & Strings |
Would it not be better to use
$lang->load
to include the existing language file than to create another set of strings
@brianteeman I had asked about this and got feedback from @zero-24 that I should not make the joomla update model depend on the installer's language strings, see e.g. #29884 (comment) .
Obviously I disagree but if anything then both components should be using a global string. Maintaining two identical sets of strings is just not right
@HLeithner @zero-24 Please advise regarding previous comments. I'll do whatever will be decided.
@brianteeman If you compare the strings used without and with this PR, you will see they are not all the same. This PR here changes some of then which talk about the installer so that they talk about Joomla Update. So at least for those global strings will not make sense.
It should be ok if the updater has it's own strings especially if not every thing is exactly the same.
I agree with @HLeithner you might even what to give a different message in com_joomlaupdate maybe in non en-GB languages. The thing about not depending on com_installer is it should be possible that com_joomlaupdate can be released as standalon so it should be done with as less as possible dependencies to other components in my opinion.
I agree with @HLeithner you might even what to give a different message in com_joomlaupdate maybe in non en-GB languages. The thing about not depending on com_installer is it should be possible that com_joomlaupdate can be released as standalon so it should be done with as less as possible dependencies to other components in my opinion.
@zero-24 This PR only solves it for the model, where the installer language strings were not translated. But there are still installer language strings used in the default_upload.php view. Those strings are translated well, so I did not see the need to change them, too. @HLeithner Is that ok, or shall I handle them too with this PR?
Title |
|
I'm unsure... because having duplicated strings are look wrong but using strings from an other component doesn't make sense either....
Labels |
Added:
?
?
|
Category | Administration com_joomlaupdate Language & Strings | ⇒ | Administration com_installer com_joomlaupdate Language & Strings |
@brianteeman @HLeithner I've moved those untranslated strings fixed by this PR and being the same for com_installer and com_joomlaupdate to global language strings and added deprecation comments to those language strings in the com_installer language file. For consistency I've also moved two description texts which belong to other two moved texts, even if those descriptions are (currently) only used by the installer. The installer PHP I've changed to use the moved strings.
@brianteeman I'd be happy if you could check what I've done with the strings, especially check the deprecation comments in the installer language file and if necessary suggest corrections. Thanks in advance.
@brianteeman Could you check my replies to your review comments above and make suggestions? Thanks in advance, and thanks for review so far.
@richard67 I already did - or am i missing something
weird they only just showed up
@brianteeman Thansk for review. All done. Stay tuned with testing instructions and draft status removal. I need a break.
Title |
|
It seems the issue with these untranslated strings has been solved meanwhile, since on a current staging they are all translated when I add some debug code to check that.
I've just checked that.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-24 10:42:59 |
Closed_By | ⇒ | richard67 |
Would it not be better to use
$lang->load
to include the existing language file than to create another set of strings