Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
pulsatingscience
Commits
55a5feab
Commit
55a5feab
authored
Feb 06, 2009
by
Oliver Bock
Browse files
Added automatic internationalization
* Supported languages: en de
parent
2d6fc521
Changes
5
Show whitespace changes
Inline
Side-by-side
.gitignore
View file @
55a5feab
# patterns
*~
*.qm
# files
.project
...
...
pulsatingscience.pro
View file @
55a5feab
...
...
@@ -31,6 +31,7 @@ SOURCES += src/pulsaranimationwidget.cpp \
src
/
main
.
cpp
FORMS
+=
src
/
pulsatingscience
.
ui
RESOURCES
+=
src
/
pulsatingscience
.
qrc
TRANSLATIONS
=
src
/
resources
/
pulsatingscience_de
.
ts
UI_DIR
=
src
/.
ui
RCC_DIR
=
src
/.
rcc
MOC_DIR
=
src
/.
moc
...
...
src/main.cpp
View file @
55a5feab
...
...
@@ -25,8 +25,18 @@
int
main
(
int
argc
,
char
*
argv
[])
{
QApplication
a
(
argc
,
argv
);
PulsatingScience
w
;
w
.
show
();
return
a
.
exec
();
QApplication
app
(
argc
,
argv
);
QTranslator
qtTranslator
;
qtTranslator
.
load
(
"qt_"
+
QLocale
::
system
().
name
(),
QLibraryInfo
::
location
(
QLibraryInfo
::
TranslationsPath
));
app
.
installTranslator
(
&
qtTranslator
);
QTranslator
appTranslator
;
appTranslator
.
load
(
":/i18ns/resources/pulsatingscience_"
+
QLocale
::
system
().
name
());
app
.
installTranslator
(
&
appTranslator
);
PulsatingScience
window
;
window
.
show
();
return
app
.
exec
();
}
src/pulsatingscience.cpp
View file @
55a5feab
...
...
@@ -26,7 +26,7 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
QAction
*
animControl
=
ui
.
dockAnimControl
->
toggleViewAction
();
animControl
->
setStatusTip
(
tr
(
"Toggle the animation control visibility"
));
animControl
->
setShortcut
(
QKeySequence
(
Qt
::
ALT
+
Qt
::
Key_A
));
animControl
->
setShortcut
(
QKeySequence
(
tr
(
"Alt+A"
)
));
ui
.
menuView
->
addAction
(
animControl
);
// inital status (based on GUI)
...
...
src/pulsatingscience.qrc
View file @
55a5feab
...
...
@@ -9,6 +9,9 @@
<file>resources/help-website.png</file>
<file>resources/aei-icon48.png</file>
</qresource>
<qresource prefix="i18ns" >
<file>resources/pulsatingscience_de.qm</file>
</qresource>
<qresource prefix="textures" >
<file>resources/texture_background_carina.jpg</file>
<file>resources/texture_pulsar.png</file>
...
...
Write
Preview
Supports
Markdown
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