Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
d0a4a70d
Commit
d0a4a70d
authored
Oct 12, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load translations on start
parent
f33d34c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
__init__.py
blink/__init__.py
+16
-1
No files found.
blink/__init__.py
View file @
d0a4a70d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
os
import
os
import
sys
import
sys
from
PyQt5.QtCore
import
Qt
,
QEvent
from
PyQt5.QtCore
import
Qt
,
QEvent
,
QLocale
,
QTranslator
from
PyQt5.QtWidgets
import
QApplication
,
QMessageBox
from
PyQt5.QtWidgets
import
QApplication
,
QMessageBox
from
application
import
log
from
application
import
log
...
@@ -16,6 +16,7 @@ from sipsimple.application import SIPApplication
...
@@ -16,6 +16,7 @@ from sipsimple.application import SIPApplication
from
sipsimple.account
import
Account
,
AccountManager
,
BonjourAccount
from
sipsimple.account
import
Account
,
AccountManager
,
BonjourAccount
from
sipsimple.addressbook
import
Contact
,
Group
from
sipsimple.addressbook
import
Contact
,
Group
from
sipsimple.configuration.settings
import
SIPSimpleSettings
from
sipsimple.configuration.settings
import
SIPSimpleSettings
from
sipsimple.configuration.backend.file
import
FileBackend
from
sipsimple.payloads
import
XMLDocument
from
sipsimple.payloads
import
XMLDocument
from
sipsimple.storage
import
FileStorage
from
sipsimple.storage
import
FileStorage
from
sipsimple.threading
import
run_in_twisted_thread
from
sipsimple.threading
import
run_in_twisted_thread
...
@@ -98,6 +99,20 @@ class Blink(QApplication, metaclass=QSingleton):
...
@@ -98,6 +99,20 @@ class Blink(QApplication, metaclass=QSingleton):
self
.
first_run
=
False
self
.
first_run
=
False
self
.
reinit
=
False
self
.
reinit
=
False
translator
=
QTranslator
(
self
)
system_language
=
QLocale
.
system
()
.
name
()
.
split
(
'_'
)[
0
]
language
=
system_language
if
os
.
path
.
exists
(
ApplicationData
.
get
(
'config'
)):
pre_loaded_settings
=
FileBackend
(
ApplicationData
.
get
(
'config'
))
.
load
()
try
:
language
=
pre_loaded_settings
[
'BlinkSettings'
][
'interface'
][
'language'
]
except
KeyError
:
pass
if
language
==
'default'
:
language
=
system_language
if
translator
.
load
(
Resources
.
get
(
f
'i18n/blink_{language}'
)):
self
.
installTranslator
(
translator
)
self
.
setOrganizationDomain
(
"ag-projects.com"
)
self
.
setOrganizationDomain
(
"ag-projects.com"
)
self
.
setOrganizationName
(
"AG Projects"
)
self
.
setOrganizationName
(
"AG Projects"
)
self
.
setApplicationName
(
"Blink"
)
self
.
setApplicationName
(
"Blink"
)
...
...
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