> Is the i18n.tr() call Ubuntu specific, or does it apply to all QML
> apps? In the latter case, it seems easier to just check if the
> package has any *.qml files, and activate the xgettext call based on
> this?

The i18n.tr() call is specific to the Ubuntu SDK, the generic
translation mechanism exposed by QML uses qsTr() (see http://qt-
project.org/doc/qt-5.0/qtquick/qtquick-internationalization.html). So
the mere presence of QML files is not enough to detect the use of
i18n.tr() (although of course we strongly encourage application
developers to use the Ubuntu SDK, as the Qt translation mechanism
doesn’t integrate with Launchpad translations).


> But I guess that's not generally sufficient, as Ubuntu SDK (or QML
> apps in general) might also have C++ files which use the standard
> _() convention?

Indeed some applications have C++ code, and potentially translatable strings in 
there.
At the moment the Ubuntu SDK doesn’t have a -dev package that exposes its 
headers (not sure whether that’s a bug or by design), and as a consequence 
strings in C++ code have to be translated using plain *gettext() calls, not 
using UbuntuI18n::tr().

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1181183

Title:
  Add support for the Ubuntu SDK apps to dh_translations

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pkgbinarymangler/+bug/1181183/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to