118
edits
m (→Template Toolkit syntax: correct nowiki) |
(Directory structure variants added) |
||
| Line 42: | Line 42: | ||
<nowiki>[% loc('string',args) %]</nowiki> | <nowiki>[% loc('string',args) %]</nowiki> | ||
In fact, | In fact, <tt>l</tt> and <tt>loc</tt>, <tt>|</tt> and <tt>FILTER</tt> 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. | 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. | ||
| Line 50: | Line 50: | ||
Available formats also vary: | Available formats also vary: | ||
* simple | * simple '''.pm''' modules with explicit <tt>%Lexicon</tt> entries | ||
* classic | * 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 | * [http://search.cpan.org/dist/Locale-Maketext-Lexicon-DBI/lib/Locale/Maketext/Lexicon/DBI.pm database backend] is in progress | ||
==== The directory structure ==== | |||
For '''.pm''' files there is no good place besides <tt>Bugzilla/L10N/<i>LANG</i>.pm</tt> | |||
; <tt>Bugzilla/L10N/<i>LANG</i>.po</tt> : Most obvious, used by many projects. | |||
; <tt>template/<i>LANG</i>/{default,custom}/*.po</tt> : Advantages: site and project level customizations possible. Drawbacks: need to iterate through multiple '''.po''' files to merge the lexicon; unneeded exposure to http server. | |||
; <tt>po/<i>LANG</i>.po</tt> : Why not create a separate dir? | |||
== Localizable database data == | == Localizable database data == | ||
edits