Bugzilla:L10N:Problems: Difference between revisions

(→‎Fonts in charts and dependency graphs: bug 287682 pointed by Roman Pszonka)
(→‎Email notifications: official bug added)
 
(6 intermediate revisions by 2 users not shown)
Line 10: Line 10:
=== Numeric inflection ===
=== Numeric inflection ===


Currently Bugzilla templates have hardcoded provisions for English: any number not equal to 1 implies plural usage.  Example (''[http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla%2Fwebtools%2Fbugzilla%2Ftemplate%2Fen%2Fdefault%2Fadmin%2Fcomponents%2Fconfirm-delete.html.tmpl&rev=&cvsroot=%2Fcvsroot#108 admin/components/confirm-delete.html.tmpl]''):
Currently Bugzilla templates have hardcoded provisions for English: any number not equal to 1 implies plural usage.   
; Example : ''[http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla%2Fwebtools%2Fbugzilla%2Ftemplate%2Fen%2Fdefault%2Fadmin%2Fcomponents%2Fconfirm-delete.html.tmpl&rev=&cvsroot=%2Fcvsroot#108 admin/components/confirm-delete.html.tmpl]'':


<pre>
<pre>
Line 62: Line 63:
=== Grammatical gender ===
=== 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 (''[http://bugzilla-es.cvs.sourceforge.net/bugzilla-es/es_ES/2.18/default/bug/create/created.html.tmpl?view=markup#l_24 bug/create/created.html.tmpl]''):
Many languages observe grammatical gender which may affect verb inflection.  In template translation one cannot rely on ''terms.bug'' having certain gender.   
; Example 1 : Bugzilla-es ''[http://bugzilla-es.cvs.sourceforge.net/bugzilla-es/es_ES/2.18/default/global/user-error.html.tmpl?view=markup#l_118 default/global/user-error.html.tmpl]'':


<pre>
<pre>
[% PROCESS global/header.html.tmpl
  [% ELSIF error == "bugs_not_changed" %]
  title = "El $terms.Bug $id ha sido enviado"
    [% title = BLOCK %]Los [% terms.bugs %] no han cambiado[% END %]
%]
    Parece que no se ha realizado ningún cambio en los [% terms.bugs %] seleccionados.
</pre>
</pre>


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''.
This is correct until ''terms.bug'' is defined as '''bug''' or any other masculine noun.  However, with '''petición''' (request) it should read ''...las $terms.bugs seleccionadas''.
 
; Example 2 : [http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla%2Fwebtools%2Fbugzilla%2Ftemplate%2Fen%2Fdefault%2Fglobal%2Fuser-error.html.tmpl&rev=&cvsroot=%2Fcvsroot#1184 'Assembled' messages]:
 
<pre>
[% ELSIF error == "object_name_not_specified" %]
  [% type = BLOCK %][% PROCESS object_name %][% END %]
  [% title = BLOCK %][% type FILTER ucfirst FILTER html %] Not
  Specified[% END %]
  You must select/enter a [% type FILTER html %].
</pre>
 
Here ''object_name'' may be '''user''', '''component''', '''version''', '''milestone''' or '''status'''.  But nothing is done to reflect ''object_name'' gender in ''... Not Specified''.


== 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 105:
* 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 118:
; 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 ===
Line 126: Line 156:
Template replace filter is needed to translate some parts of Bugzilla's notification emails.
Template replace filter is needed to translate some parts of Bugzilla's notification emails.


; Solution :  
; Workaround :  
* [http://svn.aviary.pl/wsvn/Bugzilla/branches/3.0/template/pl/default/email/newchangedmail.txt.tmpl Bugzilla-pl example] Method of translating email notification.
* [http://svn.aviary.pl/wsvn/Bugzilla/branches/3.0/template/pl/default/email/newchangedmail.txt.tmpl Bugzilla-pl example] Method of translating email notification.


; References :
; References :
* {{bug|215210}}
* [http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/Bugzilla/Field.pm#136 Constants with field names in ''Field.pm'']
* [http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/Bugzilla/Field.pm#136 Constants with field names in ''Field.pm'']


Line 138: Line 169:
; References :
; References :
* [http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/reports.cgi#201 -All- in ''reports.cgi'']
* [http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/reports.cgi#201 -All- in ''reports.cgi'']
=== Flag types ===
Here a "magic word" '''__All__'''
; References :
* [http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/editflagtypes.cgi#188 __All__ in ''editflagtypes.cgi'']


== Other ==
== Other ==
=== Quick search ===
(From [https://bugzilla.mozilla.org/show_bug.cgi?id=426222#c3 bug 426222]) localized field values exist only in templates, fulltext database search (like quick search) does not honor localized status, resolution, etc.


=== Template versioning ===
=== Template versioning ===
Line 147: Line 188:
; References :
; References :
* {{bug|392186}}
* {{bug|392186}}
[[category:Bugzilla|L10n]][[category:L10n]]

Latest revision as of 02:52, 20 May 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

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 1
Bugzilla-es default/global/user-error.html.tmpl:
  [% ELSIF error == "bugs_not_changed" %]
    [% title = BLOCK %]Los [% terms.bugs %] no han cambiado[% END %]
    Parece que no se ha realizado ningún cambio en los [% terms.bugs %] seleccionados.

This is correct until terms.bug is defined as bug or any other masculine noun. However, with petición (request) it should read ...las $terms.bugs seleccionadas.

Example 2
'Assembled' messages:
[% ELSIF error == "object_name_not_specified" %]
  [% type = BLOCK %][% PROCESS object_name %][% END %]
  [% title = BLOCK %][% type FILTER ucfirst FILTER html %] Not 
  Specified[% END %]
  You must select/enter a [% type FILTER html %].

Here object_name may be user, component, version, milestone or status. But nothing is done to reflect object_name gender in ... Not Specified.

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.

Workaround
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

Flag types

Here a "magic word" __All__

References

Other

Quick search

(From bug 426222) localized field values exist only in templates, fulltext database search (like quick search) does not honor localized status, resolution, etc.

Template versioning

It is not easy to tell compatibility between (changed) mainstream template and localized one.

References