Merge lp:~seb128/pkgbinarymangler/smallfixes into lp:ubuntu/precise/pkgbinarymangler

Proposed by Sebastien Bacher on 2012-01-05
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~seb128/pkgbinarymangler/smallfixes
Merge into: lp:ubuntu/precise/pkgbinarymangler
Diff against target: 26 lines (+15/-1)
1 file modified
dh_translations (+15/-1)
To merge this branch: bzr merge lp:~seb128/pkgbinarymangler/smallfixes
Reviewer Review Type Date Requested Status
Martin Pitt 2012-01-05 Approve on 2012-01-05
Review via email: mp+87602@code.launchpad.net

This proposal supersedes a proposal from 2012-01-05.

Description of the Change

  dh_translations:

  - close the correct file in the configure.ac case
  - try using configure.in after configure.ac, those are still common
  - get the gettext domain from config.h if possible, the configure.ac can use
  variables and reading from it would give the wrong value

using config.h should handle cases where configure.ac has GETTEXT_DOMAIN="$PACKAGE" (gdk-pixbuf for example)

To post a comment you must log in.
Martin Pitt (pitti) wrote :

Looks good, please go ahead and merge with a changelog.

review: Approve
Sebastien Bacher (seb128) wrote :

there was a small error in the config.h regexp, fixed that, added the changelog and merging in trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dh_translations'
2--- dh_translations 2011-10-26 07:49:19 +0000
3+++ dh_translations 2012-01-05 12:00:39 +0000
4@@ -56,7 +56,21 @@
5
6 $domain = $1 if /^GETTEXT_PACKAGE\s*=\s*(\S*)/;
7 }
8- close (MAKEFILE);
9+ close (CFGFILE);
10+ }
11+ if (!$domain && open CFGFILE, 'configure.in') {
12+ while (<CFGFILE>) {
13+ $use_intltool = 1 if /INTLTOOL/;
14+
15+ $domain = $1 if /^GETTEXT_PACKAGE\s*=\s*(\S*)/;
16+ }
17+ close (CFGFILE);
18+ }
19+ if (open CFGFILE, 'config.h') {
20+ while (<CFGFILE>) {
21+ $domain = $1 if /^GETTEXT_PACKAGE\s*=\s*(\S*)/;
22+ }
23+ close (CFGFILE);
24 }
25 if (!$domain && open CFGFILE, 'setup.cfg') {
26 while (<CFGFILE>) {

Subscribers

People subscribed via source and target branches