diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 8b5e18162..686164ef5 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -94,7 +94,7 @@ class I18nModule(ExtensionModule): values = mesonlib.get_filenames_templates_dict([ifile_abs], None) outputs = mesonlib.substitute_values([output], values) output = outputs[0] - ct = build.CustomTarget(output + '_' + state.subdir + '_merge', state.subdir, state.subproject, kwargs) + ct = build.CustomTarget(output + '_' + state.subdir.replace('/', '@').replace('\\', '@') + '_merge', state.subdir, state.subproject, kwargs) return ModuleReturnValue(ct, [ct]) @FeatureNewKwargs('i18n.gettext', '0.37.0', ['preset']) diff --git a/test cases/frameworks/6 gettext/data/data3/meson.build b/test cases/frameworks/6 gettext/data/data3/meson.build new file mode 100644 index 000000000..a09f3fca2 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/data3/meson.build @@ -0,0 +1,9 @@ +# Use filename substitution +i18n.merge_file( + input: 'test.desktop.in', + output: 'test4.desktop', + type: 'desktop', + po_dir: '../../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) diff --git a/test cases/frameworks/6 gettext/data/data3/test.desktop.in b/test cases/frameworks/6 gettext/data/data3/test.desktop.in new file mode 100644 index 000000000..33b9a9fd8 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/data3/test.desktop.in @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Test +GenericName=Application +Comment=Test Application +Type=Application + diff --git a/test cases/frameworks/6 gettext/data/meson.build b/test cases/frameworks/6 gettext/data/meson.build index a6b0a8b08..0a7811bda 100644 --- a/test cases/frameworks/6 gettext/data/meson.build +++ b/test cases/frameworks/6 gettext/data/meson.build @@ -26,3 +26,5 @@ i18n.merge_file( install: true, install_dir: join_paths(get_option('datadir'), 'applications') ) + +subdir('data3') diff --git a/test cases/frameworks/6 gettext/installed_files.txt b/test cases/frameworks/6 gettext/installed_files.txt index 929890912..868f4c106 100644 --- a/test cases/frameworks/6 gettext/installed_files.txt +++ b/test cases/frameworks/6 gettext/installed_files.txt @@ -4,3 +4,4 @@ usr/share/locale/fi/LC_MESSAGES/intltest.mo usr/share/applications/test.desktop usr/share/applications/test2.desktop usr/share/applications/test3.desktop +usr/share/applications/test4.desktop