mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Load translations at run time
This doesn't enable translation switching, but at least we try and load the correct translation at startup. We create two global pointers for the currently active translations. This also removes the remainders of the gettext()/glib based translation system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c260ec5c16
commit
7813ac86bf
3 changed files with 23 additions and 36 deletions
13
main.cpp
13
main.cpp
|
@ -13,22 +13,13 @@
|
|||
|
||||
#include <QStringList>
|
||||
|
||||
QTranslator *qtTranslator, *ssrfTranslator;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
bool no_filenames = true;
|
||||
#if 0
|
||||
const char *path;
|
||||
|
||||
/* set up l18n - the search directory needs to change
|
||||
* so that it uses the correct system directory when
|
||||
* subsurface isn't run from the local directory */
|
||||
path = subsurface_gettext_domainpath(argv[0]);
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain("subsurface", path);
|
||||
bind_textdomain_codeset("subsurface", "utf-8");
|
||||
textdomain("subsurface");
|
||||
#endif
|
||||
setup_system_prefs();
|
||||
prefs = default_prefs;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue