Merge lp:~dedeco/bzr-explorer/fix-948268 into lp:bzr-explorer

Proposed by Dedeco
Status: Superseded
Proposed branch: lp:~dedeco/bzr-explorer/fix-948268
Merge into: lp:bzr-explorer
Diff against target: 29 lines (+9/-8)
1 file modified
lib/i18n.py (+9/-8)
To merge this branch: bzr merge lp:~dedeco/bzr-explorer/fix-948268
Reviewer Review Type Date Requested Status
Bazaar Explorer Developers Pending
Review via email: mp+96426@code.launchpad.net

This proposal has been superseded by a proposal from 2012-03-15.

Commit message

Prefer language in configuration before enviroment variables. Fixes bug #948268.

Description of the change

To post a comment you must log in.
Revision history for this message
Alexander Belchenko (bialix) wrote :

The actual change looks good enough for me. But why did you change the identation of the surrounding code? It's a bad idea to arbitrary change identation or formatting in open source projects. Furthermore, in bzr-explorer, qbzr, we're trying to follow recommendations of PEP-8 for python syntax, e.g. use 4 spaces for identation.

I'm inclined to merge only relevant part of you patch and revert other changes.

Revision history for this message
Alexander Belchenko (bialix) wrote :

OK, I see, you have changed spaces to tabs. That's also bad: we use only spaces for identation.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Also, please use `bzr commit --fixes lp:NNNN` if you want to mark revision as if it supposed to fix the corresponding bug number. It's also available in GUI qcommit under "Fixed bugs" checkbox.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Don't use tags for this purpose, please.

Revision history for this message
Dedeco (dedeco) wrote :

All right. :)

I'll have these in mind next times.

For the indentation, I used the "standard" 8 spaces tabs, and soft indentation in 4 space stops (in other words, tabs as much as possible, some spaces if needed). So in any editor that tabs are equal to 8 spaces, visual formating would be correct.

lp:~dedeco/bzr-explorer/fix-948268 updated
553. By Dedeco

Changing tabs to spaces.

Unmerged revisions

553. By Dedeco

Changing tabs to spaces.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/i18n.py'
2--- lib/i18n.py 2010-08-04 09:10:43 +0000
3+++ lib/i18n.py 2012-03-07 18:46:23 +0000
4@@ -84,16 +84,17 @@
5
6
7 def get_current_locale():
8- if not os.environ.get('LANGUAGE'):
9- from bzrlib import config
10- lang = config.GlobalConfig().get_user_option('language')
11- if lang:
12- os.environ['LANGUAGE'] = lang
13- return lang
14+ from bzrlib import config
15+ lang = config.GlobalConfig().get_user_option('language')
16+ if lang:
17+ os.environ['LANGUAGE'] = lang
18+ return lang
19+
20 if sys.platform == 'win32':
21- _check_win32_locale()
22+ _check_win32_locale()
23+
24 for i in ('LANGUAGE','LC_ALL','LC_MESSAGES','LANG'):
25- lang = os.environ.get(i)
26+ lang = os.environ.get(i)
27 if lang:
28 return lang
29 return None

Subscribers

People subscribed via source and target branches