dpkg-gentdeb(1) generate Debian TDeb translation packages from source.

U.BERSICHT

dpkg-gentdeb

Copyright und Lizenz

 Copyright (C) 2007, 2011  Neil Williams <[email protected]>
 Dieses Paket ist freie Software; Sie ko.nnen es unter den Bedingungen der
 XGNU General Public LicenseX, wie sie von der XFree Software FoundationX
 entweder in Version 3 der Lizenz oder (optional) in einer spa.teren Version
 vero.ffentlicht wurde, weiterverteilen und/oder vera.ndern.
 Dieses Programm wird inder Hoffnung verteilt, dass es nu.tzlich sein wird,
 aber OHNE JEGLICHE GEWA.HRLEISTUNG, auch ohne die inbegriffene
 Gewa.hrleistung von MARKTGA.NGIGKEIT und EIGNUNG FU.R EINEN SPEZIELLEN ZWECK.
 Lesen Sie die XGNU General Public LicenseX, um weitere Einzelheiten zu
 erhalten.
 Sie sollten mit diesem Programm eine Kopie der XGNU General Public License
 erhalten haben. Falls nicht, lesen Sie <http://www.gnu.org/licenses/>.

BESCHREIBUNG

dpkg-gentdeb is a dpkg-dev add-on created by Emdebian to create translation packages (tdebs). dpkg-gentdeb is intended to separate out the individual translation files from the current Debian packages into packages without any translation files and a single TDeb package, one per source package.

Falls ein zweites TDeb von einem Quellpaket unterstu.tzt ist, muss das Paket $srcpackage-tdeb jegliche Debconf-Schablonen enthalten, die von einem der Bina.rpakete benutzt werden. Das zweite TDeb wird dann fu.r U.bersetzungen von optionalem Inhalt benutzt.

This script is intended to provide a TDeb during the normal package build, as well as supporting later calls by translation teams to update the TDeb, using a debian/$package.tdeb file.

Files to be included in a TDeb MUST be available to dpkg-gentdeb WITHOUT building the package - during a TDeb update the package can not rely on ANY of the package build-dependencies being installed, except possibly for the clean target.

Requirements of a TDeb

  • TDeb packages must be Architecture: all or the upload will be rejected automatically by ftp-master. It is not possible to override this restriction.
  • Files included in TDeb packages must not require any package build-dependencies to update and package. If the TDeb contains other Arch:all files like images or meta data files, those files must not require the use of make or other build instructions to create, update, install or package.

    "dpkg-gentdeb" will update supported translation mechanisms but the diff between the version of the package in the archive and the changes for the TDeb update must only relate to the update of the translation itself.

    The build-dependencies for the clean target might exist but this is not guaranteed.

Sobald ein Paket Dpkg-gentdeb benutzt, sollten U.bersetzungsdateien aus allen Paketen im normalen Build entfernt werden. Dies schlieβt alle u.bersetzten Handbuchseiten und anderen u.bersetzten Inhalt ein. Originaler nicht u.bersetzter Inhalt muss bestehen bleiben.

dpkg-gentdeb runs as a part of the normal package build - simply add the call to the binary-indep target of debian/rules then describe the files to be included into the TDeb in the debian/$package.tdeb file.

The tdeb diff is created by translators when updating the tdeb package. Tdeb packages should depend on the source:Version of the declared package unless the TDeb replaces an existing -data or -common package in which case the existing dependency can be retained as long as it is at least source:Version or better.

The name of the TDeb package can be specified using the -p option.

TDeb uploaders

Initially, the current mechanism of filing bugs and closing bugs with a new upload will be used for TDeb updates as well. In order for these uploads to be accepted, packages using TDebs need to define Translation-Maintainers: in debian/control (usually the debian-i18n mailing list) and Localisation Assistants (uploaders nominated by Debian who coordinate translation updates so that any one package gets a single TDeb containing multiple updated translations).

Creating a TDeb

If your package already puts translations into a -data or -common package and this package contains no other files which would be disallowed in a TDeb (i.e. files which require the package build process to create, update, install or package), then this package can be used as a TDeb.

If you need to add a new package to your source for the TDeb, create that package in debian/control as normal.

Now create a .tdeb file for that package in debian/ - e.g. if the source package is foo and the TDeb will be foo-locale, create the file debian/foo-locale.tdeb

TDeb listing in the control file
        Package: $fullname
        Architecture: all
        Priority: extra
        Section: localization
        Depends: $mainpackage (>= ${source:Version})
        XC-Package-Type: tdeb
        Description: Translations for $mainpackage (tdeb)
        $mainpackage_short_description
        .
        This package contains the translation files.

TDebs are only allowed to Depend: on the main package built from the same source package and must use a versioned dependency of equal to or greater than the source:Version. This allows TDebs to remain installed whilst new translations are being prepared, if the source package has changed the strings for translation.

Listing files for a TDeb

The .tdeb file needs to allow "dpkg-gentdeb" to locate the translation files and identify the upstream name used by the package translations. e.g. If the package uses gettext, this will be the name of the .mo files installed in /usr/share/locale/$lang/LC_MESSAGES/. Note that this must be the name used by upstream and may have no direct relation to any of the Debian packages built from this source. This name will also be used to identify and update the POT file. If the package uses multiple PO directories, list each name separately.

Translated manpages, where used, must be included in the TDeb - retaining the English manpages in the current package. List these files in the .tdeb file.

Untranslated content which complies with the requirements of a TDeb can also be listed in the .tdeb file.

Experimental QtLinguist support

Whilst it is possible to use TDebs with Qt translations, this is not currently being tested and is hindered by the translation tools being packaged in the libqt4-dev package which could be an unwelcome dependency for dpkg-gentdeb in most cases. It is possible that "dpkg-gentdeb" may support an option to enable Qt support where necessary.

The .tdeb file must then list the name of the translations files used by upstream where the normal path would be /usr/share/$NAME/translations.

 [linguistproject] project.pro

OPTIONEN

Die Standardaktion ist es, alle verfu.gbaren PO-Dateien und allen erkennbaren u.bersetzten Inhalt zu verarbeiten.

Benutzung in Debian

XC-Package-Type: tdeb needs support in Debian. Notably, many of the scripts in the devscripts package fail to identify the TDeb in the .changes file and certain debhelper scripts fail to handle the TDeb package-type.

XrepreproX beno.tigt einen Patch, um X.tdebX zu akzeptieren und in den Depot-Dateien zu erlauben:
 $ reprepro --ignore=extension -b /path/ includedeb \
 unstable ../qof-locale-sv_0.7.5-1em1_arm.tdeb
 $ ls /opt/reprepro/locale/pool/main/q/qof/
 qof-locale-sv_0.7.5-1em1_arm.deb

 Dateiname: pool/main/q/qof/qof-locale-sv_0.7.5-1em1_arm.deb
 Beschreibung: XsvX-U.bersetzung von XqofX (TDeb)
Reprepro braucht auβerdem eine Mo.glichkeit ein TDeb in einer
X.changes-DateiX zu handhaben.
 reprepro -b /opt/reprepro/locale/ include unstable ../qof_0.7.5-1em1_arm.changes
 Xqof-locale-id_0.7.5-1em1_arm.tdebX ist nicht .deb oder .udeb!
 Es sind Fehler aufgetreten!

Andere U.bersetzungen

Pakete ko.nnten auβerdem u.bersetzte Handbuchseiten und U.bersetzungen fu.r Debconf-Schablonen enthalten. Diese U.bersetzungen sind noch nicht verpackt oder von Dpkg-gentdeb verarbeitet. Damit TDebs in Debian unterstu.tzt werden, mu.ssen diese Probleme gelo.st werden, so dass Emdebian fortfahren kann, nur die Gettext-Programmu.bersetzungen zu verpacken, u.bersetzte Handbuchseiten wegzulassen und Debconf-U.bersetzungsunterstu.tzung existierenden Werkzeugen zu u.berlassen oder ausreichende A.nderungen in Cdebconf zu implementieren.

Debconf-Schablonen

Es ko.nnte no.tig sein, dass Pakete die Schablonendatei umbenennen mu.ssen und den Bezug in Xdebian/po/POTFILES.inX auf die neue Datei a.ndern. Dies fu.hrt zu einer Lintian-Warnung:

 Lintian wird nun ausgefu.hrt ...
 W: Dpkg-cross: Keine Debconf-Schablonen
 Ausfu.hrung von Lintian beendet.

Das Paket muss nun wahrscheinlich vorher von dem TDeb abha.ngen. Alternativ sollten entweder Dpkg oder Debconf ein TDeb installieren bevor versucht wird, das Hauptpaket zu konfigurieren.

Schablonendateien sind der ha.ufigste Grund fu.r Xl10nX Pakete vor der Vero.ffentlichung neu zu erstellen.