aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2020-11-03 21:40:40 -0500
committerNirbheek Chauhan <nirbheek@centricular.com>2021-01-06 14:51:12 +0530
commitd38ef1d2e6edd81d45203331fdcce09baca58e6b (patch)
tree907ca8a9f1363d495aa598d4ab00c4061d034765
parentab4373855fd25253ef1a6195ed7c1ee8342e567c (diff)
downloadmeson-d38ef1d2e6edd81d45203331fdcce09baca58e6b.zip
meson-d38ef1d2e6edd81d45203331fdcce09baca58e6b.tar.gz
meson-d38ef1d2e6edd81d45203331fdcce09baca58e6b.tar.bz2
qt module: fix error message typo, translation qresource accepts qm not ts
Fixes #7925
-rw-r--r--docs/markdown/Qt5-module.md3
-rw-r--r--mesonbuild/modules/qt.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/markdown/Qt5-module.md b/docs/markdown/Qt5-module.md
index 9665267..6826460 100644
--- a/docs/markdown/Qt5-module.md
+++ b/docs/markdown/Qt5-module.md
@@ -79,7 +79,8 @@ executable('myprog', 'main.cpp', 'myclass.cpp', moc_files,
```
Sometimes, translations are embedded inside the binary using qresource files.
-In this case the ts files do not need to be explicitly listed. For example:
+In this case the ts files do not need to be explicitly listed, but will be
+inferred from the built qm files listed in the qresource file. For example:
```meson
qt5 = import('qt5')
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
index 32ff6af..00c7c7a 100644
--- a/mesonbuild/modules/qt.py
+++ b/mesonbuild/modules/qt.py
@@ -236,7 +236,7 @@ class QtBaseModule(ExtensionModule):
if c.endswith('.qm'):
ts_files.append(c.rstrip('.qm')+'.ts')
else:
- raise MesonException('qt.compile_translations: qresource can only contain ts files, found {}'.format(c))
+ raise MesonException('qt.compile_translations: qresource can only contain qm files, found {}'.format(c))
results = self.preprocess(state, [], {'qresources': qresource, 'rcc_extra_arguments': kwargs.get('rcc_extra_arguments', [])})
self._detect_tools(state.environment, kwargs.get('method', 'auto'))
translations = []