]> git.donarmstrong.com Git - debhelper.git/commitdiff
r351: * dh_installdebconf: Automatically merge localized template
authorjoey <joey>
Fri, 19 May 2000 22:01:35 +0000 (22:01 +0000)
committerjoey <joey>
Fri, 19 May 2000 22:01:35 +0000 (22:01 +0000)
     files. If you use this feature, you should build-depend on
     debconf-utils to get debconf-mergetemplate.

debian/changelog
dh_installdebconf
dh_installdebconf.1

index 31dde712c30f94de001c6767514f8e30ea15e9ef..100912981aca524123cb24ef889726c72d770b22 100644 (file)
@@ -1,3 +1,11 @@
+debhelper (2.0.98) unstable; urgency=low
+
+  * dh_installdebconf: Automatically merge localized template
+    files. If you use this feature, you should build-depend on
+    debconf-utils to get debconf-mergetemplate.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 19 May 2000 14:24:24 -0700
+
 debhelper (2.0.97) unstable; urgency=low
 
   * dh_installinfo: changed test to see if an info file is the head file to
index 03ac235775669b5566c21e3db8deae0d6b216f63..82d69d017d49de67a7cf34ceb7d2a335eafb8c8e 100755 (executable)
@@ -20,8 +20,17 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        }
        
        if ($templates ne '') {
-               doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
-                    $templates, "$TMP/DEBIAN/templates");
+               # Are there translated templates too?
+               my @trans=glob("$templates.??");
+               if (@trans) {
+                       complex_doit("debconf-mergetemplate @trans $templates > $TMP/DEBIAN/templates");
+                       chmod 0644, "$TMP/DEBIAN/templates";
+                       chown 0, 0, "$TMP/DEBIAN/templates";
+               }
+               else {
+                       doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
+                            $templates, "$TMP/DEBIAN/templates");
+               }
        }
 
        if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
index 176d61aaf3f93d0dbe1fc2985fc28ac1d8fa9220..b423679cc42454402b409dda6e3e18a6d3656d4f 100644 (file)
@@ -20,6 +20,23 @@ For the first first binary package listed in the control file, you may use
 debian/config and debian/templates instead.
 .P
 Note that if you use debconf, your package probably needs to depend on it.
+.SH "LOCALIZED TEMPLATE FILES"
+Debconf also supports localized template files, and this program has some
+support to aid working with them. You may find it easiest to keep the
+translations in separate files, and merge them only at build time. See
+.BR debconf-mergetemplate (1)
+for details.
+.P
+This program will automatically call 
+.BR debconf-mergetemplate (1)
+and merge templates on the fly if it finds your template files are accompnied
+by translated files that have the same name as the template file, with a
+dot and two letters prepended.
+.P
+For example, if you have a German translation,
+debian/templates.de is merged with debian/templates.
+.P
+If you use this feature, your package should build-depend on debconf-utils.
 .SH OPTIONS
 .TP
 .B debhelper options