Merge lp:~jr/bzr/i18n-install-once into lp:bzr

Proposed by Jonathan Riddell
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merged at revision: 6114
Proposed branch: lp:~jr/bzr/i18n-install-once
Merge into: lp:bzr
Diff against target: 37 lines (+5/-1)
3 files modified
bzrlib/commands.py (+1/-1)
bzrlib/i18n.py (+2/-0)
doc/en/release-notes/bzr-2.5.txt (+2/-0)
To merge this branch: bzr merge lp:~jr/bzr/i18n-install-once
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+73508@code.launchpad.net

Commit message

Do not run i18n initialisation twice.

Description of the change

Check that i18n has been initialized rather than doing it twice.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
Jonathan Riddell (jr) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/commands.py'
--- bzrlib/commands.py 2011-07-15 14:27:20 +0000
+++ bzrlib/commands.py 2011-08-31 11:10:18 +0000
@@ -465,7 +465,7 @@
465 usage help (e.g. Purpose, Usage, Options) with a465 usage help (e.g. Purpose, Usage, Options) with a
466 message explaining how to obtain full help.466 message explaining how to obtain full help.
467 """467 """
468 if self.l10n and not i18n.installed():468 if self.l10n:
469 i18n.install() # Install i18n only for get_help_text for now.469 i18n.install() # Install i18n only for get_help_text for now.
470 doc = self.help()470 doc = self.help()
471 if doc:471 if doc:
472472
=== modified file 'bzrlib/i18n.py'
--- bzrlib/i18n.py 2011-08-25 10:33:14 +0000
+++ bzrlib/i18n.py 2011-08-31 11:10:18 +0000
@@ -72,6 +72,8 @@
7272
73def install(lang=None):73def install(lang=None):
74 global _translations74 global _translations
75 if installed():
76 return
75 if lang is None:77 if lang is None:
76 lang = _get_current_locale()78 lang = _get_current_locale()
77 if lang is not None:79 if lang is not None:
7880
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- doc/en/release-notes/bzr-2.5.txt 2011-08-27 19:08:54 +0000
+++ doc/en/release-notes/bzr-2.5.txt 2011-08-31 11:10:18 +0000
@@ -111,6 +111,8 @@
111111
112* Install translation .mo files. (Jonathan Riddell)112* Install translation .mo files. (Jonathan Riddell)
113113
114* Do not run i18n initialisation twice. (Jonathan Riddell)
115
114Bug Fixes116Bug Fixes
115*********117*********
116118