| 1 |
[[meta title="DEP-1: Translation packages in Debian (TDebs)"]] |
[[!meta title="DEP-4: Translation packages in Debian (TDebs)"]] |
| 2 |
|
|
| 3 |
Date: March 2008 |
Date: March 2008 |
| 4 |
Drivers: Neil Williams <codehelp@debian.org> |
Drivers: Neil Williams <codehelp@debian.org> |
| 6 |
Thomas Viehmann <tv@beamnet.de> |
Thomas Viehmann <tv@beamnet.de> |
| 7 |
Mark Hymers <mhy@debian.org> |
Mark Hymers <mhy@debian.org> |
| 8 |
Frank Lichtenheld <djpig@debian.org> |
Frank Lichtenheld <djpig@debian.org> |
| 9 |
URL: http://people.debian.org/~codehelp/tdeb/ |
URL: http://dep.debian.net/deps/dep4/ |
| 10 |
Abstract: This document provides an overview of the TDeb format, TDeb |
Abstract: This document provides an overview of the TDeb format, TDeb |
| 11 |
design and usage. This specification should be considered as a work in |
design and usage. This specification should be considered as a work in |
| 12 |
progress. Online version: http://people.debian.org /~codehelp/tdeb |
progress. |
| 13 |
Source SGML: /~codehelp/tdeb/Draft.sgml |
Source: http://svn.debian.org/viewsvn/dep/web/deps/dep4.mdwn?view=markup |
| 14 |
|
Version 0.0.3 |
| 15 |
|
|
| 16 |
|
[[!toc levels=2]] |
| 17 |
|
|
| 18 |
|
--- |
| 19 |
|
|
| 20 |
# TDeb Specification |
# TDeb Specification |
| 21 |
|
|
| 22 |
--- |
--- |
| 23 |
|
|
| 24 |
This is where the Draft TDeb Specification, created at the ftp-master/i18n |
This is where the Draft TDeb Specification, created at the ftp-master/i18n |
| 25 |
meeting in Extremadura, will be developed and improved. |
meeting in Extremadura, will be developed and improved. |
| 26 |
|
|
| 27 |
|
--- |
| 28 |
|
|
| 29 |
## Motivation |
## Motivation |
| 30 |
|
|
| 31 |
--- |
--- |
| 32 |
|
|
| 33 |
1. Updates to translations should not require source NMU's. |
1. Updates to translations should not require source NMU's. |
| 34 |
2. Translation data should not be distributed in architecture-dependent packages. |
2. Translation data should not be distributed in architecture-dependent |
| 35 |
3. Translators should have a common interface for getting updates into Debian (possibly with automated TDeb generation after i18n team review). |
packages. |
| 36 |
|
3. Translators should have a common interface for getting updates into |
| 37 |
## Version 0.0.2 |
Debian (possibly with automated TDeb generation after i18n team review). |
| 38 |
|
|
| 39 |
## Copyright © 2008 |
## Copyright © 2008 |
| 40 |
|
|
| 45 |
* Frank Lichtenheld <email>djpig@debian.org</email>, |
* Frank Lichtenheld <email>djpig@debian.org</email>, |
| 46 |
* partially based on dpkg man pages, © by the original authors. |
* partially based on dpkg man pages, © by the original authors. |
| 47 |
|
|
| 48 |
This document is free software; you can redistribute it and/or |
This document is free software; you can redistribute it and/or |
| 49 |
modify it under the terms of the GNU General Public License as published |
modify it under the terms of the GNU General Public License as published |
| 50 |
by the Free Software Foundation; either version 2 of the License, or (at your |
by the Free Software Foundation; either version 2 of the License, or (at your |
| 51 |
option) any later version. |
option) any later version. |
| 52 |
|
|
| 53 |
For more details, on Debian GNU/Linux systems, see the file |
For more details, on Debian GNU/Linux systems, see the file |
| 54 |
/usr/share/common-licenses/GPL for the full license. |
/usr/share/common-licenses/GPL-2 for the full license. |
| 55 |
</copyright> |
|
| 56 |
|
--- |
| 57 |
|
|
| 58 |
# Format of binary translation packages (tdeb) |
# Format of binary translation packages (tdeb) |
| 59 |
|
|
| 60 |
## Summary |
## Summary |
| 61 |
The tdeb binary package format is a variation of the deb binary |
The tdeb binary package format is a variation of the deb binary |
| 62 |
package format. It has the same structure as deb, but the (single) data member |
package format. It has the same structure as deb, but the (single) data |
| 63 |
is replaced by bzip2-compressed members for each LOCALE_ROOT supported. |
member is replaced by bzip2-compressed members for each LOCALE_ROOT |
| 64 |
|
supported. |
| 65 |
|
|
| 66 |
|
## Locale-root members |
| 67 |
|
|
| 68 |
|
The new locale root data members are designed to support easier |
| 69 |
|
management of the translations, including allowing |
| 70 |
|
users to only install the translations that are needed for one |
| 71 |
|
particular installation. |
| 72 |
|
|
| 73 |
|
e.g. a standard .deb contains debian-binary, control.tar.gz and |
| 74 |
|
data.tar.gz whereas a typical TDeb could contain: |
| 75 |
|
|
| 76 |
|
$ ar -t ../pilot-qof-tdeb_0.1.7-1_all.tdeb |
| 77 |
|
debian-binary |
| 78 |
|
control.tar.gz |
| 79 |
|
t.de.tar.bz2 |
| 80 |
|
t.en.tar.bz2 |
| 81 |
|
t.fr.tar.bz2 |
| 82 |
|
t.pt.tar.bz2 |
| 83 |
|
t.ru.tar.bz2 |
| 84 |
|
t.sv.tar.bz2 |
| 85 |
|
t.vi.tar.bz2 |
| 86 |
|
|
| 87 |
|
t.pt.tar.bz2 would contain translations for pt and pt_BR: |
| 88 |
|
|
| 89 |
|
./usr/share/locale/pt/LC_MESSAGES/pilot-qof.mo |
| 90 |
|
./usr/share/locale/pt_BR/LC_MESSAGES/pilot-qof.mo |
| 91 |
|
|
| 92 |
|
This allows later tools to extract only the requested translations from |
| 93 |
|
the TDeb upon installation. |
| 94 |
|
|
| 95 |
|
TDebs are based on the .deb format, it is only a small change in the |
| 96 |
|
organisation of the data.tar.gz but it simplifies various stages of |
| 97 |
|
handling the resulting packages in the repository, in upload rules and |
| 98 |
|
in other support tools. |
| 99 |
|
|
| 100 |
|
## Use of the .tdeb suffix |
| 101 |
|
|
| 102 |
|
Various file-based tools exist to handle .deb files and it will be easier |
| 103 |
|
for such tools to be able to reliably tell the difference between a .deb |
| 104 |
|
and a .tdeb from the filename rather than having to add new support in |
| 105 |
|
the codebase to detect the absence of data.tar.gz and work out how to |
| 106 |
|
handle the t.$root.bz2 members. The suffix also makes it easier to manage |
| 107 |
|
TDebs in various repository situations. Although closely related to the |
| 108 |
|
.deb format, the .tdeb format is sufficiently different to merit a subtle |
| 109 |
|
change to the suffix in a similar manner to .udeb. |
| 110 |
|
|
| 111 |
## Format specification |
## Format specification |
| 112 |
The file is an ar archive with a magic number of !<arch>. |
The file is an ar archive with a magic number of !<arch>. |
| 113 |
|
|
| 114 |
The first member is named debian-binary and contains a series of lines, |
The first member is named debian-binary and contains a series of lines, |
| 115 |
separated by newlines. Currently only one line is present, the format |
separated by newlines. Currently only one line is present, the format |
| 116 |
version number, 2.0 at the time this manual page was written. Programs |
version number, 2.0 at the time the original dpkg manual page was written. |
| 117 |
which read new-format archives should be prepared for the minor number |
Programs which read new-format archives should be prepared for the minor |
| 118 |
to be increased and new lines to be present, and should ignore these if |
number to be increased and new lines to be present, and should ignore |
| 119 |
this is the case. |
these if this is the case. |
| 120 |
|
|
| 121 |
If the major number has changed, an incompatible change has been made |
If the major number has changed, an incompatible change has been made |
| 122 |
and the program should stop. If it has not, then the program should be |
and the program should stop. If it has not, then the program should be |
| 123 |
able to safely continue, unless it encounters an unexpected member in |
able to safely continue, unless it encounters an unexpected member in |
| 124 |
the archive (except at the end), as described below. |
the archive (except at the end), as described below. |
| 125 |
|
|
| 126 |
The second required member is named control.tar.bz2. It is a tar |
The second required member is named control.tar.bz2. It is a tar |
| 127 |
archive compressed with bzip2 which contains the package control |
archive compressed with bzip2 which contains the package control |
| 128 |
information, as a series of plain files, of which the file control |
information, as a series of plain files, of which the file control |
| 129 |
is mandatory and contains the core control information. The control |
is mandatory and contains the core control information. The control |
| 130 |
tarball may optionally contain an entry for '.', the current directory. |
tarball may optionally contain an entry for '.', the current directory. |
| 131 |
|
|
| 147 |
with something other than underscores, or will (more likely) cause the |
with something other than underscores, or will (more likely) cause the |
| 148 |
major version number to be increased. |
major version number to be increased. |
| 149 |
|
|
| 150 |
|
--- |
| 151 |
|
|
| 152 |
# Source format |
# Source format |
| 153 |
|
|
| 154 |
## +t1.diff.gz |
## +t1.diff.gz |
| 155 |
|
|
| 156 |
TDebs will use a source format for translation updates that will not |
TDebs will use a source format for translation updates that will not |
| 157 |
cause any changes in the package binaries. The foo_1.2.3-4+t1.diff.gz will be |
cause any changes in the package binaries. The foo_1.2.3-4+t1.diff.gz |
| 158 |
created for changes made by translators and tools will need to apply the |
will be created for changes made by translators and tools will need to |
| 159 |
translation diff after applying the .diff.gz prepared (and signed) by the |
apply the translation diff after applying the .diff.gz prepared |
| 160 |
Debian maintainer. |
(and signed) by the Debian maintainer. |
| 161 |
|
|
| 162 |
The +t[0-9] update will need to be built from the source package but only details |
The +t[0-9] update will need to be built from the source package but |
| 163 |
changes in the translated content. No changes will be allowed in the package |
only details changes in the translated content. No changes will be |
| 164 |
binaries or untranslated content. |
allowed in the package binaries or untranslated content. |
| 165 |
|
|
| 166 |
Translation updates are source-package based and translation updates are denoted |
Translation updates are source-package based and translation updates |
| 167 |
by the +t[0-9] suffix where 0 is assumed to be the original upload by the |
are denoted by the +t[0-9] suffix where 0 is assumed to be the original |
| 168 |
Debian maintainer. |
upload by the Debian maintainer. |
| 169 |
|
|
| 170 |
e.g. for a non-native package foo: |
e.g. for a non-native package foo: |
|
> source version 1.2.3-4, |
|
|
> the first TDeb update would be foo_1.2.3-4+t1 |
|
|
> the changes from -4 to -4+t1 will be in foo_1.2.3-4+t1.diff.gz |
|
| 171 |
|
|
| 172 |
BinNMU versions are not affected as it is |
source version 1.2.3-4, |
| 173 |
source based. |
the first TDeb update would be foo_1.2.3-4+t1 |
| 174 |
|
the changes from -4 to -4+t1 will be in foo_1.2.3-4+t1.diff.gz |
| 175 |
|
|
| 176 |
|
BinNMU versions are not affected as it is source based. |
| 177 |
|
|
| 178 |
The +t1.diff.gz needs dpkg support which is being implemented: |
The +t1.diff.gz needs dpkg support which is being implemented: |
| 179 |
|
|
| 180 |
New translations and translation fixes are currently tracked in the BTS. |
New translations and translation fixes are currently tracked in the BTS. |
| 181 |
Tdeb uploads shall be able to close those bugs. Using a changelog might be the easiest way. |
Tdeb uploads shall be able to close those bugs. Using a changelog might |
| 182 |
During the transition, those bugs will remain. After the transition, those bugs |
be the easiest way. |
| 183 |
will go away so there should be no need for a closure method. We'll need to |
|
| 184 |
rely on i18n.debian.org for translation tracking after Squeeze. |
During the transition, those bugs will remain. After the transition, |
| 185 |
|
those bugs will go away so there should be no need for a closure method. |
| 186 |
|
We'll need to rely on i18n.debian.org for translation tracking after |
| 187 |
|
Squeeze. |
| 188 |
|
|
| 189 |
|
--- |
| 190 |
|
|
| 191 |
# TDeb contents |
# TDeb contents |
| 192 |
|
|
| 193 |
## What goes into a TDeb? |
## What goes into a TDeb? |
| 194 |
|
|
| 195 |
(With the exception of debconf templates, untranslated content remains in the |
(With the exception of debconf templates, untranslated content remains |
| 196 |
original package). |
in the original package). |
| 197 |
|
|
| 198 |
* Translations from upstream -/usr/share/locale/*/LC_MESSAGES/*.mo |
* Translations from upstream -/usr/share/locale/*/LC_MESSAGES/*.mo |
| 199 |
* Other localisation files from upstream - /usr/share/locale/*/LC_*/* |
* Other localisation files from upstream - /usr/share/locale/*/LC_*/* |
| 202 |
|
|
| 203 |
* Translated manpages |
* Translated manpages |
| 204 |
* Translated info documents (if supported by info) |
* Translated info documents (if supported by info) |
| 205 |
* Translated documentation<item>With provisos that packages with |
* Translated documentation. With provisos that packages with |
| 206 |
large amounts of translated documentation and debconf templates |
large amounts of translated documentation and debconf templates |
| 207 |
would create two tdebs, one minimal tdeb for debconf and one for |
would create two tdebs, one minimal tdeb for debconf and one for |
| 208 |
the rest. |
the rest. |
| 210 |
The regular deb will need to contain a untranslated copy of the |
The regular deb will need to contain a untranslated copy of the |
| 211 |
templates file, too. See "TDebs and Debconf" below. |
templates file, too. See "TDebs and Debconf" below. |
| 212 |
|
|
| 213 |
|
# TDeb uploads |
| 214 |
|
|
| 215 |
|
## Initial uploads - +t0 |
| 216 |
|
|
| 217 |
|
The initial TDeb will be generated by the maintainer, effectively |
| 218 |
|
+t0, containing whatever translations are currently supported. The |
| 219 |
|
TDeb is uploaded alongside the binary and .dsc. It is up to the |
| 220 |
|
maintainer to incorporate any +t1.diff.gz containing updated or new |
| 221 |
|
translations that may exist already into each new Debian version. |
| 222 |
|
|
| 223 |
|
If the new version has changed translated strings then those will only |
| 224 |
|
available in English until the +t1 TDeb can be prepared. |
| 225 |
|
|
| 226 |
|
Maintainers are advised to always seek translation updates |
| 227 |
|
prior to the upload of the initial TDeb. If maintainers implement a |
| 228 |
|
string freeze and wait for translation updates before uploading, the |
| 229 |
|
chances of a +t1.diff.gz being required by time of the next release |
| 230 |
|
by the maintainer are lower. |
| 231 |
|
|
| 232 |
|
See also Timeline. |
| 233 |
|
|
| 234 |
|
Maintainers will be creating TDebs in Squeeze+1, using debian/rules, |
| 235 |
|
using debhelper calls and uploading TDebs each time they would |
| 236 |
|
currently upload any package that contains /usr/share/locale/LC_*/ etc. |
| 237 |
|
Those TDebs are, effectively, +t0 - only updates by translators start |
| 238 |
|
the +t1 sequence. |
| 239 |
|
|
| 240 |
|
Maintainer uploads (non-native package example): |
| 241 |
|
|
| 242 |
|
foo_1.2.3-4_amd64.deb |
| 243 |
|
foo-tdeb_1.2.3-4_all.tdeb |
| 244 |
|
foo-bar_1.2.3-4_amd64.deb |
| 245 |
|
foo_1.2.3-4.diff.gz |
| 246 |
|
foo_1.2.3.orig.tar.gz |
| 247 |
|
foo_1.2.3-4.dsc |
| 248 |
|
foo_1.2.3-4_amd64.changes |
| 249 |
|
|
| 250 |
|
Maintainer uploads (native package example): |
| 251 |
|
|
| 252 |
|
foo_1.2.3_amd64.deb |
| 253 |
|
foo-tdeb_1.2.3_all.tdeb |
| 254 |
|
foo-bar_1.2.3_amd64.deb |
| 255 |
|
foo_1.2.3.tar.gz |
| 256 |
|
foo_1.2.3.dsc |
| 257 |
|
foo_1.2.3_amd64.changes |
| 258 |
|
|
| 259 |
|
The foo-tdeb package will be listed in the .changes anyway so existing |
| 260 |
|
tools will simply add it to the list of files to be uploaded to |
| 261 |
|
ftp-master or wherever. foo-tdeb_1.2.3-4_all.tdeb is, effectively, |
| 262 |
|
foo-tdeb_1.2.3-4+t0_all.tdeb |
| 263 |
|
|
| 264 |
|
When the maintainer makes a new release, foo_1.2.3-5, which incorporates |
| 265 |
|
the TDeb changes, it is done in a similar manner to how an NMU is |
| 266 |
|
included. All files matching foo\*1.2.3-4\* are removed by dak when the |
| 267 |
|
new version is uploaded. The updated translations now exist in |
| 268 |
|
foo-tdeb_1.2.3-5_all.tdeb - uploaded by the maintainer and there is no |
| 269 |
|
+t1.diff.gz or +t1_all.tdeb until the package translations need to be |
| 270 |
|
touched again. |
| 271 |
|
|
| 272 |
|
## Translator updates |
| 273 |
|
|
| 274 |
|
Updates to translations will update the existing TDeb, creating |
| 275 |
|
+t2.diff.gz and +t3.diff.gz etc. All supported languages go into the |
| 276 |
|
existing TDeb, organised by locale root. |
| 277 |
|
|
| 278 |
|
Unless a package needs more than one TDeb for the debconf plus large |
| 279 |
|
amounts of translated documentation corner case, each source package |
| 280 |
|
should only expect to have one TDeb for all binary packages and all |
| 281 |
|
locales. |
| 282 |
|
|
| 283 |
|
Translation teams can work together to make uploads in a coordinated |
| 284 |
|
manner - similar to the current method of requesting deadlines for i18n |
| 285 |
|
bugs, a nominated person can collate the various translations prior to |
| 286 |
|
a deadline chosen by the teams themselves, according to the needs of |
| 287 |
|
that particular package. |
| 288 |
|
|
| 289 |
|
Translator updates of TDebs do not necessarily need to use typical |
| 290 |
|
package building tools like 'dpkg-buildpackage'. All that is needed |
| 291 |
|
is to put the .mo files into the relevant directory hierarchy (or use |
| 292 |
|
dh_gentdeb) and then call dpkg-deb --tdeb -b: |
| 293 |
|
|
| 294 |
|
dpkg-deb --tdeb -b debian/pilot-qof-tdeb ../pilot-qof-tdeb_0.1.7-1_all.tdeb |
| 295 |
|
|
| 296 |
|
This means that translators can build updated TDebs without needing the |
| 297 |
|
full dependency chain needed for a source rebuild - only dpkg (at a version |
| 298 |
|
that includes the TDeb support) is strictly necessary. |
| 299 |
|
|
| 300 |
|
Translator update uploads would contain: |
| 301 |
|
|
| 302 |
|
foo-tdeb_1.2.3-4+t1_all.tdeb |
| 303 |
|
foo_1.2.3-4+t1.diff.gz |
| 304 |
|
foo_1.2.3-4+t1.dsc |
| 305 |
|
foo_1.2.3-4+t1_all.changes |
| 306 |
|
|
| 307 |
|
The key point is that a +t1 revision can happen *during a release |
| 308 |
|
freeze* without touching the source, without changing any of the |
| 309 |
|
binaries. Once the release is out and unstable is accessible again, the |
| 310 |
|
maintainer adds +t1.diff.gz to their next upload. |
| 311 |
|
|
| 312 |
|
## dpkg source formats |
| 313 |
|
|
| 314 |
|
Format 3.0 should not be any more difficult than 1.0 or anything that |
| 315 |
|
follows. 3.0 has to deal with incorporating patches and changes from |
| 316 |
|
the Debian Bug Tracking System, so +t1.diff.gz is no different. |
| 317 |
|
|
| 318 |
|
What matters is that the maintainer gets the +t1.diff.gz and applies it |
| 319 |
|
onto the source package prior to the next upload. It's no different to |
| 320 |
|
how the same maintainer would handle a patch or new translations |
| 321 |
|
file sent to the BTS. |
| 322 |
|
|
| 323 |
|
--- |
| 324 |
|
|
| 325 |
# TDeb resources. |
# TDeb resources. |
| 326 |
|
|
| 327 |
## Packages and patches |
## Packages and patches |
| 331 |
|
|
| 332 |
Test packages are available via Emdebian: |
Test packages are available via Emdebian: |
| 333 |
|
|
| 334 |
* http://www.emdebian.org/toolchains/search.php?package=emdebian-tdeb&arch=&distro=unstable |
* <http://www.emdebian.org/toolchains/search.php?package=emdebian-tdeb&arch=&distro=unstable> |
| 335 |
* http://packages.debian.org/emdebian-tdeb |
* <http://packages.debian.org/emdebian-tdeb> |
| 336 |
* http://buildd.emdebian.org/svn/browser/current/host/trunk/emdebian-tools/trunk/tdeb |
* <http://buildd.emdebian.org/svn/browser/current/host/trunk/emdebian-grip/trunk/tdeb> |
| 337 |
* (SVN is regularly updated) |
* (SVN is regularly updated) |
| 338 |
|
|
| 339 |
Patches for current tools are handled in repositories for the relevant tools: |
Patches for current tools are handled in repositories for the relevant tools: |
| 340 |
|
|
| 341 |
* http://git.debian.org/?p=users/codehelp/debhelper.git;a=summary |
* <http://git.debian.org/?p=users/codehelp/debhelper.git;a=summary> |
| 342 |
* http://git.debian.org/?p=users/codehelp/dpkg.git;a=summary |
* <http://git.debian.org/?p=users/codehelp/dpkg.git;a=summary> |
| 343 |
|
|
| 344 |
|
--- |
| 345 |
|
|
| 346 |
# TDeb Architectures |
# TDeb Architectures |
| 347 |
|
|
| 353 |
Any translation system that does not use gettext can choose to use |
Any translation system that does not use gettext can choose to use |
| 354 |
TDebs as long as the translation files are architecture-independent. |
TDebs as long as the translation files are architecture-independent. |
| 355 |
|
|
| 356 |
|
--- |
| 357 |
|
|
| 358 |
# TDebs and LINGUAS |
# TDebs and LINGUAS |
| 359 |
|
|
| 360 |
## Avoiding changes to the source package |
## Avoiding changes to the source package |
| 372 |
will be included into the TDeb. |
will be included into the TDeb. |
| 373 |
|
|
| 374 |
Packages will no longer be able to have unactivated or unused translations. |
Packages will no longer be able to have unactivated or unused translations. |
| 375 |
(This is a debhelper / other packaging tool implementation problem, not a dpkg one) |
(This is a debhelper / other packaging tool implementation problem, not |
| 376 |
|
a dpkg one) |
| 377 |
|
|
| 378 |
As a result of this requirement, the debhelper tdeb tool (dh_gentdeb) |
As a result of this requirement, the debhelper tdeb tool (dh_gentdeb) |
| 379 |
handles finding the translations, preparing the binary translation files and moving the |
handles finding the translations, preparing the binary translation |
| 380 |
translations to suitable directories within the package build. |
files and moving the translations to suitable directories within the |
| 381 |
|
package build. |
| 382 |
##TDebs and binary packages |
|
| 383 |
|
## TDebs and binary packages |
| 384 |
The filesystem contents of TDebs and their associated binary packages must be |
|
| 385 |
mutually exclusive, so that dpkg doesn't need any special replace handling. |
The filesystem contents of TDebs and their associated binary packages |
| 386 |
We will still need some Replaces for the transition, but that can be |
must be mutually exclusive, so that dpkg doesn't need any special |
| 387 |
handled like any other Replaces. |
replace handling. We will still need some Replaces for the transition, |
| 388 |
|
but that can be handled like any other Replaces. |
| 389 |
|
|
| 390 |
## Migrating packages to TDeb support |
## Migrating packages to TDeb support |
| 391 |
|
|
| 392 |
Maintainers will need to make a variety of changes to support TDebs: |
Maintainers will need to make a variety of changes to support TDebs: |
| 393 |
|
|
| 394 |
* Replaces Add the recommended $src-tdeb package name with |
* Replaces Add the recommended $src-tdeb package name with |
| 395 |
Replaces: $binaries (<< $srcversion) |
Replaces: $binaries (<< $srcversion) |
| 396 |
where $srcversion is a fixed string for the version prior to TDebs |
where $srcversion is a fixed string for the version prior to TDebs |
| 397 |
> e.g. Replaces: apt (<< 0.7.19), apt-utils (<< 0.7.19) |
|
| 398 |
|
e.g. Replaces: apt (<< 0.7.19), apt-utils (<< 0.7.19) |
| 399 |
|
|
| 400 |
* Remove translated content from all *.install files in debian/ |
* Remove translated content from all *.install files in debian/ |
| 401 |
* Remove any lines in debian/rules that handle translated content |
* Remove any lines in debian/rules that handle translated content |
| 402 |
* Ensure that dh_gentdeb is called in debian/rules (CDBS will be |
* Ensure that dh_gentdeb is called in debian/rules (CDBS will be |
| 403 |
patched to implement this support automatically). |
patched to implement this support automatically). |
| 404 |
|
|
| 405 |
|
--- |
| 406 |
|
|
| 407 |
# Resolution of corner cases |
# Resolution of corner cases |
| 408 |
|
|
| 409 |
## TDeb documentation duplication |
## TDeb documentation duplication |
| 417 |
translations, it <strong>must</strong> have a tdeb named after the |
translations, it <strong>must</strong> have a tdeb named after the |
| 418 |
source package (suffixed with -tdeb) and all |
source package (suffixed with -tdeb) and all |
| 419 |
debconf templates must be placed in it. Such a package should place all |
debconf templates must be placed in it. Such a package should place all |
| 420 |
architecture independent documentation (even in the native language) into a tdeb. |
architecture independent documentation (even in the native language) |
| 421 |
If a package contains documentation which is not always required (for |
into a tdeb. If a package contains documentation which is not always |
| 422 |
example API documentation or user documentation), the source package |
required (for example API documentation or user documentation), the |
| 423 |
may provide additional ${source}-${foo}-tdeb_$version_all.tdeb files. |
source package may provide additional |
| 424 |
|
${source}-${foo}-tdeb_$version_all.tdeb files. |
| 425 |
|
|
| 426 |
If tdebs are revised by the translation teams, the suffix +t[0-9]+ |
If tdebs are revised by the translation teams, the suffix +t[0-9]+ |
| 427 |
must be used and all tdebs for the source package must be revised |
must be used and all tdebs for the source package must be revised |
| 428 |
at the same time. |
at the same time. |
| 429 |
|
|
| 430 |
|
--- |
| 431 |
|
|
| 432 |
# TDebs and package managers |
# TDebs and package managers |
| 433 |
|
|
| 434 |
Package managers can find out whether a package has a base tdeb by examining |
Package managers can find out whether a package has a base tdeb by examining |
| 437 |
with -tdeb appended. |
with -tdeb appended. |
| 438 |
|
|
| 439 |
In the case of Translation-Version: 1 or higher, the tdeb name is |
In the case of Translation-Version: 1 or higher, the tdeb name is |
| 440 |
${source}-tdeb_$version+t[0-9]+_all.tdeb. Additional tdebs are referenced in the |
${source}-tdeb_$version+t[0-9]+_all.tdeb. Additional tdebs are |
| 441 |
Packages file in the following way: Additional-Translations: ${source}-api-tdeb, ${source}-user-tdeb |
referenced in the Packages file in the following way: |
| 442 |
|
Additional-Translations: ${source}-api-tdeb, ${source}-user-tdeb |
| 443 |
|
|
| 444 |
In cases where a base tdeb is present, package managers *must* call |
In cases where a base tdeb is present, package managers *must* call |
| 445 |
dpkg with the tdeb and the deb in the same invocation in order to ensure that |
dpkg with the tdeb and the deb in the same invocation in order to ensure that |
| 446 |
all debconf templates can be extracted before the config script is run. |
all debconf templates can be extracted before the config script is run. |
| 449 |
tdeb merely has to be locatable by debconf which will call apt-extracttemplates |
tdeb merely has to be locatable by debconf which will call apt-extracttemplates |
| 450 |
and load the translated debconf strings into memory. See TDebs and debconf: |
and load the translated debconf strings into memory. See TDebs and debconf: |
| 451 |
|
|
| 452 |
|
--- |
| 453 |
|
|
| 454 |
# TDebs and debconf |
# TDebs and debconf |
| 455 |
|
|
| 456 |
apt-extracttemplates is used by debconf's dpkg-preconfigure to extract |
apt-extracttemplates is used by debconf's dpkg-preconfigure to extract |
| 459 |
are per-binary while tdebs are per-source. Also, the .deb should |
are per-binary while tdebs are per-source. Also, the .deb should |
| 460 |
have non-translated templates. |
have non-translated templates. |
| 461 |
|
|
| 462 |
|
--- |
| 463 |
|
|
| 464 |
# TDebs and multiple templates files |
# TDebs and multiple templates files |
| 465 |
|
|
| 466 |
If a source package builds multiple binaries that use debconf, the debian/ |
If a source package builds multiple binaries that use debconf, the debian/ |
| 469 |
will need to work together to ensure that all templates files are available to |
will need to work together to ensure that all templates files are available to |
| 470 |
debconf so that debconf can selectively load only the templates files required. |
debconf so that debconf can selectively load only the templates files required. |
| 471 |
|
|
| 472 |
|
--- |
| 473 |
|
|
| 474 |
# Tdebs and usr/share/doc |
# Tdebs and usr/share/doc |
| 475 |
|
|
| 476 |
A tdeb needs usr/share/doc/copyright and changelog.Debian and dpkg will create |
A tdeb needs usr/share/doc/copyright and changelog.Debian and dpkg will create |
| 477 |
the necessary files, just as with a normal .deb. |
the necessary files, just as with a normal .deb. |
| 478 |
|
|
| 479 |
|
--- |
| 480 |
|
|
| 481 |
# Lintian support |
# Lintian support |
| 482 |
|
|
| 483 |
## PO translations |
## PO translations |
| 484 |
|
|
| 485 |
* No source changes - The Tdeb packages should not add messages not related to a message of the |
* No source changes - The Tdeb packages should not add messages not |
| 486 |
original source package. How to check this? If there is a POT file, then it is |
related to a message of the original source package. How to check this? |
| 487 |
possible to do the comparison with the gettext msg* tools. POT file will not be |
If there is a POT file, then it is possible to do the comparison with |
| 488 |
in the tdeb, only in the main source package. When a PO file is modified, |
the gettext msg* tools. POT file will not be in the tdeb, only in the |
| 489 |
lintian can get the POT file of the same directory from the source package. |
main source package. When a PO file is modified, lintian can get the |
| 490 |
* msgfmt warnings - Modification of upstream PO files should be avoided. A warning could be produced. |
POT file of the same directory from the source package. |
| 491 |
|
* msgfmt warnings - Modification of upstream PO files should be avoided. |
| 492 |
|
A warning could be produced. |
| 493 |
* File naming rules |
* File naming rules |
| 494 |
* Location of PO files in the source package (+t1.diff.gz) |
* Location of PO files in the source package (+t1.diff.gz) |
| 495 |
* Location of mo files in the binary packages (tdeb) |
* Location of mo files in the binary packages (tdeb) |
| 498 |
* Name of the manpages in the binary packages (tdeb). An english |
* Name of the manpages in the binary packages (tdeb). An english |
| 499 |
manpage shall remain, with the same name, in the original binary package. |
manpage shall remain, with the same name, in the original binary package. |
| 500 |
|
|
| 501 |
|
--- |
| 502 |
|
|
| 503 |
# TDeb maintainers |
# TDeb maintainers |
| 504 |
|
|
| 505 |
Rather than allow repeat uploads of the same change in multiple |
Rather than allow repeat uploads of the same change in multiple |
| 506 |
languages, coordinate builds of tdebs to make a single upload with as |
languages, coordinate builds of tdebs to make a single upload with as |
| 507 |
many changes as possible at one time. Translation-Maintainers: in debian/control |
many changes as possible at one time. Translation-Maintainers: in |
| 508 |
and Localisation Assistants. |
debian/control and Localisation Assistants. |
|
|
|
|
# TDeb implementation |
|
| 509 |
|
|
| 510 |
## What needs to be done and when? |
--- |
| 511 |
|
|
| 512 |
* Archive and tools support (Squeeze) |
# TDeb implementation |
|
* Debconf translation will form the first TDebs (Squeeze + 1) |
|
|
* Native packages with program translations next |
|
|
* Non-native packages<item>with Debian maintainers who are also the upstream |
|
| 513 |
|
|
| 514 |
# Incorporation of the tdiff in the next source package |
## Incorporation of the tdiff in the next source package |
| 515 |
|
|
| 516 |
A process will be needed to help maintainers including the tdiff when they |
A process will be needed to help maintainers including the tdiff when they |
| 517 |
prepare a new source package (kind of NMU acknowledgement?) Automated so that |
prepare a new source package (kind of NMU acknowledgement?) Automated so that |
| 531 |
|
|
| 532 |
This issue can be postponed until tdebs appear for non-native packages (squeeze+1) |
This issue can be postponed until tdebs appear for non-native packages (squeeze+1) |
| 533 |
|
|
| 534 |
# L10N Infrastructure |
--- |
| 535 |
|
|
| 536 |
|
## L10N Infrastructure |
| 537 |
|
|
| 538 |
i18n.debian.net gathers the translation material from the packages. It needs |
i18n.debian.net gathers the translation material from the packages. It needs |
| 539 |
to support tdebs too (tdiff). |
to support tdebs too (tdiff). |
| 544 |
i18n.debian.net needs to help "Localisation Assistants" in gathering the new |
i18n.debian.net needs to help "Localisation Assistants" in gathering the new |
| 545 |
translations before the preparation of a new tdeb |
translations before the preparation of a new tdeb |
| 546 |
|
|
| 547 |
# Timeline |
--- |
| 548 |
|
|
| 549 |
|
## Timeline |
| 550 |
|
|
| 551 |
|
### Sequence |
| 552 |
|
|
| 553 |
|
* Archive and tools support (Squeeze) |
| 554 |
|
* Debconf translation will form the first TDebs (Squeeze + 1) |
| 555 |
|
* Native packages with program translations next |
| 556 |
|
* Non-native packages with Debian maintainers who are also the upstream |
| 557 |
|
|
| 558 |
## What needs to be done still? |
### What needs to be done for Squeeze ? |
| 559 |
|
|
| 560 |
* tdeb binary file definition - (ratification and review) |
* tdeb binary file definition - (ratification and review) |
| 561 |
* tdeb source file definition - (development and testing) |
* tdeb source file definition - (development and testing) |
| 562 |
* dpkg class support - (make it easier to selectively install translations |
* dpkg-deb and dpkg --install support - (partially implemented in git) |
| 563 |
for specific locale roots). |
|
| 564 |
* dpkg-source building support - (partially implemented in git) |
There will be no TDebs in Squeeze. |
| 565 |
|
|
| 566 |
|
### What needs to be done for Squeeze + 1? |
| 567 |
|
|
| 568 |
* debhelper support for both tdebs explicitly, and also marking files into |
* debhelper support for both tdebs explicitly, and also marking files into |
| 569 |
classes in general (partially implemented via dh_gentdeb in git) |
classes in general (partially implemented via dh_gentdeb in git) |
| 570 |
* provide a patch to cdbs for running dh_gentdeb in the right place. |
* provide a patch to cdbs for running dh_gentdeb in the right place. |
| 571 |
(Done - only remains for the patch to be filed and applied, after Lenny). |
(Done - only remains for the patch to be filed and applied). |
| 572 |
* apt/aptitude support for pulling in and removing tdebs |
* apt/aptitude support for pulling in and removing tdebs |
| 573 |
* lintian support |
* lintian support |
| 574 |
* debdiff support |
* debdiff support |
| 575 |
* devscripts support (debc) |
* devscripts support (debc) |
| 576 |
* dak support (run away, run away) run faster |
* dak support (run away, run away) run faster |
| 577 |
|
|
| 578 |
|
First generation of TDebs: |
| 579 |
|
|
| 580 |
|
* packages using debconf |
| 581 |
|
* native packages using gettext (optional) |
| 582 |
|
|
| 583 |
|
### What will be done for Squeeze + 2 or later? |
| 584 |
|
|
| 585 |
|
* dpkg class support - (make it easier to selectively install translations |
| 586 |
|
for specific locale roots). |
| 587 |
* support for packages using non-gettext translations. Packages using |
* support for packages using non-gettext translations. Packages using |
| 588 |
non-gettext mechanisms include OOo, mozilla, Qt or Java properties, menus, |
non-gettext mechanisms include OOo, mozilla, Qt or Java properties, menus, |
| 589 |
desktop.) |
desktop.) |
| 590 |
|
|
| 591 |
We do need the toolchain changes in squeeze so we can enable use |
* any remaining debconf packages not yet using TDebs |
| 592 |
of it in squeeze+1. |
* remaining native packages using gettext |
| 593 |
|
* non-native packages with a Debian maintainer on upstream team |
| 594 |
|
* starting support for non-gettext packages |
| 595 |
|
|
| 596 |
|
--- |
| 597 |
|
|
| 598 |
|
# Changes |
| 599 |
|
|
| 600 |
|
----- |
| 601 |
|
|
| 602 |
|
2009-03-08 - [Neil Williams] |
| 603 |
|
* Convert to DEP. |
| 604 |
|
|
| 605 |
|
2009-03-19 - [Neil Williams] |
| 606 |
|
* Add a table of contents via ikiwiki |
| 607 |
|
|
| 608 |
|
2009-04-14 - [Neil Williams] |
| 609 |
|
* Tweak some of the links to become active. |
| 610 |
|
* Update the URL |
| 611 |
|
* Fold in the results of the discussions so far on -devel. |