Kodi Community Forum
Crash due to typo in language file - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Translations and Languages (https://forum.kodi.tv/forumdisplay.php?fid=90)
+--- Thread: Crash due to typo in language file (/showthread.php?tid=332871)



Crash due to typo in language file - scott967 - 2018-06-14

That worked great on my skin mod.  So I was working through my 20 languages to verify and came across a couple bugs which I repeated in Estuary.  Test system is Win 7 x64 (English) and system locale is en-US.  Win x64 desktop ver 180612 nightly.

Croat

After installing the resource addon and switching to Croat, it seems like any action that opens a select dialog crashes Kodi when the dialog opens.

Greek

Attempting to switch to Greek the resource addon installed but Kodi crashed as soon as Estuary reloaded and attempted to reopen settings category window.  I tried hand-editing guisettings with
xml:
<setting id="locale.language">resource.language.el_gr</setting>
and Kodi crashed after loading all the addon string.po files and before loading Estuary.

scott s.
.


RE: addon devs: language file formatting (and more...) - ronie - 2018-06-14

yup, i was able to reproduce those crashes.
i don't see how it's related to this addon though?


RE: addon devs: language file formatting (and more...) - scott967 - 2018-06-14

Yes, I was being kind of lazy.  But more directly, this addon could be alerted to skinners as well as addon devs.

scott s.
.


RE: addon devs: language file formatting (and more...) - Wanilton - 2018-06-16

@Scott067

Error in greek is caused by errors in kodi translation, it´s easy fix and solve. A few strings don´t need translate, but someone gets and translate, resulting in crash.

resource.language.el_gr

Look in line 576, strings.po file to Greek and you find this
Code:
msgctxt "#168"
msgid "{0:s}- {1:s}"
msgstr "{0:δ}-{1:δ}"
Correct way
Code:
msgctxt "#168"
msgid "{0:s}- {1:s}"
msgstr "{0:s}- {1:s}"
Have others strings with the same trouble, when fixed, will work ok...

Here other with the same error
Code:
msgctxt "#178"
msgid "{0:s} has been successfully started."
msgstr "Το {0:δ} ξεκίνησε επιτυχώς"



RE: Crash due to typo in language file - ronie - 2018-06-16

posts split & moved.

@Wanilton thanx for digging into it!


RE: Crash due to typo in language file - scott967 - 2018-06-17

Good find.  So I was looking at xbmc/repo-resources and see the most recent bad commit for Leia branch was 14 May for Greek strings #22004 and #22005.  I found the problem in Croatian where {0:s} was replaced by {0:d}.  That one is bit more insidious as the syntax is correct.   I don't know how transifex works, but it seems there needs to be some QA on how formatting codes in translated strings are handled before commits are merged.  I checked out the repo Leia branch locally so I could grep some files and didn't see any other obvious bugs, but that was kind of a visual inspection with a simple regex search and not really a 100% method.  So maybe with Croatian and Greek I just happened to install the only two bugged string.po files.  Anyway fixing the substitution/formatting codes in those two languages resolved the crashes.

scott s.


RE: Crash due to typo in language file - bugatsinho - 2018-09-05

thank you guys that was really helpful!


RE: Crash due to typo in language file - Iwojimy - 2018-12-17

Well, June is far away, but crashing Kodi 18 is still here! At least for Croatian language.
If you install Croatian language everything seems fine until you try to change skin. Than Kodi 18 will crash.

In file strings.po:
C:\Users\name_user\AppData\Roaming\Kodi\addons\resource.language.hr_hr\resources\strings.po
change { 0 : d } in { 0 : s } (without spaces) on lines:
1610
1974
2038
That works for me.
While you are here you can delete unnecessery "%d" on line 12750.


RE: Crash due to typo in language file - scott967 - 2018-12-18

Thanks for some reason I thought this was fixed.  I was recently added as a "translator" for Croatian, but I can only offer "suggestions" and upvote previous suggested changes (2 already were in transiflex as suggestions).  Hopefully these can be accepted (I admit, I don't know the approval process for these, but at least the needed changes are now documented in the system).

scott s.
.


RE: Crash due to typo in language file - sstavross - 2020-03-04

Sorry for bringing this old thread back but I had the same crash problem today while testing some skins in my native language (greek). When trying to load the skin Aeon MQ8, or Aeon Silvo immediattely after changing the language to greek , kodi crashed and it wont start again! I had to clear data and start from scrach again.
Thanks to the post above I checked the strings.po file of greek language and I found the error! It is in the line 4930 and the {0:s} string must  be changed to {0:d} .

Please , any moderator, push this correction to the translation project , as I don't know how to do it...

Thank you very much all of you for the effort you put on KODI!


RE: Crash due to typo in language file - DarrenHill - 2020-03-04

Thread moved to languages and translations. Hopefully the relevant people can see it here.


RE: Crash due to typo in language file - scott967 - 2020-03-05

(2020-03-04, 21:05)DarrenHill Wrote: Thread moved to languages and translations. Hopefully the relevant people can see it here.
Dupe of 352023 (thread)

scott s.
.


RE: Crash due to typo in language file - Pediori - 2020-03-05

(2020-03-05, 02:26)scott967 Wrote:
(2020-03-04, 21:05)DarrenHill Wrote: Thread moved to languages and translations. Hopefully the relevant people can see it here.
Dupe of 352023 (thread)

scott s.
I have the same problem with the german language pack.
Kodi (18.5 Git:leia_pi4_18.5-Leia)

I can't boot because of this error:
 
Quote:2020-03-05 07:40:05.245 T:3011261776 ERROR: unable to load resource://resource.language.de_de/langinfo.xml: Failed to open file at line 0
2020-03-05 07:40:05.245 T:3011261776 FATAL: SetLanguage: CLangInfo: failed to load resource.language.de_de language information



RE: Crash due to typo in language file - scott967 - 2020-03-05

(2020-03-05, 09:55)Pediori Wrote:
(2020-03-05, 02:26)scott967 Wrote:
(2020-03-04, 21:05)DarrenHill Wrote: Thread moved to languages and translations. Hopefully the relevant people can see it here.
Dupe of 352023 (thread)

scott s.
.  
I have the same problem with the german language pack.
Kodi (18.5 Git:leia_pi4_18.5-Leia)

I can't boot because of this error:
 
Quote:2020-03-05 07:40:05.245 T:3011261776 ERROR: unable to load resource://resource.language.de_de/langinfo.xml: Failed to open file at line 0
2020-03-05 07:40:05.245 T:3011261776 FATAL: SetLanguage: CLangInfo: failed to load resource.language.de_de language information
It does not appear to be the "same problem" (problem with Greek is bad string format command in translated string).  I don't see a problem with German language addon 9.0.21.  If you can access your addons, look at resource.language.de_de and verify that resources/langinfo.xml file exists and can be opened in a text editor.

scott s.
.