Merge lp:~henninge/launchpad/bug-568355-package-name into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Henning Eggers on 2010-05-07 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 10832 |
| Proposed branch: | lp:~henninge/launchpad/bug-568355-package-name |
| Merge into: | lp:launchpad |
| Diff against target: |
402 lines (+224/-42) 2 files modified
lib/canonical/buildd/pottery/intltool.py (+72/-38) lib/lp/translations/tests/test_pottery_detect_intltool.py (+152/-4) |
| To merge this branch: | bzr merge lp:~henninge/launchpad/bug-568355-package-name |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Abel Deuring (community) | code | 2010-05-06 | Approve on 2010-05-07 |
|
Review via email:
|
|||
Commit Message
Made pottery translation domain detection smarter.
Description of the Change
= Bug 568355 =
The function "get_translatio
== Proposed fix ==
The files can be ordered into a substitution hierarchy where the bottom file may include definitions from all files above it. The old implemntation kind of did this the wrong way round. The new order of processing is:
- go through the list of config files top to bottom
- try to read the variable from that config file, store its value
- if the value contains a substitution, try to fulfill that from this file or all previous files.
- if the substitution cannot be satisfied, fail
- if the variable may also be found in the next file, keep searching
- otherwise, the search is completed.
A new feature is to search AC_INIT parameter list for the domain.
== Tests ==
The test was greatly improved to remove the necessity to create an extra tarball for each test. Also, all tarballs were moved to their own directories.
bin/text -vvt intltool
== QA ==
QA would have to done on dogfood. The package "eog" should now be processed correctly.
| Abel Deuring (adeuring) wrote : | # |
forgot a nitpick:
+ return [
+ param.strip()
+ for param in result.
I think it is sufficient to use result.
| Henning Eggers (henninge) wrote : | # |
Thank you for the review. Here is the incremental diff.

(11:11:38) adeuring: henninge: lines 51-58 of the diff change the order of locations. The doc string of the method says "This function goes through the ordered list of these possible locations, the order having been copied from intltool-update". My question: Was the old order plain wrong or did the intltools chnage. IOW: Is the new ordering always correct?
(11:12:01) adeuring: or can it be wrong for some versions of intltools?
(11:12:17) henninge: adeuring: the ordering is correct, the comment is not valid any more.
(11:12:56) adeuring: henninge: so, the old ordering was simply based on a misinterpretation of what intltools are doing?
(11:13:19) henninge: adeuring: no, the original order was taken from intltool-update
(11:14:06) henninge: adeuring: basically, what is says "use GETTEXT_PACKGE from Makefile.in.in or else from configure.ac or else from configure.in"
(11:14:15) adeuring: henninge: ok... but the substitution order changed, right?
(11:14:32) henninge: adeuring: this is now reflected in the "keep_trying" value.
(11:14:58) adeuring: henninge: ah, I see. So, can you update the comment? otherwise, r=me
(11:15:14) henninge: adeuring: yes, thanks