Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
63139fa8
Commit
63139fa8
authored
9 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
refactor swith language in a swith_language method
parent
1cc011d7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cutecoin/core/app.py
+4
-1
4 additions, 1 deletion
src/cutecoin/core/app.py
src/cutecoin/gui/preferences.py
+5
-3
5 additions, 3 deletions
src/cutecoin/gui/preferences.py
with
9 additions
and
4 deletions
src/cutecoin/core/app.py
+
4
−
1
View file @
63139fa8
...
@@ -42,6 +42,7 @@ class Application(QObject):
...
@@ -42,6 +42,7 @@ class Application(QObject):
:param argv: The argv parameters of the call
:param argv: The argv parameters of the call
'''
'''
super
().
__init__
()
super
().
__init__
()
self
.
qapp
=
qapp
self
.
accounts
=
{}
self
.
accounts
=
{}
self
.
current_account
=
None
self
.
current_account
=
None
self
.
monitor
=
None
self
.
monitor
=
None
...
@@ -57,8 +58,10 @@ class Application(QObject):
...
@@ -57,8 +58,10 @@ class Application(QObject):
}
}
self
.
load
()
self
.
load
()
self
.
switch_language
()
translator
=
QTranslator
(
qapp
)
def
switch_language
(
self
):
translator
=
QTranslator
(
self
.
qapp
)
logging
.
debug
(
"
Loading translations
"
)
logging
.
debug
(
"
Loading translations
"
)
locale
=
self
.
preferences
[
'
lang
'
]
locale
=
self
.
preferences
[
'
lang
'
]
QLocale
.
setDefault
(
QLocale
(
locale
))
QLocale
.
setDefault
(
QLocale
(
locale
))
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/preferences.py
+
5
−
3
View file @
63139fa8
...
@@ -20,9 +20,11 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
...
@@ -20,9 +20,11 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
'''
'''
def
__init__
(
self
,
app
):
def
__init__
(
self
,
app
):
'''
"""
Constructor
Init instance
'''
:param cutecoin.core.app.Application app: Application instance
:return:
"""
super
().
__init__
()
super
().
__init__
()
self
.
setupUi
(
self
)
self
.
setupUi
(
self
)
self
.
app
=
app
self
.
app
=
app
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment