Bug 954357

Summary: Error when installing with Ukrainian localization
Product: [openSUSE] openSUSE Distribution Reporter: Forgotten User 8RiBGehMJX <forgotten_8RiBGehMJX>
Component: TranslationsAssignee: Karl Eichwalder <ke>
Status: RESOLVED FIXED QA Contact: Karl Eichwalder <ke>
Severity: Normal    
Priority: P5 - None CC: ancor, dimstar, ke, maintenance
Version: Leap 42.1Flags: ke: needinfo? (coolo)
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 42.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 954505    
Attachments: y2logs

Description Forgotten User 8RiBGehMJX 2015-11-09 21:21:36 UTC
Created attachment 655263 [details]
y2logs

When installing Leap 42.1 (or 13.2) with Ukrainian localization the page of user account setup is skipped with error:

Details: malformed format string - %*[0-9]
Caller: /usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-0.9.2/lib/fast_gettext/vendor/string.rb:70:in `%'

Other tried localizations show user account page correctly.
y2logs is attached
Comment 1 Ancor Gonzalez Sosa 2015-11-10 12:13:50 UTC
The problems seems to be in the uk version of users.po, but I have not managed to spot exactly where. I'll research further.
Comment 2 Dominique Leuenberger 2015-11-10 12:26:27 UTC
(In reply to Ancor Gonzalez Sosa from comment #1)

Ancor:

642 	#. additional help text about password
643 	#: src/clients/inst_user_first.rb:467
644 	msgid ""
645 	"<p>If you intend to use this password for creating certificates,\n"
646 	"it has to be at least %s characters long.</p>"
647 	msgstr ""
648 	"<p>Якщо ви маєте намір використовувати цей пароль для створення сертифікатів,\n"
649 	"то він повинен мати довжину не меншу за %1 символів.</p>"

??

the english text has %s, the UK text uses %1

and there are more, like:

721 	#. summary label
722 	#: src/clients/inst_user_first.rb:628
723 	msgid "The password encryption method is %s."
724 	msgstr "Методом шифрування паролів є %1."

(this seems the one to be referenced in the yast2 log:

'malformed format string - %*[0-9]' and backtrace ["/usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-0.9.2/lib/fast_gettext/vendor/string.rb:70:in `%'", "/usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-0.9.2/lib/fast_gettext/vendor/string.rb:70:in `%'", "/mounts/mp_0001/usr/share/YaST2/clients/inst_user_first.rb:629:in
Comment 3 Ancor Gonzalez Sosa 2015-11-10 12:31:36 UTC
(In reply to Dominique Leuenberger from comment #2)
>
> the english text has %s, the UK text uses %1

That was also my first though. But then I checked that the same happens in (at least) the Greek translation, but the Greek one works... or at least does not crash). So I concluded it must be something different.
Comment 4 Dominique Leuenberger 2015-11-10 12:48:08 UTC
(In reply to Ancor Gonzalez Sosa from comment #3)
> (In reply to Dominique Leuenberger from comment #2)
> >
> > the english text has %s, the UK text uses %1
> 
> That was also my first though. But then I checked that the same happens in
> (at least) the Greek translation, but the Greek one works... or at least
> does not crash). So I concluded it must be something different.

The greek one (el) has this:

731 	#. summary label
732 	#: src/clients/inst_user_first.rb:628
733 	msgid "The password encryption method is %s."
734 	msgstr "Η μέθοδος κρυπτογράφησης συνθηματικού είναι %s."

so whereas there MIGHT be other instances where this issue is actually there, it's not that step in the installer
Comment 5 Ancor Gonzalez Sosa 2015-11-10 16:16:46 UTC
Silly me! I was looking at Estonian .po file (et) and checking the effect in Greek language (el). But turns out el!=et. :-)

In Estonian it's not broken just because the translation is marked as fuzzy (so not included in the .mo file)... a missing translation that is not that obvious when you are staring at a Greek screen and you see no English text. :-D

So, in the end, it's a bug in the uk/users.po, as expected from the very beginning. So reassigning to translations.
Comment 6 Karl Eichwalder 2015-11-10 16:36:40 UTC
(In reply to Ancor Gonzalez Sosa from comment #5)
> Silly me! I was looking at Estonian .po file (et) and checking the effect in
> Greek language (el). But turns out el!=et. :-)
> 
> In Estonian it's not broken just because the translation is marked as fuzzy
> (so not included in the .mo file)... a missing translation that is not that
> obvious when you are staring at a Greek screen and you see no English text.
> :-D
> 
> So, in the end, it's a bug in the uk/users.po, as expected from the very
> beginning. So reassigning to translations.

Ok, thanks for debugging.  It would work better, if the ruby xgettext extractor would add formatting markers as it does for other languages such as c or even ycp:

#, c-format

#, ycp-format

I'm not sure whether that's a general issue or whether our yast xgettext extractor just does not know about this.  Without such markers we are not (easily) able to validate the translations -- we usually do this with msgfmt.
Comment 7 Karl Eichwalder 2015-11-10 16:52:18 UTC
Andriy, can you please the format strings in users.uk.po (in yast, trunk)?  At some palces, you now must use %s instead of %1.
Comment 8 Forgotten User 1pdNI8UNQ5 2015-11-10 21:12:38 UTC
(In reply to Karl Eichwalder from comment #7)
> Andriy, can you please the format strings in users.uk.po (in yast, trunk)? 
> At some palces, you now must use %s instead of %1.

I formated strings in users.uk.po and updated file users.uk.po committed in http://svn.opensuse.org/viewvc/opensuse-i18n/trunk/yast/uk/po/.
Comment 9 Karl Eichwalder 2015-11-11 10:02:22 UTC
thanks, I submitted it to factory and will also publish a Leap update soon:

osc sr -m "Updated languages: af am ar be bg bn bs ca cs cy da de el eo es et eu fafr gl gu he hi hr hu id it ja jv ka km kn ko ku lo lt mk mr ms my nb nl nn pa pl ptru si sk sl sr sv sw ta tg th tk tr uk vi wa xh zu en_GB en_US pt_BR zh_CN zh_TW ass." YaST:Head yast2-trans openSUSE:Factory
created request id 343766
Comment 10 Karl Eichwalder 2015-11-11 14:33:38 UTC
now I also filed:

Created submit request 79387 to SUSE:SLE-12-SP1:GA

I guess we need this update on openSUSE Leap.  Can you pick it up from ibs://SUSE:SLE-12-SP1:GA?
Comment 11 Karl Eichwalder 2016-05-03 08:16:17 UTC
(In reply to Karl Eichwalder from comment #10)
> now I also filed:
> 
> Created submit request 79387 to SUSE:SLE-12-SP1:GA
> 
> I guess we need this update on openSUSE Leap.  Can you pick it up from
> ibs://SUSE:SLE-12-SP1:GA?

I forgot to close it.