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
=== modified file 'softwarecenter/backend/weblive.py'
--- softwarecenter/backend/weblive.py 2011-03-31 11:56:54 +0000
+++ softwarecenter/backend/weblive.py 2011-05-04 02:19:23 +0000
@@ -143,7 +143,9 @@
143 if not re.match("^[A-Za-z0-9 ]*$",fullname) or len(fullname) == 0:143 if not re.match("^[A-Za-z0-9 ]*$",fullname) or len(fullname) == 0:
144 fullname='WebLive user'144 fullname='WebLive user'
145145
146 connection=self.weblive.create_user(serverid, identifier, fullname, identifier, session)146 locale=os.environ.get("LANG","None").replace("UTF-8","utf8")
147
148 connection=self.weblive.create_user(serverid, identifier, fullname, identifier, session, locale)
147 self._spawn_qtnx(connection[0], connection[1], session, identifier, identifier, wait)149 self._spawn_qtnx(connection[0], connection[1], session, identifier, identifier, wait)
148150
149 def _spawn_qtnx(self, host, port, session, username, password, wait):151 def _spawn_qtnx(self, host, port, session, username, password, wait):
150152
=== modified file 'softwarecenter/backend/weblive_pristine.py'
--- softwarecenter/backend/weblive_pristine.py 2011-04-06 23:49:53 +0000
+++ softwarecenter/backend/weblive_pristine.py 2011-05-04 02:19:23 +0000
@@ -105,7 +105,7 @@
105105
106 return reply106 return reply
107107
108 def create_user(self,serverid,username,fullname,password,session="desktop"):108 def create_user(self,serverid,username,fullname,password,session,locale):
109 query={}109 query={}
110 query['action']='create_user'110 query['action']='create_user'
111 query['serverid']=serverid111 query['serverid']=serverid
@@ -113,6 +113,7 @@
113 query['fullname']=fullname113 query['fullname']=fullname
114 query['password']=password114 query['password']=password
115 query['session']=session115 query['session']=session
116 query['locale']=locale
116 reply=self.do_query(query)117 reply=self.do_query(query)
117118
118 if type(reply['message']) != type([]):119 if type(reply['message']) != type([]):