From: poy <po...@12...> - 2008-09-06 07:09:50
|
regarding translation of the DC++ help; DC++ uses HTML Help for its help system, which is a pretty good choice over the alternative (the old WinHelp). this means, of course, that it is formed by HTML files. as for translation, the gettext library wasn't originally designed for HTML files; however, the po4a people <http://po4a.alioth.debian.org/> have written Perl scripts that extend the usage of gettext to a bunch of formats, including HTML. i have committed some ground work to integrate po4a with our help; for now, only the first step is possible, which consists of generating a .pot template file using po4a-gettextize. it's about 300 KB, i've sent it on <http://www.sendspace.com/file/o0czzb>. the next steps would be, if i understand the process correctly: - to send that dcpp-help.pot (keep it that name, or call it something else?) file on Launchpad; - to create wrappers around po4a-translate that create new HTML files based on translated .po files; - to have the help SCons script copy these translated files in a temp directory, so it can build a translated compiled CHM file; - to create wrappers around po4a-updatepo to update these .po files when our HTML files change. i'd like to know if my thinking is correct before going further... on po4a installation, i assume it is straight-forward on nix systems; i installed it on Windows using Cygwin, only had 1 change to do: had to replace all occurences of "::" by "." in po/pod.cfg. i also added a few batch files in Cygwin/bin with the same names as the po4a programs (eg "po4a-gettextize.bat" for "po4a-gettextize"), so that they can be called from outside the Cygwin Shell, each batch file containing: @echo off bash --login -i -c "cd '%CD%'" bash -c '%0 %*' echo on poy |
From: Jacek S. <arn...@gm...> - 2008-09-09 14:08:00
|
> as for translation, the gettext library wasn't originally designed for HTML > files; however, the po4a people <http://po4a.alioth.debian.org/> have > written Perl scripts that extend the usage of gettext to a bunch of formats, > including HTML. Sounds reasonable > i have committed some ground work to integrate po4a with our help; for now, > only the first step is possible, which consists of generating a .pot > template file using po4a-gettextize. it's about 300 KB, i've sent it on > <http://www.sendspace.com/file/o0czzb>. > the next steps would be, if i understand the process correctly: > - to send that dcpp-help.pot (keep it that name, or call it something else?) > file on Launchpad; keep name > - to create wrappers around po4a-translate that create new HTML files based > on translated .po files; ok > - to have the help SCons script copy these translated files in a temp > directory, so it can build a translated compiled CHM file; that would be the build directory...I guess the correct way would be to define a builder like it's done for the other translations > - to create wrappers around po4a-updatepo to update these .po files when our > HTML files change. yes - same as with the other files, only build them when scons i18n is enabled... > i'd like to know if my thinking is correct before going further... > Hm, one thing to check is that the build doesn't fail if the scripts are missing... > on po4a installation, i assume it is straight-forward on nix systems; i > installed it on Windows using Cygwin, only had 1 change to do: had to > replace all occurences of "::" by "." in po/pod.cfg. > i also added a few batch files in Cygwin/bin with the same names as the po4a > programs (eg "po4a-gettextize.bat" for "po4a-gettextize"), so that they can > be called from outside the Cygwin Shell, each batch file containing: > @echo off > bash --login -i -c "cd '%CD%'" > bash -c '%0 %*' > echo on > Maybe it works with activeperl? (for people that want to avoid cygwin) > poy |
From: poy <po...@12...> - 2008-09-13 21:04:58
Attachments:
patch.patch
|
> i've uploaded a first dcpp-help.pot file created with rev 1142 of DC++ and > po4a 0.34. it is in the "import queue" currently, we'll see how it goes... it's in now, and some people have already started translating it. attached is a patch for win32/WinUtil.cpp to have DC++ find the correct help file depending on the language; i had to add a few quirks for when the selected language is "Default", represented by an empty setting value. localized help files go to "locale/[language]/help/DCPlusPlus.chm", is it ok? poy |
From: poy <po...@12...> - 2008-09-10 07:58:04
|
i've uploaded a first dcpp-help.pot file created with rev 1142 of DC++ and po4a 0.34. it is in the "import queue" currently, we'll see how it goes... > Hm, one thing to check is that the build doesn't fail if the scripts are > missing... it shouldn't fail, it should just silently skip the i18n part. i use the SCons WhereIs command which checks for the presence of an executable in PATH. poy |