Merge lp:~kelemeng/ubuntu-release-upgrader/bug1072828 into lp:ubuntu-release-upgrader

Proposed by Gabor Kelemen
Status: Rejected
Rejected by: Brian Murray
Proposed branch: lp:~kelemeng/ubuntu-release-upgrader/bug1072828
Merge into: lp:ubuntu-release-upgrader
Diff against target: 18 lines (+4/-2)
1 file modified
DistUpgrade/DistUpgradeMain.py (+4/-2)
To merge this branch: bzr merge lp:~kelemeng/ubuntu-release-upgrader/bug1072828
Reviewer Review Type Date Requested Status
Brian Murray Disapprove
Review via email: mp+141496@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for working on this. My testing indicates that it is only necessary to move the gettext.textdomain() call from outside the if loop to resolve this issue, so I'll go ahead and do that. Feel free to test that though and let me know if it it misses something.

review: Disapprove
Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Yeah, because in Python there is a clever default value for localedir:
http://hg.python.org/cpython/file/2.7/Lib/gettext.py

Unmerged revisions

2605. By Gabor Kelemen

Fix the localization by taking the bindtextdomain/textdomain
calls out of 'if' branch. LP: 1072828

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'DistUpgrade/DistUpgradeMain.py'
2--- DistUpgrade/DistUpgradeMain.py 2012-10-09 16:35:12 +0000
3+++ DistUpgrade/DistUpgradeMain.py 2012-12-30 22:17:21 +0000
4@@ -209,10 +209,12 @@
5 from .DistUpgradeVersion import VERSION
6 logging.info("release-upgrader version '%s' started" % VERSION)
7 # ensure that DistUpgradeView translations are displayed
8+ localedir = "/usr/share/locale/"
9 if options.datadir is None or options.datadir == '.':
10 localedir = os.path.join(os.getcwd(), "mo")
11- gettext.bindtextdomain("ubuntu-release-upgrader", localedir)
12- gettext.textdomain("ubuntu-release-upgrader")
13+
14+ gettext.bindtextdomain("ubuntu-release-upgrader", localedir)
15+ gettext.textdomain("ubuntu-release-upgrader")
16
17 # create view and app objects
18 view = setup_view(options, config, logdir)

Subscribers

People subscribed via source and target branches