New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RfC] Deprecate _QQ_ usage in language files #13421
Comments
👍 PHP has advanced enough that this workaround is no longer needed. Use native features as able, which means just escape your quotes. Even if the usage of the constant in core isn't phased out during 3.x since that would presumably create an unnecessary workload on translators, it should be gone in 4.0. |
Why do you think the change f the coreis not B/C? JText (as far as i remember) can handle both the Joomla QQ and normal escaped strings. But as both should work after the changes too (until 4.0) i see no problem in changing it. The TT's need to do it anyway (atleast before 4.0) but they are not required to do it as it still works. So they get more time from us to change the strings and there is no hurry to do this for the next release as 3.7 still supports the current way? Or do i miss or missunderstand something? |
@zero-24 if we removed |
BTW checked all https://github.com/joomla-extensions ini files and didn't find a single language variable using |
Correct messages and banners was prepared to be removed from core until the plt stopped that project. ;) Ok than i got it correct. You are correct we can't stop processing the Joomla QQ But i think we should remove the usage form the core language files too. And mark them not as requirement to change in the language translation files but as recommended :) |
The only problem with that is it will force every string to be updated if you're using Crowdin or com_localise. So for 3.x it probably won't happen just because of the workload burden (nothing stops translation teams from optionally replacing it though), but as I hinted at above we just need to do it for 4.0 and not live another 5 years with that thing present. |
@zero-24 |
@infograf768 it's 59 language variables (sorry for the confusion) which probably correspont to your 190 if you are referring to https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/toolbar/button/confirm.php#L90 that should not be like that, we could use: JText::script('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST');
// and them in js
alert(Joomla.JText._('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST')); anyway it should work like it was, so it seems to me like a regression, but not related to this will check this |
Unrelated indeed. That's why I made a Note. |
Is this not just a Search and replace? The problem i see is that two weeks before 4.0 comes out we have translation teams that translate the new strings i expect that there are much strings to change (as the content is changed) than there are 59/190 strings more in that list where we know now that they needs to be changed. And this strings can be changed now without any problems so why do we not tell them (maybe in a mail too etc) and change the core to show the correct / recommended usage. That would reduce the workload before 4.0 stable. I know that they need to change / review it but what is the difference between now (small steps) or before 4.0 (one big step) ? |
It is just a search and replace. But remember that every change in the core strings causes all of the translation tools (it doesn't matter what you're working with, every automated platform is going to do this) to mark a string as untranslated and force a translator to review it. So while it is indeed a simple change, it still causes a lot of extra work just to make sure that nothing changed except for |
so it seems that we have somewhat consensus to do the removal of |
This comment was marked as abuse.
This comment was marked as abuse.
Is this on the roadmap already? If so, this can be closed. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13421. |
#13451 is the final PR in the series for this item. Someone might need to take ownership since Andre has had to pull out due to other commitments. Closing this item since there is the open PR though and the other items here have been addressed. |
Description
The usage of
_QQ_
in translation files is a joomla custom method that IMHO should be deprecated.Also:
"_QQ_"
is not the best thing because we are closing the ini var delimiter at the middle of a string._QQ_
stuff when we need is, for what i tested, to escape double quotes (\"
).I could be missing something, but for all my tests, i don't see anything more.
So this RFC is to propose to have a plan to remove those
_QQ_
without any B/C break and giving time to adapt.Basicly what is proposed is at the end of the process
Proposed
I can do the PR needed (as time allows) in this sequence:
_QQ_
in 4 ini files._QQ_
and normalize language ini saving._QQ_
as deprecated and normalize language ini parsing._QQ_
from user overrides on upgrade._QQ_
with\"
in all language files and remove deprecated methods.Translator impact
As @infograf768 expalined i am now aware of the impact of this translation.
In core, currently, for what i count there are 59 language variables with
_QQ_
usage in 26 en-GB language files so when_QQ_
is replace by escaped double quotes\"
it means this language string will appear as not translated or as changed (in crowin).Third party extensions use those too.
So this cannot be replaced in one go without B/C break.
Notes
This is a RFC because, before i start making those PR, i want to have feedback/approval from mantainers on this. Otherwise i will not do them.
The text was updated successfully, but these errors were encountered: