Bugzilla:L10N:Problems: Difference between revisions
(→Fonts in charts and dependency graphs: bug 287682 pointed by Roman Pszonka) |
(→UTF-8: Comment wrapping and UTF-8 length added) |
||
| Line 73: | Line 73: | ||
== UTF-8 == | == UTF-8 == | ||
=== Comment wrapping === | |||
Symptom 1: Comments are wrapped on byte length, not character length. | |||
Symptom 2: Comments not wrapped at all (Japanese) | |||
; Workaround : (to symptom 2) insert '''wrap="hard"''' to all textareas | |||
; References : | |||
* {{bug|363153}} | |||
* {{bug|388723}} | |||
=== Bug linkification === | === Bug linkification === | ||
| Line 80: | Line 91: | ||
* 12 cases in Japanese | * 12 cases in Japanese | ||
* 6 singular and 6 plural in Russian | * 6 singular and 6 plural in Russian | ||
To make things worse, Perl UTF-8 regexp matching is far from perfection. | To make things worse, Perl UTF-8 regexp matching is far from perfection. | ||
| Line 95: | Line 104: | ||
; References : | ; References : | ||
* {{bug|229010}} | * {{bug|229010}} | ||
=== Input length determined incorrectly === | |||
UTF-8 length in form fields is counted at bytes, not chars. Not fixed with {{bug|363153}}. | |||
; References : | |||
* {{bug|355994}} | |||
=== Form fields values age garbled === | === Form fields values age garbled === | ||
Revision as of 23:12, 31 January 2008
Known Bugzilla localization bugs and problems.
Problem Template
- Summary
- What's wrong
- References
- bugs
Linguistic
Numeric inflection
Currently Bugzilla templates have hardcoded provisions for English: any number not equal to 1 implies plural usage. Example (admin/components/confirm-delete.html.tmpl):
Sorry, there
[% IF comp.bug_count > 1 %]
are [% comp.bug_count %] [%+ terms.bugs %]
[% ELSE %]
is [% comp.bug_count %] [%+ terms.bug %]
[% END %]
outstanding for this component.
- Solution
- define and use function to switch between multiple forms. Example (Bugzilla-ru):
[% MACRO numeral(n, name1, name2, name5) BLOCK %]
[% n1 = n % 10 %]
[% n10 = n % 100 - n1 %]
[% IF n10 == 10 || n1 == 0 || n1 > 4 %]
[% name5 %]
[% ELSIF n1 == 1 %]
[% name1 %]
[% ELSE %]
[% name2 %]
[% END %]
[% END %]
and then [1]
Для компонента
[% numeral(comp.bug_count,
"зарегистрирована ${comp.bug_count} ${terms.bug}",
"зарегистрировано ${comp.bug_count} ${terms.bug_gen}",
"зарегистрировано ${comp.bug_count} ${terms.bugs_gen}")
FILTER html %].
It is important to note how other words are affected: while in English outstanding did not change, its Russian translation must be declined properly.
- References
- bug 412161
- bug 394516 Same problem in Mozilla
- Article about software localization
- Mozilla localization and plurals
- Summary of known plural forms rules
Grammatical gender
Many languages observe grammatical gender which may affect verb inflection. In template translation one cannot rely on terms.bug having certain gender. Example (bug/create/created.html.tmpl):
[% PROCESS global/header.html.tmpl title = "El $terms.Bug $id ha sido enviado" %]
This is correct when terms.bug is defined as bug or any other masculine noun. However, with petición (request) it should read La $terms.Bug.
UTF-8
Comment wrapping
Symptom 1: Comments are wrapped on byte length, not character length. Symptom 2: Comments not wrapped at all (Japanese)
- Workaround
- (to symptom 2) insert wrap="hard" to all textareas
- References
Bug linkification
It is not easy to write a regexp covering bug X and bug X comment Y and attachment Y observing noun inflection rules. While English uses only two cases (generic and possessive) there are:
- 14 cases in Estonian
- 12 cases in Japanese
- 6 singular and 6 plural in Russian
To make things worse, Perl UTF-8 regexp matching is far from perfection.
- References
Non-ASCII URI recognition
Since 90s DNS and HTTP support multi-byte characters in domain names and URL strings. Bugzilla should recognize them to make hyperlinks work.
- References
Input length determined incorrectly
UTF-8 length in form fields is counted at bytes, not chars. Not fixed with bug 363153.
- References
Form fields values age garbled
Fonts in charts and dependency graphs
GD::Graph builtin fonts do not include full UTF-8 glyph set. Currently Bugzilla administrators are required to install some quality fonts and refer to them in templates. As in HTML with its {Verdana,Arial} we need to evolve to some reasonable cross-platform default...
- Solution
- Bugzilla-jp example by Atsushi Shimono, using parameter for font filename.
- References
Console messages
After checksetup messages were templatized (per bug 352608) one can localize them. However, these messages are shown on console, not browser. While most environments (Linux console and xterm, Cygwin bash) support UTF-8, some others (Windows cmd.exe at least for some locales) do not.
- References
Non-localizable "Hardcoded" strings
Some of examples below are somehow translatable, but IMO normal translator does not necessarily want to fiddle with Perl/templates.
Email notifications
Template replace filter is needed to translate some parts of Bugzilla's notification emails.
- Solution
- Bugzilla-pl example Method of translating email notification.
- References
Report category values
- Field names
- The -All- value is used as a constant in Bugzilla code. This text is translatable in templates, but translating it probably breaks Bugzilla.
- References
Other
Template versioning
It is not easy to tell compatibility between (changed) mainstream template and localized one.
- References