Merge pull request #2216 from ebassi/yelp-linguas

Support LINGUAS for gnome.yelp() languages
pull/2082/head
Jussi Pakkanen 8 years ago committed by GitHub
commit 19e22ac88a
  1. 5
      mesonbuild/modules/gnome.py
  2. 4
      mesonbuild/scripts/yelphelper.py
  3. 2
      test cases/frameworks/13 yelp/help/LINGUAS
  4. 6
      test cases/frameworks/13 yelp/help/meson.build
  5. 6
      test cases/frameworks/13 yelp/installed_files.txt

@ -680,6 +680,11 @@ class GnomeModule(ExtensionModule):
source_str = '@@'.join(sources)
langs = mesonlib.stringlistify(kwargs.pop('languages', []))
if langs:
mlog.log(mlog.red('DEPRECATION:'), '''The "languages" argument of gnome.yelp() is deprecated.
Use a LINGUAS file in the sources directory instead.
This will become a hard error in the future.''')
media = mesonlib.stringlistify(kwargs.pop('media', []))
symlinks = kwargs.pop('symlink_media', True)

@ -18,6 +18,7 @@ import shutil
import argparse
from .. import mlog
from . import destdir_join
from .gettext import read_linguas
parser = argparse.ArgumentParser()
parser.add_argument('command')
@ -108,6 +109,9 @@ def run(args):
build_subdir = os.path.join(os.environ['MESON_BUILD_ROOT'], options.subdir)
abs_sources = [os.path.join(src_subdir, 'C', source) for source in sources]
if not langs:
langs = read_linguas(src_subdir)
if options.command == 'pot':
build_pot(src_subdir, options.project_id, sources)
elif options.command == 'update-po':

@ -13,3 +13,9 @@ gnome.yelp('meson-symlink',
symlink_media: true,
languages: ['de', 'es'],
)
gnome.yelp('meson-linguas',
sources: 'index.page',
media: 'media/test.txt',
symlink_media: false,
)

@ -10,3 +10,9 @@ usr/share/help/es/meson-symlink/media/test.txt
usr/share/help/es/meson-symlink/index.page
usr/share/help/de/meson-symlink/index.page
usr/share/help/de/meson-symlink/media/test.txt
usr/share/help/C/meson-linguas/index.page
usr/share/help/C/meson-linguas/media/test.txt
usr/share/help/es/meson-linguas/media/test.txt
usr/share/help/es/meson-linguas/index.page
usr/share/help/de/meson-linguas/index.page
usr/share/help/de/meson-linguas/media/test.txt

Loading…
Cancel
Save