summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorCorentin Noël <corentin@elementary.io>2018-07-25 18:26:07 +0200
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-09-03 22:34:22 -0700
commit176af2c8c33e79732680ebb1e2a25b5cd7a51bb9 (patch)
treea1e844d4a9c7d291341ee5c391602d3756086fef /test cases
parentc54cd69015b68b2ee583787036cba90420b6d6d8 (diff)
downloadmeson-176af2c8c33e79732680ebb1e2a25b5cd7a51bb9.tar.gz
i18n: respect variable substitution for the target name when merging translations
Previously it wasn't possible to use twice @BASENAME@ as the targets would then be named @BASENAME@_merge
Diffstat (limited to 'test cases')
-rw-r--r--test cases/frameworks/6 gettext/data/meson.build22
-rw-r--r--test cases/frameworks/6 gettext/data/test2.desktop.in6
-rw-r--r--test cases/frameworks/6 gettext/installed_files.txt2
3 files changed, 29 insertions, 1 deletions
diff --git a/test cases/frameworks/6 gettext/data/meson.build b/test cases/frameworks/6 gettext/data/meson.build
index d927ba3af..a6b0a8b08 100644
--- a/test cases/frameworks/6 gettext/data/meson.build
+++ b/test cases/frameworks/6 gettext/data/meson.build
@@ -1,6 +1,26 @@
+# Use filename substitution
i18n.merge_file(
input: 'test.desktop.in',
- output: 'test.desktop',
+ output: '@BASENAME@',
+ type: 'desktop',
+ po_dir: '../po',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'applications')
+)
+
+# Use filename substitution for another file
+i18n.merge_file(
+ input: 'test2.desktop.in',
+ output: '@BASENAME@',
+ type: 'desktop',
+ po_dir: '../po',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'applications')
+)
+
+i18n.merge_file(
+ input: 'test.desktop.in',
+ output: 'test3.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
diff --git a/test cases/frameworks/6 gettext/data/test2.desktop.in b/test cases/frameworks/6 gettext/data/test2.desktop.in
new file mode 100644
index 000000000..41f931c36
--- /dev/null
+++ b/test cases/frameworks/6 gettext/data/test2.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Test 2
+GenericName=Application
+Comment=Test Application
+Type=Application
+
diff --git a/test cases/frameworks/6 gettext/installed_files.txt b/test cases/frameworks/6 gettext/installed_files.txt
index 879f56bc5..929890912 100644
--- a/test cases/frameworks/6 gettext/installed_files.txt
+++ b/test cases/frameworks/6 gettext/installed_files.txt
@@ -2,3 +2,5 @@ usr/bin/intlprog?exe
usr/share/locale/de/LC_MESSAGES/intltest.mo
usr/share/locale/fi/LC_MESSAGES/intltest.mo
usr/share/applications/test.desktop
+usr/share/applications/test2.desktop
+usr/share/applications/test3.desktop