?
avatar MartijnMaandag
MartijnMaandag
25 Apr 2017

Steps to reproduce the issue

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.

Expected result

Actual result

System information (as much as possible)

Joomla 3.7.0 rc4

Additional comments

avatar MartijnMaandag MartijnMaandag - open - 25 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Apr 2017
avatar brianteeman
brianteeman - comment - 25 Apr 2017

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

avatar MartijnMaandag
MartijnMaandag - comment - 25 Apr 2017

People using Crowdin (like me) will not see this.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15531.

avatar brianteeman
brianteeman - comment - 25 Apr 2017

@bakual I thought you had resolved that

avatar Bakual
Bakual - comment - 25 Apr 2017

Adding context is simple in Crowdin. I can do that later.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15531.

avatar MartijnMaandag
MartijnMaandag - comment - 25 Apr 2017

We did it already ;-)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15531.

avatar brianteeman
brianteeman - comment - 25 Apr 2017

So can this be closed or do you want me to add that comment to the language file?

avatar MartijnMaandag
MartijnMaandag - comment - 25 Apr 2017

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).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15531.
avatar brianteeman
brianteeman - comment - 25 Apr 2017

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

avatar MartijnMaandag
MartijnMaandag - comment - 25 Apr 2017

That's true, but I could not find a translation in Crowdin where it wasnot translated.
I did it to as a start.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15531.

avatar Bakual
Bakual - comment - 25 Apr 2017

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.

avatar infograf768
infograf768 - comment - 26 Apr 2017

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:

screen shot 2017-04-26 at 08 31 13

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."
avatar brianteeman
brianteeman - comment - 26 Apr 2017

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 ;)

avatar brianteeman
brianteeman - comment - 26 Apr 2017

Closed see #15571

avatar brianteeman brianteeman - change - 26 Apr 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-04-26 10:08:55
Closed_By brianteeman
avatar brianteeman brianteeman - close - 26 Apr 2017

Add a Comment

Login with GitHub to post a comment