2013-01-02, 22:07
I found some string concatenation issues in the Confluence skin when reviewing the current Indonesian language files.
It turned out that the main settings dialog (System\Settings) is using two localization strings to make up the dialog title "Change Your Settings". In the Indonesian locale it says "Change Your Setelan".
It took me some time to find that this was defined in the Confluence xml files. I did a regex search with Notepad to find similar cases in the skin and got 4 hits (below).
Search "\$LOCALIZE\[[0-9]+\]\s+\$LOCALIZE\[[0-9]+\]" (4 hits in 4 files)
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\DialogPVRGuideSearch.xml (1 hits)
Line 104: <label>$LOCALIZE[19001] $LOCALIZE[19002]</label>
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\MusicOSD.xml (1 hits)
Line 277: <label>$LOCALIZE[250] $LOCALIZE[21417]</label>
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\Settings.xml (1 hits)
Line 196: <label>$LOCALIZE[31000] $LOCALIZE[5]</label>
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\ViewsFileMode.xml (1 hits)
Line 423: <viewtype label="$LOCALIZE[539] $LOCALIZE[536]">list</viewtype>
Localization strings :19001 19002
en: Separate the search words by using AND, OR and/or NOT. or use phrases to find an exact match, like \"The wizard of Oz\".
id:
nl: Scheid de zoekwoorden door middel van AND, OR en/of NOT om de zoekopdracht te specificeren. of gebruik zinnen om op een tekst te zoeken, bijv. \"Toen was geluk heel gewoon\".
Localization strings :250 21417
en: Visualization - Settings
id: Visualisasi
nl: Visualisatie - Instellingen
Localization strings :31000 5
en: Change Your Settings
id: Verander Jou Setelan5
nl: Aanpassen Instellingen
Localization strings :539 536
en: Wide Icons
id:
nl: Wijd Iconen
The 19001 - 19002 pair looks OK, that seems a case of using two strings to make a bigger description possible. Punctuation is probably incorrect, the first string probably needs to end in a comma..
The 250 - 21417 pair: Here the language file is used to define formatting that could be put into the skin itself. Why define 21417 " - Settings" if 5 "Settings" already exists? Although one could argue that the skin should not depend on the resources for xmbc.core.
The 31000 - 5 pair makes up the dialog title for 'System\Settings'. Translating 'Change your settings' into Indonesian with about the same level of politeness would be something like 'Mengubah Setelan Anda'.
This cannot be done with the current code. (I copied 'Verander Jou' from the Afrikaans folders)
The 539 - 536 pair is a similar case. 'Wide icons' could translate to 'Ikon Lebar': the exact reverse of the order hardcoded in the label tag. For Dutch, a more natural translation would be 'Wijde iconen' or 'Brede iconen'. Something that can't be achieved by sticking the two strings together.
For those last two cases the best thing is to make the text localized into one string; I am not sure about the first one (or two).
Changeing the XML is fairly straightforward if one makes a pullrequest on github. I've never done that before, so I'm not disappointed if someone else does that
The biggest effort with this issue is probably changing the string resources for skin.confluence in all the current languages. That's why I post here, so things can be coordinated.
I've looked in the forums to see if anyone already mentioned this and the bugtracker didn't know about $LOCALIZE[31000]
It turned out that the main settings dialog (System\Settings) is using two localization strings to make up the dialog title "Change Your Settings". In the Indonesian locale it says "Change Your Setelan".
It took me some time to find that this was defined in the Confluence xml files. I did a regex search with Notepad to find similar cases in the skin and got 4 hits (below).
Search "\$LOCALIZE\[[0-9]+\]\s+\$LOCALIZE\[[0-9]+\]" (4 hits in 4 files)
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\DialogPVRGuideSearch.xml (1 hits)
Line 104: <label>$LOCALIZE[19001] $LOCALIZE[19002]</label>
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\MusicOSD.xml (1 hits)
Line 277: <label>$LOCALIZE[250] $LOCALIZE[21417]</label>
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\Settings.xml (1 hits)
Line 196: <label>$LOCALIZE[31000] $LOCALIZE[5]</label>
D:\Video\xbmc-Frodo_rc2\addons\skin.confluence\720p\ViewsFileMode.xml (1 hits)
Line 423: <viewtype label="$LOCALIZE[539] $LOCALIZE[536]">list</viewtype>
Localization strings :19001 19002
en: Separate the search words by using AND, OR and/or NOT. or use phrases to find an exact match, like \"The wizard of Oz\".
id:
nl: Scheid de zoekwoorden door middel van AND, OR en/of NOT om de zoekopdracht te specificeren. of gebruik zinnen om op een tekst te zoeken, bijv. \"Toen was geluk heel gewoon\".
Localization strings :250 21417
en: Visualization - Settings
id: Visualisasi
nl: Visualisatie - Instellingen
Localization strings :31000 5
en: Change Your Settings
id: Verander Jou Setelan5
nl: Aanpassen Instellingen
Localization strings :539 536
en: Wide Icons
id:
nl: Wijd Iconen
The 19001 - 19002 pair looks OK, that seems a case of using two strings to make a bigger description possible. Punctuation is probably incorrect, the first string probably needs to end in a comma..
The 250 - 21417 pair: Here the language file is used to define formatting that could be put into the skin itself. Why define 21417 " - Settings" if 5 "Settings" already exists? Although one could argue that the skin should not depend on the resources for xmbc.core.
The 31000 - 5 pair makes up the dialog title for 'System\Settings'. Translating 'Change your settings' into Indonesian with about the same level of politeness would be something like 'Mengubah Setelan Anda'.
This cannot be done with the current code. (I copied 'Verander Jou' from the Afrikaans folders)
The 539 - 536 pair is a similar case. 'Wide icons' could translate to 'Ikon Lebar': the exact reverse of the order hardcoded in the label tag. For Dutch, a more natural translation would be 'Wijde iconen' or 'Brede iconen'. Something that can't be achieved by sticking the two strings together.
For those last two cases the best thing is to make the text localized into one string; I am not sure about the first one (or two).
Changeing the XML is fairly straightforward if one makes a pullrequest on github. I've never done that before, so I'm not disappointed if someone else does that
The biggest effort with this issue is probably changing the string resources for skin.confluence in all the current languages. That's why I post here, so things can be coordinated.
I've looked in the forums to see if anyone already mentioned this and the bugtracker didn't know about $LOCALIZE[31000]