|
Bugzilla – Full Text Bug Listing |
| Summary: | Weblate doesn't check for wrong "%s" variable | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Luiz Fernando Ranghetti <elchevive68> |
| Component: | Translations | Assignee: | E-mail List <yast2-maintainers> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Karl Eichwalder <ke> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | sbrabec |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Bug Depends on: | 954505, 980329 | ||
| Bug Blocks: | |||
|
Description
Luiz Fernando Ranghetti
2017-02-20 13:35:30 UTC
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). 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. 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 ;-) 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.
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 *** |