[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

scripts/l10n/l10nspellcheck/extract_msg.pl patch for plural forms



Package: debian-installer
Severity: normal
Tags: patch

On 6/28/05, zinosat@tiscali.it <zinosat@tiscali.it> wrote:
> Hi Eddy,

> I'd like to use your script for extracting strings from the po files; there's
> still
> the problem with the path in the "*** path" string and I'm experimenting
> a
> bit to find out a good solution: you might have to make some changes.

I have clearly expressed two possible solutions to this, and adding a
hard coded path to the file is ugly.

The proposed solutions are:
- set an environment variable with the path to be added to the input
file before running the script; read that ENV and
- give the path prefix as a parameter

Running a cwd to get the output and concatenating it with the given
input file is a plain hack 'cause one must eliminate a part of it (was
/home/zinosat or something like that)

Well, all are kind of wrong; if one uses concatenation, 'cause the
input file's path is relative and one might give it as "../../some.po"
and concatenating that with the detected path is plain wrong and ugly.

> 
> I noticed that the script fails to work with some particular strings (found
> in  level2
> po files):
> 
> for example base-config.po contains this (I pasted the "de" because atm I
> have this file already open :))
> 
> . Several notes for translators:
> #. * The singular form is only there to make use of plural forms;
> #. * If package count is 0, a separate error message should be displayed.
> #. * This sentence is part of a longer paragraph, full stop is omitted here.
> #. * "${PACKAGE_COUNT}" must not be translated.
> #: ../apt-setup:308
> #, sh-format
> msgid "The Debian package management tool, apt, is now configured, and can
> install ${PACKAGE_COUNT} package"
> msgid_plural "The Debian package management tool, apt, is now configured,
> and can install ${PACKAGE_COUNT} packages"
> msgstr[0] "Der Debian Paketmanager Apt wurde konfiguriert, es können allerdings
> keine Pakete installiert werden"
> msgstr[1] "Der Debian Paketmanager Apt wurde konfiguriert und kann ${PACKAGE_COUNT}
> Pakete installieren"
> 
> could you please see if you can make your script catch this strings?
> thanx in advance
> 

The attached patch should be applied to the script
scripts/l10n/l10nspellcheck/extract_msg.pl in order to catch the
plural forms (catches also msgid and msgid_plural).

Please apply and commit the patch (commit comment: "add suport for
plural forms")

-- 
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein

Attachment: plural_forms.patch
Description: Binary data


Reply to: