Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
FUSS
fuss-utility
Commits
fcdf02f5
Commit
fcdf02f5
authored
Nov 21, 2019
by
Paolo Dongilli
Browse files
fallback to 'it_IT.utf8' when locale is not set
parent
37bdd72f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/set-session-language
View file @
fcdf02f5
...
...
@@ -35,7 +35,10 @@ class App(tk.Frame):
)
self
.
text
.
pack
(
side
=
"top"
)
cur_loc
=
locale
.
getlocale
()
self
.
chosen_locale
.
set
(
cur_loc
[
0
]
+
'.'
+
cur_loc
[
1
])
if
cur_loc
[
0
]
is
None
or
cur_loc
[
0
]
is
None
:
self
.
chosen_locale
.
set
(
'it_IT.utf8'
)
else
:
self
.
chosen_locale
.
set
(
cur_loc
[
0
]
+
'.'
+
cur_loc
[
1
])
self
.
locale_menu
=
tk
.
OptionMenu
(
self
,
self
.
chosen_locale
,
*
self
.
locales
)
self
.
locale_menu
.
pack
(
side
=
"top"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment