Bugzilla:L10n:Roadmap: Difference between revisions

Jump to navigation Jump to search
→‎Generic l12y: maketext transition blueprint started
(→‎Localizable database data: database l10n described)
(→‎Generic l12y: maketext transition blueprint started)
Line 1: Line 1:
Here goes Bugzilla localizability roadmap scratchpad.  See also [[Bugzilla:Roadmap]].
Here goes Bugzilla localizability roadmap scratchpad.  See also [[Bugzilla:Roadmap]].
== Generic l12y ==
== Use Locale::Maketext ==
The idea was introduced by mkanat ({{Bug|407752}}).  If implemented, will greatly reduce localizers' workload.  However, there are some implementation obstacles.
 
=== References ===
# [http://search.cpan.org/src/DRTECH/Locale-Maketext-Lexicon-0.73/docs/webl10n.html Web localization in Perl]
# [http://search.cpan.org/dist/Locale-Maketext/lib/Locale/Maketext/TPJ13.pod Localization and Perl: gettext breaks, Maketext fixes] a.k.a. ''TPJ13''
 
=== Design considerations ===
 
There are several decisions to be made before one start hacking templates and code:
 
* Syntax for localizable texts in Perl and TT
* Lexicon format
* Directory structure
* Usage of auto lexicon entries and exceptions
* Backwards compatibility
* '''$terms.bug''' retirement
 
==== Perl syntax ====
 
'''[http://search.cpan.org/~drtech/Locale-Maketext-Lexicon-0.73/lib/Locale/Maketext/Extract/Plugin/Perl.pm#VALID_FORMATS xgettext.pl]''' already support these:
 
translate()
maketext()
gettext()
loc()
x()
_()
__()
 
Perhaps we should pick one coherent syntax.
 
==== Template Toolkit syntax ====


=== Use gettext ===
Formats supported by '''xgettext.pl''' are:
The idea was introduced by mkanat ({{Bug|407752}}). If implemented, will greatly reduce localizers' workload.  However, there are some implementation obstacles.
 
 
<nowiki>[% |l(args) %]string[% END %]
<nowiki>[% 'string' | l(args) %]
<nowiki>[% 'string' FILTER l(args) %]
<nowiki>[% l('string',args) %]
  <nowiki>[% loc('string',args) %]
</nowiki>
 
In fact, ''l'' and loc, ''|'' and ''FILTER' are synonyms.
 
First syntax has obvious advantages for large boilerplate texts which we do not want to chop in perverse ways.  However, it is too verbose for short strings and unintuitive for parametric calls.
 
==== Lexicon format ====
 
Available formats also vary:
 
* simple PM modules with explicit '''%Lexicon''' entries
* classic PO files, more convenient to localizers community because of [http://translate.sourceforge.net/wiki/toolkit/index mature tools]
* [http://search.cpan.org/dist/Locale-Maketext-Lexicon-DBI/lib/Locale/Maketext/Lexicon/DBI.pm database backend] is in progress


== Localizable database data ==
== Localizable database data ==
118

edits

Navigation menu