Merge lp:~weblive-dev/software-center/weblive-set-locale into lp:software-center

Proposed by St├ęphane Graber
Status: Merged
Merged at revision: 1766
Proposed branch: lp:~weblive-dev/software-center/weblive-set-locale
Merge into: lp:software-center
Diff against target: 35 lines (+5/-2)
2 files modified
softwarecenter/backend/weblive.py (+3/-1)
softwarecenter/backend/weblive_pristine.py (+2/-1)
To merge this branch: bzr merge lp:~weblive-dev/software-center/weblive-set-locale
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+59861@code.launchpad.net

Description of the change

Nothing fancy, just sending the current locale to the weblive daemon so it can set the user's default locale.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/backend/weblive.py'
2--- softwarecenter/backend/weblive.py 2011-03-31 11:56:54 +0000
3+++ softwarecenter/backend/weblive.py 2011-05-04 02:19:23 +0000
4@@ -143,7 +143,9 @@
5 if not re.match("^[A-Za-z0-9 ]*$",fullname) or len(fullname) == 0:
6 fullname='WebLive user'
7
8- connection=self.weblive.create_user(serverid, identifier, fullname, identifier, session)
9+ locale=os.environ.get("LANG","None").replace("UTF-8","utf8")
10+
11+ connection=self.weblive.create_user(serverid, identifier, fullname, identifier, session, locale)
12 self._spawn_qtnx(connection[0], connection[1], session, identifier, identifier, wait)
13
14 def _spawn_qtnx(self, host, port, session, username, password, wait):
15
16=== modified file 'softwarecenter/backend/weblive_pristine.py'
17--- softwarecenter/backend/weblive_pristine.py 2011-04-06 23:49:53 +0000
18+++ softwarecenter/backend/weblive_pristine.py 2011-05-04 02:19:23 +0000
19@@ -105,7 +105,7 @@
20
21 return reply
22
23- def create_user(self,serverid,username,fullname,password,session="desktop"):
24+ def create_user(self,serverid,username,fullname,password,session,locale):
25 query={}
26 query['action']='create_user'
27 query['serverid']=serverid
28@@ -113,6 +113,7 @@
29 query['fullname']=fullname
30 query['password']=password
31 query['session']=session
32+ query['locale']=locale
33 reply=self.do_query(query)
34
35 if type(reply['message']) != type([]):