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

Re: [l10n] Towards a central handling of D-I translations



[Petter Reinholdtsen]
> Found it.  Bug #212921, and it is already fixed.  Time to use it, I
> guess. :)

To use it, we would need to call debconf-loadtemplate with --merge.
Here is a patch to change udpkg to do that.  This would allow us to
append translations to d-i by making an udeb with the new translations
in a template file, and adding this udeb to the udeb_include file on
the CD.

A problem with this patch is how to handle version skew between the
original text in the code udeb, and the translation udeb.  We want the
original text in the code udeb to be the authorative source, and only
append translations if the original text is the same.  One way to fix
that is to load the translation udeb first, and the code udeb after
it.  But it is hard to enforce this order.

Index: udpkg/debian/changelog
===================================================================
--- udpkg/debian/changelog	(revision 18355)
+++ udpkg/debian/changelog	(working copy)
@@ -12,6 +12,10 @@
       modern automake versions in configure.ac.
     - Replace asprintf with snprintf, in udpkg.c. Improve error messages.
       Formatting fixes.
+  * Petter Reinholdtsen
+    - Use --merge by default when calling debconf-loadtemplate, to
+      make it possible to append new translations to d-i by providing
+      udebs with only the new translations in them.
 
  -- Bastian Blank <waldi@debian.org>  Sun, 11 Apr 2004 10:32:10 +0200
 
Index: udpkg/udpkg.c
===================================================================
--- udpkg/udpkg.c	(revision 18355)
+++ udpkg/udpkg.c	(working copy)
@@ -172,7 +172,7 @@
 					di_exec_shell_log(buf);
 					
 					snprintf(buf, sizeof(buf),
-						 "debconf-loadtemplate %s %s",
+						 "debconf-loadtemplate --merge %s %s",
 						 pkg->package, buf2);
 					if (di_exec_shell_log(buf) != 0)
 						r = 1;



Reply to: