X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=best-pkging-practices.dbk;h=575a80fc3f9e7d66a799e7d210a53de0b6985671;hb=56cd6fef2c67789bd0d9e681bf86741fb727ac01;hp=08a425da6a71ab90514be5200136b5639d7acea5;hpb=81c0e6409c7dfef4af519821a76dbfadb7dd4758;p=developers-reference.git
diff --git a/best-pkging-practices.dbk b/best-pkging-practices.dbk
index 08a425d..575a80f 100644
--- a/best-pkging-practices.dbk
+++ b/best-pkging-practices.dbk
@@ -830,128 +830,62 @@ If you don't do so, the whole template will not be translated as long as a
translator will send you an update.
-To unfuzzy translations, you can use two methods. The first
-method does preventive search and replace actions in the
-PO files. The latter uses gettext utilities to unfuzzy
-strings.
-
-
-Preventive unfuzzy method:
+To unfuzzy translations, you can use
+msguntypot (part of the po4a package).
-Try finding a complete translation file before
-the change:
-
-for i in debian/po/*po; do echo -n $i: ; msgfmt -o /dev/null --statistics $i; done
-
-The file only showing translated items will be used
-as the reference file. If there is none (which should not happen if you take
-care to properly interact with translators), you should use the file
-with the most translated strings.
-
-
-
-
-Identify the needed change. In this example, let's assume the change is about
-fixing a typo in the word typo which was inadvertently
-written as tpyo. Therefore, the change is
-s/tpyo/typo.
-
-
-
-
-Check that this change is only applied to the place where you really intend
-to make it and not in any other place
-where the original string is appropriate. This specifically applies to
-change in punctuation, for instance.
-
-
-
-
-Modify all PO files by using sed. The use of that command
-is recommended over any text editor to guarantee that the files encoding will
-not be broken by the edit action:
-
-
-cd debian/po
-for i in *.po; do sed -i 's/tpyo/typo/g' $i; done
-
-
-
-
-Change the debconf template file to fix the typo.
+Regenerate the POT and PO files.
+debconf-updatepo
-Run debconf-updatepo.
+Make a copy of the POT file.
+cp templates.pot templates.pot.orig
-Check the foo.po reference file. Its statistics should
-not be changed:
+Make a copy of all the PO files.
-
-msgfmt -o /dev/null --statistics debian/po/foo.po
-
+mkdir po_fridge; cp *.po po_fridge
-If the file's statistics changed, you did something wrong. Try again
-or ask for help on the &email-debian-i18n; mailing list.
+Change the debconf template files to fix the typos.
-
-
-Gettext utilities method:
-
-
-Put all incomplete PO files out of the way. You can check the completeness by
-using (needs the gettext package
-installed):
+Regenerate the POT and PO files (again).
-for i in debian/po/*po; do echo -n $i: ; msgfmt -o /dev/null --statistics $i; done
-
-
+debconf-updatepo
-Move all files which report either fuzzy strings to a temporary place. Files
-which report no fuzzy strings (only translated and untranslated) will be kept
-in place.
+At this point, the typo fix fuzzied all the translations, and this
+unfortunate change is the only one between the PO files of your main
+directory and the one from the fridge. Here is how to solve this.
-Now and now only, modify the template for
-the typos and check again that translation are not impacted (typos, spelling
-errors, sometimes typographical corrections are usually OK).
+Discard fuzzy translation, restore the ones from the fridge.
+cp po_fridge/*.po .
-Run debconf-updatepo. This will fuzzy all strings you
-modified in translations. You can see this by running the above again.
+Manually merge the PO files with the new POT file, but taking the useless fuzzy into account.
+msguntypot -o templates.pot.orig -n templates.pot *.po
-Use the following command:
-
-for i in debian/po/*po; do msgattrib --output-file=$i --clear-fuzzy $i; done
-
-
-
-Move back to debian/po the files which showed fuzzy strings in the first step.
-
-
-
-
-Run debconf-updatepo again.
+Clean up.
+rm -rf templates.pot.orig po_fridge
@@ -1117,7 +1051,7 @@ description is in the Description: line of the template.
The short description should be kept short (50 characters or so) so that it may
-be accomodated by most debconf interfaces. Keeping it short also helps
+be accommodated by most debconf interfaces. Keeping it short also helps
translators, as usually translations tend to end up being longer than the
original.
@@ -1224,7 +1158,7 @@ strongly discouraged.
The short description should be phrased in the form of a question which should
be kept short and should generally end with a question mark. Terse writing
style is permitted and even encouraged if the question is rather long (remember
-that translations are often longer than original versions)
+that translations are often longer than original versions).
@@ -1350,7 +1284,7 @@ translated.
If the default value may vary depending on language/country (for instance the
default value for a language choice), consider using the special _Default
type documented in po-debconf
-7 ).
+7 .
@@ -1362,7 +1296,7 @@ type documented in po-debconf
Internationalization
This section contains global information for developers to make translators'
-life easier. More information for translators and developers interrested
+life easier. More information for translators and developers interested
in internationalization are available in the Internationalisation and localisation in Debian
documentation.
@@ -1670,10 +1604,17 @@ your short description. If you are looking for examples, just run:
apt-cache search .|grep dummy or
apt-cache search .|grep transitional.
+
+Also, it is recommended to adjust its section to
+oldlibs
+and its priority to
+extra
+in order to ease deborphan's job.
+
-Best practices for .orig.tar.{gz,bz2,lzma} files
+Best practices for .orig.tar.{gz,bz2,xz} files
There are two kinds of original source tarballs: Pristine source and repackaged
upstream source.
@@ -1682,7 +1623,7 @@ upstream source.
Pristine source
The defining characteristic of a pristine source tarball is that the
-.orig.tar.{gz,bz2,lzma} file is byte-for-byte identical to a tarball officially
+.orig.tar.{gz,bz2,xz} file is byte-for-byte identical to a tarball officially
distributed by the upstream author. We cannot prevent
upstream authors from changing the tarball they distribute without also
incrementing the version number, so there can be no guarantee that a pristine
@@ -1692,7 +1633,7 @@ identical to something that upstream once did distribute.
If a difference arises later (say, if upstream notices that he wasn't using
maximal compression in his original distribution and then
re-gzips it), that's just too bad. Since there is no good
-way to upload a new .orig.tar.{gz,bz2,lzma} for the same version, there is not even any
+way to upload a new .orig.tar.{gz,bz2,xz} for the same version, there is not even any
point in treating this situation as a bug. This makes it
possible to use checksums to easily verify that all changes between Debian's
version and upstream's are contained in the Debian diff. Also, if the original
@@ -1746,17 +1687,17 @@ gzipped tar at all, or if upstream's tarball contains non-DFSG-free material
that you must remove before uploading.
-In these cases the developer must construct a suitable .orig.tar.{gz,bz2,lzma}
+In these cases the developer must construct a suitable .orig.tar.{gz,bz2,xz}
file himself. We refer to such a tarball as a repackaged upstream
source. Note that a repackaged upstream source is different from a
Debian-native package. A repackaged source still comes with Debian-specific
-changes in a separate .diff.gz or .debian.tar.{gz,bz2,lzma}
+changes in a separate .diff.gz or .debian.tar.{gz,bz2,xz}
and still has a version number composed of upstream-version and
debian-version.
There may be cases where it is desirable to repackage the source even though
-upstream distributes a .tar.{gz,bz2,lzma} that could in principle be
+upstream distributes a .tar.{gz,bz2,xz} that could in principle be
used in its pristine form. The most obvious is if
significant space savings can be achieved by recompressing
the tar archive or by removing genuinely useless cruft from the upstream
@@ -1764,7 +1705,7 @@ archive. Use your own discretion here, but be prepared to defend your decision
if you repackage source that could have been pristine.
-A repackaged .orig.tar.{gz,bz2,lzma}
+A repackaged .orig.tar.{gz,bz2,xz}
@@ -1897,6 +1838,33 @@ debugging symbols for, and this dependency should be versioned. For example:
Depends: libfoo (= ${binary:Version})
+