mirror of
https://gitlab.com/eql/lqml.git
synced 2026-04-27 15:21:26 -07:00
i18n: after generating *.qm files, make it work in interpreted app too (testing)
This commit is contained in:
parent
d329357550
commit
090482a7ec
3 changed files with 5 additions and 3 deletions
|
|
@ -322,7 +322,7 @@ cl_object qtranslate(cl_object l_con, cl_object l_src, cl_object l_n) {
|
|||
if (n == -1) {
|
||||
l_ret = from_qstring(QCoreApplication::translate(context, source));
|
||||
} else {
|
||||
l_ret = from_qstring(QCoreApplication::translate(context, source, 0, n));
|
||||
l_ret = from_qstring(QCoreApplication::translate(context, source, nullptr, n));
|
||||
}
|
||||
ecl_return1(ecl_process_env(), l_ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
|
||||
QTranslator translator;
|
||||
if (translator.load(QLocale(), QString(), QString(), ":/i18n")) {
|
||||
if ((QFile::exists("i18n") && translator.load(QLocale(), QString(), QString(), "i18n"))
|
||||
|| translator.load(QLocale(), QString(), QString(), ":/i18n")) {
|
||||
QCoreApplication::installTranslator(&translator);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue