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

[D-I Manual] Please check that your translation of preseed.po is complete and correct!



(BCC'ed to debian-boot@l.d.o)

During the correction of a minor error in the preconfiguration examples I 
noticed that a recently added part of a string was missing for the 
Finnish translation.

This mistake is understandable as the strings in preseed.po tend to get 
quite long which makes it hard to spot exactly what changed if a string 
is fuzzy.

I have written a simple script that does a basic sanity check to see if 
changes may have been missed. That the script is necessary and works is 
demonstrated below: both languages I tested it on (Finnish and Brazilian) 
have multiple errors! See below for annotated examples.

For XML-based translations the risk is a lot lower as doc-check does show 
individual changes, but if there is demand it should not be too hard to 
modify the script to also support .xml files.

Anyway: all translators using PO files, please run the new script for your 
language and check its output! When it shows problems, I strongly advise 
to also carefully check the surrounding text.

It would be great if the checks could be done ASAP as I'm planning a new 
upload as soon as the Spanish translation is completed (currently missing 
two files).

Cheers,
FJP

EXAMPLES
========
$ ./scripts/po-check-preseed fi
This script performs a very basic sanity check to see if nothing has
been missed in the translation of preseed.po. It does this by counting
the number of lines that start with 'd-i' or '#d-i' for both msgid and
msgstr and printing the result. It will then print a diff between the
original and translation for a visual check.


Number of original lines:   102
Number of translated lines: 98

--- /tmp/prese4iEaLE    2008-12-02 14:04:33.000000000 +0100
+++ /tmp/prese3lyGCE    2008-12-02 14:04:33.000000000 +0100
@@ -1 +1 @@
-"d-i debian-installer/locale string en_US"
+"d-i debian-installer/locale string fi_FI"
@@ -29 +29 @@
-"d-i time/zone string US/Eastern\n"
+"d-i time/zone string Europe/Helsinki\n"
@@ -31 +31 @@
-"#d-i clock-setup/ntp-server string ntp.example.com"
+"#d-i clock-setup/ntp-server string ntp.esimerkki.fi"
@@ -33 +33 @@
-"#d-i partman-auto/disk string /dev/sda\n"
+"d-i partman-auto/disk string /dev/sda\n"

Here the leading "#" is missing. This is an error!

@@ -36 +35,0 @@
-"d-i partman-md/device_remove_md boolean true\n"
@@ -40 +38,0 @@
-"#d-i partman-auto/expert_recipe string                         \\\n"

Here two examples are missing in the translation.

@@ -72 +70 @@
-"#d-i apt-setup/local0/repository string \\\n"
+"#d-i apt-setup/local0/repository string \\\\\n"

This will probably result in an (extra?) "\" being printed.

@@ -90 +87,0 @@
-"#d-i finish-install/keep-consoles boolean true\n"
@@ -93 +89,0 @@
-"#d-i debian-installer/exit/halt boolean true\n"

Two more missing examples in the translation.

@@ -102 +98 @@
-"#d-i preseed/run string foo.sh"
+"d-i preseed/run string foo.sh"

Another missing leading "#".


$ ./scripts/po-check-preseed pt_BR
Usage: po-check-preseed <language>
fjp@faramir:~/projects/d-i/trunk/manual$ ./scripts/po-check-preseed pt
This script performs a very basic sanity check to see if nothing has
been missed in the translation of preseed.po. It does this by counting
the number of lines that start with 'd-i' or '#d-i' for both msgid and
msgstr and printing the result. It will then print a diff between the
original and translation for a visual check.


Number of original lines:   102
Number of translated lines: 100

--- /tmp/preselAEnPk    2008-12-02 14:06:03.000000000 +0100
+++ /tmp/preseI5Egkl    2008-12-02 14:06:03.000000000 +0100
@@ -32,2 +31,0 @@
-"#d-i partman-auto/init_automatically_partition select biggest_free\n"
-"#d-i partman-auto/disk string /dev/sda\n"

Missing translation.

@@ -69 +67 @@
-"#d-i apt-setup/services-select multiselect security, volatile\n"
+"#d-i apt-setup/services-select multi-select security, volatile\n"

Typo "multi-select", which is invalid syntax.

@@ -88,2 +86,2 @@
-"#d-i grub-installer/password-again password r00tme\n"
-"#d-i grub-installer/password-crypted password [MD5 hash]"
+"#d-i grub-installer/password-again assword r00tme\n"
+"#d-i grub-installer/password-crypted password [hash MD5]"

Typo "assword" and in second line two words swapped (which may be valid).

@@ -93 +91 @@
-"#d-i debian-installer/exit/halt boolean true\n"
+"#d-i debian-installer/exit/halt boolean true# Isto irá desligar a 
máquina em "

Missing "\n"?

@@ -102 +100 @@
-"#d-i preseed/run string foo.sh"
+"d-i preseed/run string foo.sh"

Missing leading "#".

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: