summaryrefslogtreecommitdiff
path: root/doc/patchqueue
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-12-29 04:38:40 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-12-29 04:38:40 +0000
commit912521ef0711204965aa2319d41c7741bd3f4f4c (patch)
treeb0a3d21ddfc0b7ca4a8deaa26135d7c3309d3471 /doc/patchqueue
parentd05d052bff599327cf43b6f00e337197f1d2ab18 (diff)
* Initial work on internationalization of the program code. po/ikiwiki.pot
is available for translation. * Export gettext() from IkiWiki module.
Diffstat (limited to 'doc/patchqueue')
-rw-r--r--doc/patchqueue/l10n.mdwn48
1 files changed, 6 insertions, 42 deletions
diff --git a/doc/patchqueue/l10n.mdwn b/doc/patchqueue/l10n.mdwn
index 85e4f21e2..3369bec11 100644
--- a/doc/patchqueue/l10n.mdwn
+++ b/doc/patchqueue/l10n.mdwn
@@ -22,13 +22,6 @@ I've revised the patches (tested OK):
However...
-> There are two places in IkiWiki, subject to localization: HTML::Template
-
-Unfortunately this is not correct. There a few (?) exceptional places, for
-example button texts in CGI.pm:
-
- my @buttons=("Save Page", "Preview", "Cancel");
-
> fine. Also a final note, I haven't examined the quality of generated
> templates yet.
@@ -55,43 +48,14 @@ Birisi[1], ki muhtemelen bu sizsiniz, <TMPL_VAR WIKINAME>[2] üzerindeki
bulundu. Parola: <TMPL_VAR USER_PASSWORD> -- ikiwiki [1] Parolayı isteyen
kullanıcının ait IP adresi: <TMPL_VAR REMOTE_ADDR>[2] <TMPL_VAR WIKIURL>
-----
-
-> Unfortunately this is not correct. There a few (?) exceptional places, for
-> example button texts in CGI.pm:
->
-> my @buttons=("Save Page", "Preview", "Cancel");
-
-Hmm, I've thought on this issue. Using Locale::gettext seems to be the
-natural solution. But this would need to create another po file and also,
-ikiwiki would depend another Perl module. Kinda overkill...
-
-I have another idea... What about to create another (flat) template file
-for this sort of strings? Something like strings.tmpl with the content:
-
- Save Page, Preview, Cancel
-
-or we could categorize these strings in some variables (',' is the
-delimiter for this code snippet):
-
- <TMPL_IF NAME="BUTTONS">
- Save Page, Preview, Cancel
- </TMPL_IF>
-
-and then (preferably in a separate wrapper function in CGI.pm):
-
- my $template=template("strings.tmpl");
- $template->param("BUTTONS", 1);
- my @buttons=split(/\s*,\s*/, $template->output);
-
-You get the idea... I've tried this method. All in one po file, kind of
-ugly, but it _really_ works.
-
-> > fine. Also a final note, I haven't examined the quality of generated
-> > templates yet.
->
> Looks like, tmpl_process3 cannot preserve line breaks in template files.
> For example, it processed the following template:
This could be easily worked around in tmpl_process3, but I wouldn't like to
maintain a separate utility.
+
+----
+
+As to the hardcoded strings in ikiwiki, I've internationalized the program,
+and there is a po/ikiwiki.pot in the source that can be translated.
+--[[Joey]]