From barbier@linuxfr.org Tue Aug 27 09:08:22 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17jg50-0005Sc-00 for po4a-dev@mail.freesoftware.fsf.org; Tue, 27 Aug 2002 09:08:22 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17jg4x-0005SQ-00 for po4a-dev@mail.freesoftware.fsf.org; Tue, 27 Aug 2002 09:08:22 -0400 Received: from zobe.linuxfr.org ([213.193.17.3]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17jg4w-0005SM-00 for po4a-dev@mail.freesoftware.fsf.org; Tue, 27 Aug 2002 09:08:18 -0400 Received: by zobe.linuxfr.org (Postfix, from userid 1015) id 57891F19E; Tue, 27 Aug 2002 15:07:18 +0200 (CEST) Date: Tue, 27 Aug 2002 15:07:18 +0200 To: po4a-dev@mail.freesoftware.fsf.org Message-ID: <20020827130718.GA25472@zobe.linuxfr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.28i From: barbier@linuxfr.org (Denis Barbier) Subject: [Po4a-dev][po-debconf] Status report Sender: po4a-dev-admin@mail.freesoftware.fsf.org Errors-To: po4a-dev-admin@mail.freesoftware.fsf.org X-BeenThere: po4a-dev@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Hi fellow developers, po-debconf is almost finished, here are some words about it, and about po4a in general. 1. Introduction ------------ My main concern is to have standardized tools for i18n/l10n so that developers don't have to spend time learning how to be fair with foreign people. Gettext does this job for programs, but other source files (documentation, data, ...) lack similar tools. Intltool is used by the GNOME project and seems to be a good candidate for becoming a standard in this area. For this reason, I send patches to intltool authors in order to add support for rfc822-compliant Debian system files. Feedback was positive, and they should be incorporated soon. When it is done, po-debconf would mainly become a wrapper for intltool scripts. 2. Debconf templates files: current i18n ------------------------------------- ==================== [ Sample templates file ] =========================== Template: debconf/showold Type: boolean Default: false Description: Show all old questions again and again? Debconf normally only asks you any given question once. Then it remembers your answer and never asks you that question again. If you prefer, debconf can ask you questions over and over again, each time you upgrade or reinstall a package that asks them. . Note that no matter what you choose here, you can see old questions again by using the dpkg-reconfigure program. Template: debconf/priority Type: select Choices: critical, high, medium, low Default: medium Description: Ignore questions with a priority less than.. Packages that use debconf for configuration prioritize the questions they might ask you. Only questions with a certain priority or higher are actually shown to you; all less important questions are skipped. . You can select the lowest priority of question you want to see: - 'critical' is for items that will probably break the system without user intervention. - 'high' is for items that don't have reasonable defaults. - 'medium' is for normal items that have reasonable defaults. - 'low' is for trivial items that have defaults that will work in the vast majority of cases. . For example, this question is of medium priority, and if your priority were already 'high' or 'critical', you wouldn't see this question. . If you are new to the Debian GNU/Linux system choose 'critical' now, so you only see the most important questions. ============================= [ End ] ==================================== Only some fields have to be translated, current list is: * Description * Choices (if template type is select or multiselect) * Default (except when template type is select, multiselect, note or boolean) Localized entries have a -ll (or -ll_LL) suffix, e.g. Choices-fr: critique, haut, moyen, bas Choices-pt_BR: crítica, alta, média, baixa 3. Drawbacks of native i18n ------------------------ This predefined list is sometimes inaccurate, some entries should not be translated (see e.g. XFree questions) whereas others should be (e.g. Default field has to be localized when answer is locale dependent). Other drawbacks: * Encoding is not specified, so problems will occur as more people are using UTF-8 fonts instead of their common locale. Next Debian installer (but not Debian packages) should ship UTF-8 encoded templates, but nobody knows how to proceed. * There is no information on last translator, and who to contact for fixes. * With large descriptions, finding changes in original text may become painful. * Master and localized templates are similar, thus developers often merge localized templates files instead of keeping them separate. 4. Debconf templates files: i18n with po-debconf --------------------------------------------- For po-debconf I chose a scheme similar to i18n of .desktop files: translatable entries are prepended with an underscore. In order to follow common rules, templates file should have been renamed into templates.in. But here is the first problem, since this filename is seen by debconf-utils tools as a translated templates file. For this reason another filename is in use: _templates. Hopefully there should be no clash then. Long fields are split into small pieces: * first line is kept alone * PO msgids are split by paragraph, and text is reformatted to remove spurious newlines ==================== [ Sample _templates file ] ========================== Template: debconf/showold Type: boolean Default: false _Description: Show all old questions again and again? Debconf normally only asks you any given question once. Then it remembers your answer and never asks you that question again. If you prefer, debconf can ask you questions over and over again, each time you upgrade or reinstall a package that asks them. . Note that no matter what you choose here, you can see old questions again by using the dpkg-reconfigure program. Template: debconf/priority Type: select _Choices: critical, high, medium, low Default: medium _Description: Ignore questions with a priority less than.. Packages that use debconf for configuration prioritize the questions they might ask you. Only questions with a certain priority or higher are actually shown to you; all less important questions are skipped. . You can select the lowest priority of question you want to see: - 'critical' is for items that will probably break the system without user intervention. - 'high' is for items that don't have reasonable defaults. - 'medium' is for normal items that have reasonable defaults. - 'low' is for trivial items that have defaults that will work in the vast majority of cases. . For example, this question is of medium priority, and if your priority were already 'high' or 'critical', you wouldn't see this question. . If you are new to the Debian GNU/Linux system choose 'critical' now, so you only see the most important questions. ============================= [ End ] ==================================== An fr.po file might look like: ====================== [ Matching fr.po file ] =========================== msgid "" msgstr "" "Project-Id-Version: templates for package: debconf 1.2.0\n" "POT-Creation-Date: 2002-08-26 14:41+0200\n" "PO-Revision-Date: 2002-08-26 15:26+0200\n" "Last-Translator: Denis Barbier \n" "Language-Team: french \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" msgid "Show all old questions again and again?" msgstr "Poser de nouveau les anciennes questions ?" msgid "" "Debconf normally only asks you any given question once. Then it " "remembers your answer and never asks you that question again. If you " "prefer, debconf can ask you questions over and over again, each time " "you upgrade or reinstall a package that asks them." msgstr "" "Normalement, debconf ne pose chaque question qu'une seule fois. " "Ensuite, il se souvient de la réponse que vous avez donnée, et ne " "repose jamais cette question. Si vous préférez, debconf peut reposer " "chaque question encore et encore, chaque fois qu'un paquet ayant " "besoin de cette réponse est installé ou mis à jour." msgid "" "Note that no matter what you choose here, you can see old questions " "again by using the dpkg-reconfigure program." msgstr "" "Notez que quel que soit votre choix ici, vous pouvez revoir la " "configuration d'un paquet avec le programme dpkg-reconfigure." msgid "critical, high, medium, low" msgstr "critique, haut, moyen, bas" ============================= [ snip ] ==================================== We need tools to: * convert templates files between native and po-debconf formats * extract translatable text into a POT file * merge _templates and *.po into templates * ease life of developers and translators by providing very high-level commands When converting to po-debconf format, package maintainer has to specify translatable entries and PO file encoding. Unless the latter is done, gettext won't be able to process PO files and final templates cannot be generated. 5. Po-debconf internals -------------------- Following programs are shipped by po-debconf: * debconf2po Convert from native to po-debconf formats. Performed only once. * debconf2pot Extract translatable text from _templates and writes templates.pot. Wrapper to intltool-extract * debconf2po-update Update existing *.po files after generating a new templates.pot. Wrapper to intltool-update * po2debconf Merge _templates and *.po files into templates. Wrapper to intltool-merge * dh_installpodebconf Debhelper script to run po2debconf when building binary packages. * TODO: po2debconf-revert Convert from po-debconf to native formats. Before looking into these programs in depth, please note that a. For some intltool operations, a POTFILES.in file is mandatory. b. As other Debian files may later use a similar i18n scheme (e.g. control file might be l10n'ed one day ;)), PO files are put in a subdirectory arbitrarily named debian/po-templates/ debconf2po: * Read templates files and generate po-templates/*.po * TODO: improve handling of fuzzy entries, they are currently ignored and should be marked as fuzzy * Generate po-templates/POTFILES.in; this file must not be deleted * Generate _templates * When done, package maintainer must a. edit _templates and check accuracy of marked entries b. fix encoding specification within po-templates/*.po (TODO: might be done automatically) c. delete old templates, templates.xx and templates.xx_XX files Otherwise dh_installdebconf will process these files. debconf2pot * Read _templates and generate po-templates/templates.pot debconf2po-update * Read po-templates/POTFILES.in * Parse files found in po-templates/POTFILES.in * Generate po-templates/templates.pot * Merge po-templates/templates.pot with existing po-templates/*.po po2debconf * Read po-templates/*.po files * Merge _templates and up to date translations, output is sent to stdout dh_installpodebconf (run from top-level directory) * If debian/_templates does not exist, do nothing * run po2debconf with adequate arguments * send output into package build directory 6. Roadmap ------- Here is my current roadmap: * Add patched intltool scripts until they are shipped by upstream * Add regression tests * Write documentation * Debianize it and send an ITP 7. Discussion ---------- All comments on this presentation are welcome. There is another intereting topic we have to consider: do we want homogeneous behaviours? In other words, do we want to require that all our po2xx and xx2po scripts follow the same naming scheme and require the same command-line arguments? Denis From Martin.Quinson@tuxfamily.org Fri Aug 30 08:33:26 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17kkxq-0000Ab-00 for po4a-dev@mail.freesoftware.fsf.org; Fri, 30 Aug 2002 08:33:26 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17kkxn-0000AP-00 for po4a-dev@mail.freesoftware.fsf.org; Fri, 30 Aug 2002 08:33:25 -0400 Received: from [131.234.77.47] (helo=localhost) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kkxn-0000AL-00 for po4a-dev@mail.freesoftware.fsf.org; Fri, 30 Aug 2002 08:33:23 -0400 Received: from mquinson by localhost with local (Exim 3.35 #1 (Debian)) id 17kkvX-0001AU-00 for ; Fri, 30 Aug 2002 14:31:03 +0200 Date: Fri, 30 Aug 2002 14:31:03 +0200 To: po4a-dev@mail.freesoftware.fsf.org Subject: Re: [Po4a-dev] Status report of po-debconf Message-ID: <20020830123103.GD3769@blaise.ens-lyon.fr> References: <20020827130718.GA25472@zobe.linuxfr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20020827130718.GA25472@zobe.linuxfr.org> User-Agent: Mutt/1.4i From: Martin Quinson Sender: po4a-dev-admin@mail.freesoftware.fsf.org Errors-To: po4a-dev-admin@mail.freesoftware.fsf.org X-BeenThere: po4a-dev@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Hy there, I'll try to keep my answer short. On Tue, Aug 27, 2002 at 03:07:18PM +0200, Denis Barbier wrote: > 5. Po-debconf internals > -------------------- > > Following programs are shipped by po-debconf: > * debconf2po > Convert from native to po-debconf formats. Performed only once. > * debconf2pot > Extract translatable text from _templates and writes templates.pot. > Wrapper to intltool-extract > * debconf2po-update > Update existing *.po files after generating a new templates.pot. > Wrapper to intltool-update > * po2debconf > Merge _templates and *.po files into templates. > Wrapper to intltool-merge > * dh_installpodebconf > Debhelper script to run po2debconf when building binary packages. > * TODO: po2debconf-revert > Convert from po-debconf to native formats. Shouldn't this be called debconf2po-revert ? (or ever better, debconf-ungettextize, see below) > Before looking into these programs in depth, please note that > a. For some intltool operations, a POTFILES.in file is mandatory. > b. As other Debian files may later use a similar i18n scheme (e.g. > control file might be l10n'ed one day ;)), PO files are put in > a subdirectory arbitrarily named debian/po-templates/ Yup, I confirm, one day, dpkg's control file *will* be i18n'ed one day. See the discution reappearing currently on debian-dpkg. I hope this time it wont turn to a flamewar. But I think that when it's done, it should be done using the po4a tools. So, I'm not sure if we should split up po files here. I mean, why to do debian/po-templates debian/po-control debian/po-??? [and by the way, debian/po-debconf is more clear that po-templates] debian/po, with a "big" po both for control and template files per language should be ok, don't you think so? > debconf2po: > * Read templates files and generate po-templates/*.po > * TODO: improve handling of fuzzy entries, they are currently ignored > and should be marked as fuzzy > * Generate po-templates/POTFILES.in; this file must not be deleted > * Generate _templates > * When done, package maintainer must > a. edit _templates and check accuracy of marked entries > b. fix encoding specification within po-templates/*.po > (TODO: might be done automatically) Or the translator may have to do that (like in xgettext). > c. delete old templates, templates.xx and templates.xx_XX files > Otherwise dh_installdebconf will process these files. So, this tool is a gettextize for debconf templates, isn't it ? If yes, its name should end with "ize", like libtoolize, gettextize, and some others. [$ ls /usr/bin/*ize gettextize glib-gettextize gvcolorize imgsize intltoolize isosize libtoolize psresize size xml-i18n-toolize] What about debconf-gettextize ? > debconf2pot > * Read _templates and generate po-templates/templates.pot > > debconf2po-update > * Read po-templates/POTFILES.in > * Parse files found in po-templates/POTFILES.in > * Generate po-templates/templates.pot > * Merge po-templates/templates.pot with existing po-templates/*.po So, it's a wrapper to debconf2pot and msgmerge, isn't ? > po2debconf > * Read po-templates/*.po files > * Merge _templates and up to date translations, output is sent > to stdout > > dh_installpodebconf (run from top-level directory) > * If debian/_templates does not exist, do nothing > * run po2debconf with adequate arguments > * send output into package build directory > > 6. Roadmap > ------- > > Here is my current roadmap: > * Add patched intltool scripts until they are shipped by upstream > * Add regression tests > * Write documentation > * Debianize it and send an ITP Why don't you want to get dh_installpodebconf integrated to dh_*, and other wrapping tools added to debconf-utils ? How do you plan to call this ? > 7. Discussion > ---------- > > All comments on this presentation are welcome. There is another intereting > topic we have to consider: do we want homogeneous behaviours? > In other words, do we want to require that all our po2xx and xx2po scripts > follow the same naming scheme and require the same command-line arguments? I guess I would like to see a multi level interface here: - intltools direct interacction - xx-[un]gettextize, xx2pot, xxpo-update, po2xx sharing if possible the same arguments. Most of them are wrapper to intl corresponding tools, aren't they ? - dh_xx: I guess, most of the developer only want to use these ones. To answer your question, yes, I'd like an homogeneous naming schem, and command line arguments, when possible. Thanks for your work, I'm currently on a conference in Germany, so I have pretty less time to look further at po4a at the moment, but I guess it'll go better soon. Bye, Mt. -- Il ne faut pas confondre « La société m'opprime » et « le système m'étrique ». --- éphéméride du 19 juin From barbier@linuxfr.org Fri Aug 30 10:07:00 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17kmQO-0001Sf-00 for po4a-dev@mail.freesoftware.fsf.org; Fri, 30 Aug 2002 10:07:00 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17kmQL-0001ST-00 for po4a-dev@mail.freesoftware.fsf.org; Fri, 30 Aug 2002 10:06:59 -0400 Received: from zobe.linuxfr.org ([213.193.17.3]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kmQK-0001SD-00 for po4a-dev@mail.freesoftware.fsf.org; Fri, 30 Aug 2002 10:06:56 -0400 Received: by zobe.linuxfr.org (Postfix, from userid 1015) id 60A23EF2F; Fri, 30 Aug 2002 16:05:45 +0200 (CEST) Date: Fri, 30 Aug 2002 16:05:45 +0200 To: po4a-dev@mail.freesoftware.fsf.org Subject: Re: [Po4a-dev] Status report of po-debconf Message-ID: <20020830140545.GA18274@zobe.linuxfr.org> References: <20020827130718.GA25472@zobe.linuxfr.org> <20020830123103.GD3769@blaise.ens-lyon.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020830123103.GD3769@blaise.ens-lyon.fr> User-Agent: Mutt/1.3.28i From: barbier@linuxfr.org (Denis Barbier) Sender: po4a-dev-admin@mail.freesoftware.fsf.org Errors-To: po4a-dev-admin@mail.freesoftware.fsf.org X-BeenThere: po4a-dev@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: On Fri, Aug 30, 2002 at 02:31:03PM +0200, Martin Quinson wrote: [...] > But I think that when it's done, it should be done using the po4a tools. So, > I'm not sure if we should split up po files here. I mean, why to do > debian/po-templates > debian/po-control > debian/po-??? > [and by the way, debian/po-debconf is more clear that po-templates] > debian/po, with a "big" po both for control and template files per language > should be ok, don't you think so? Ok, I'll give it a try. > > debconf2po: [...] > What about debconf-gettextize ? I did not want to pollute debconf namespace, but after all, why not? And ok for -ungettextize too. > > debconf2po-update > > * Read po-templates/POTFILES.in > > * Parse files found in po-templates/POTFILES.in > > * Generate po-templates/templates.pot > > * Merge po-templates/templates.pot with existing po-templates/*.po > > So, it's a wrapper to debconf2pot and msgmerge, isn't ? No, directly to intltool-update so that it does not need any argument. [...] > > Here is my current roadmap: > > * Add patched intltool scripts until they are shipped by upstream > > * Add regression tests > > * Write documentation > > * Debianize it and send an ITP > > Why don't you want to get dh_installpodebconf integrated to dh_*, and other > wrapping tools added to debconf-utils ? Don't you learn lessons? SHOW US YOUR CODE ;) This is my intention, and when this scheme is going to be used, Joey Hess could integrate these tools if he wants. > How do you plan to call this ? po-debconf ;) [...] Thanks for your comments, I will continue to improve its interface and send another report later. But note that it is near to complete, so I will certainly send an ITP next week. Denis