[Bug 1026156] New: Weblate doesn't check for wrong "%s" variable
http://bugzilla.suse.com/show_bug.cgi?id=1026156 Bug ID: 1026156 Summary: Weblate doesn't check for wrong "%s" variable Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Translations Assignee: ke@suse.com Reporter: elchevive68@gmail.com QA Contact: ke@suse.com Found By: --- Blocker: --- Hi, Maybe Weblate should check for wrong translations on variable %s, because if it is translated wrong (%1, %d, etc) it can break the program like this bug for example: https://bugzilla.suse.com/show_bug.cgi?id=1018576 Regards -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 Luiz Fernando Ranghetti <elchevive68@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbrabec@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 http://bugzilla.suse.com/show_bug.cgi?id=1026156#c1 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|ke@suse.com |yast2-maintainers@suse.de --- Comment #1 from Stanislav Brabec <sbrabec@suse.com> --- Weblate has the check built-in. But the source of the string in the bug 1018576 does not specify type of formatting, so Weblate cannot enable the correct check. https://docs.weblate.org/en/latest/user/checks.html#check-c-format The fix is easy: #: src/lib/fonts/fonts-dialog.rb:328 +#, c-format msgid "<p><b>Specimen for %s</b></p>" msgstr "" Looking at the YaST source, it is a very more generic problem: 78 of 97 pot files contain "%" character in some of its strings. But only 5 yast pot files use "c-format" keyword. Weblate is capable to enable particular check for all strings in a component, but I am not sure whether it is a good approach (configuration section Quality checks flags). It would force the format checks for all strings, idependently on a real use in the source. In some cases it can block correct translation (e. g. if the string with "%" character is not used in printf()-like context). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 http://bugzilla.suse.com/show_bug.cgi?id=1026156#c2 --- Comment #2 from Luiz Fernando Ranghetti <elchevive68@gmail.com> --- So it will be better to correct the yast code or the amount of work do not compensate the effort? Maybe we should bring yast people to think about this bug. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 http://bugzilla.suse.com/show_bug.cgi?id=1026156#c3 Karl Eichwalder <ke@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |980329, 954505 --- Comment #3 from Karl Eichwalder <ke@suse.com> --- We already have: https://bugzilla.suse.com/show_bug.cgi?id=980329 https://bugzilla.suse.com/show_bug.cgi?id=954505 It probably worth to follow up there ;-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 http://bugzilla.suse.com/show_bug.cgi?id=1026156#c4 --- Comment #4 from Stanislav Brabec <sbrabec@suse.com> --- It cannot be easily fixed on Weblate side. Without the format information, Weblate cannot decide whether it is a bug or not. For example, for printf(), "%s" is a format specifier. For puts(), "%s" are just two normal characters. In this particular case, it looks like a problem of gettext-tools not understanding ruby language: _("<p><b>Specimen for %s</b></p>") % script Tools should be able to detect that %s is a format specifier here, and generate the correct format comment. Weblate then will activate the check. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 http://bugzilla.suse.com/show_bug.cgi?id=1026156#c5 Luiz Fernando Ranghetti <elchevive68@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #5 from Luiz Fernando Ranghetti <elchevive68@gmail.com> --- Thanks for the feedback! So this bug is just a duplicate of 980329. I'll close it. *** This bug has been marked as a duplicate of bug 980329 *** -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 Bug 1026156 depends on bug 980329, which changed state. Bug 980329 Summary: gettext tools do not support Ruby http://bugzilla.suse.com/show_bug.cgi?id=980329 What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 Bug 1026156 depends on bug 980329, which changed state. Bug 980329 Summary: gettext tools do not support Ruby http://bugzilla.suse.com/show_bug.cgi?id=980329 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 Bug 1026156 depends on bug 954505, which changed state. Bug 954505 Summary: yast ruby msg extractor (xgettext) does not support format marker http://bugzilla.suse.com/show_bug.cgi?id=954505 What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1026156 Bug 1026156 depends on bug 980329, which changed state. Bug 980329 Summary: gettext tools do not support Ruby http://bugzilla.suse.com/show_bug.cgi?id=980329 What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com