Bugzilla:L10N:Problems

Revision as of 00:13, 28 January 2008 by SnowyOwl (talk | contribs) (→‎Linguistic: inflection problems)

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

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

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

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

Other