diff --git a/examples/M-modules/quick/qml-lisp/qml/example.qml b/examples/M-modules/quick/qml-lisp/qml/example.qml index 1377a11..e96785f 100644 --- a/examples/M-modules/quick/qml-lisp/qml/example.qml +++ b/examples/M-modules/quick/qml-lisp/qml/example.qml @@ -36,9 +36,6 @@ Item { // (5) pass 'this' as first argument (can be accessed in Lisp via qml:*caller*) Lisp.call(this, "eql-user:show-properties-dialog") - - // (6) i........18........n - console.log(Lisp.tr("internationalization")) } Text { diff --git a/src/ecl_fun.cpp b/src/ecl_fun.cpp index 1559bc9..b29e4d0 100644 --- a/src/ecl_fun.cpp +++ b/src/ecl_fun.cpp @@ -2524,7 +2524,7 @@ cl_object qtranslate(cl_object l_con, cl_object l_src, cl_object l_n) { ecl_process_env()->nvalues = 1; QByteArray context(toQString(l_con).toUtf8()); QByteArray source(toQString(l_src).toUtf8()); - int n = (int)toFloat(l_n); // for QML (value comes from JS) + int n = toInt(l_n); cl_object l_ret; if(n == -1) { l_ret = from_qstring(QCoreApplication::translate(context, source)); } diff --git a/src/eql5.js b/src/eql5.js index 067d2fa..4edaa50 100644 --- a/src/eql5.js +++ b/src/eql5.js @@ -51,7 +51,3 @@ function apply(arg1, arg2, arg3) { name = arg1; args = arg2; } return checkEval(EQL5.apply(caller, name, args)); } - -function tr(source, context, pluralN) { - // for i18n - return EQL5.apply(null, "qtranslate", [context, source, (undefined != pluralN) ? pluralN : -1]); }