i18n: replace path separator with @

using state.subdir will cause / or \ to be inserted into the target name.
Replace them with @ to future-proof it.

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
pull/4336/head
Marty E. Plummer 6 years ago committed by Nirbheek Chauhan
parent 2ff69b20df
commit 8fd5297f76
  1. 2
      mesonbuild/modules/i18n.py
  2. 9
      test cases/frameworks/6 gettext/data/data3/meson.build
  3. 6
      test cases/frameworks/6 gettext/data/data3/test.desktop.in
  4. 2
      test cases/frameworks/6 gettext/data/meson.build
  5. 1
      test cases/frameworks/6 gettext/installed_files.txt

@ -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'])

@ -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')
)

@ -0,0 +1,6 @@
[Desktop Entry]
Name=Test
GenericName=Application
Comment=Test Application
Type=Application

@ -26,3 +26,5 @@ i18n.merge_file(
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
subdir('data3')

@ -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

Loading…
Cancel
Save