In PLG_FIELDS_SQL_PARAMS_QUERY_DESC in xx-XX.plg_fields_sql.ini we have the following text:
"The SQL query which will provide the data for the dropdown list. The query must return two columns; one called 'value' which will hold the values of the list items; the other called 'text' containing the text in the dropdown list."
'value' and 'text' are values that should not be translated.
Can somebody make it variables which can't be translated?
If somebody translates this and somebody uses that Joomla crashes.
Joomla 3.7.0 rc4
People using Crowdin (like me) will not see this.
Adding context is simple in Crowdin. I can do that later.
We did it already ;-)
So can this be closed or do you want me to add that comment to the language file?
The best is to add variables to the string. Don't give something to translate if you don't have to translate it.
When you are translating you don't always look at the context in Crowdin (99% it shows the string-identifier).
ok well i will have to leave that to others then. Seems crazy to me that someone will try and translate something without the context because without the context its never going to give a quality translation
That's true, but I could not find a translation in Crowdin where it wasnot translated.
I did it to as a start.
The best is to add variables to the string.
I disagree with that. Passing a static text with a variable doesn't make much sense. I think it's also simpler for the translators in the end because they know what they deal with. Of course documentation is key and afaik it was lacking.
I think that Brian is right and that we should add a comment before the string as not all TTs anyway use crowdin.
For example, when using com_localise, the comment will display:
when the commented line is placed like this (without any blank line before):
PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL="Multiple"
; In the string below the terms 'value' and 'text' should not be translated
PLG_FIELDS_SQL_PARAMS_QUERY_DESC="The SQL query which will provide the data for the dropdown list. The query must return two columns; one called 'value' which will hold the values of the list items; the other called 'text' containing the text in the dropdown list."
I will do that PR shortly although to be honest if someone is even thinking of writing SQL then they should realise what they need to write and if they write a bad query then it will fail. There is nothing we can currently do to validate the query and there are more ways to write bad query than just using the translated strng ;)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-26 10:08:55 |
Closed_By | ⇒ | brianteeman |
Wouldnt it be better to just add a note not to translate those words as we have done here
https://github.com/joomla/joomla-cms/blob/staging/installation/language/en-GB/en-GB.ini#L122
Thats an easy PR to make