|
|
26d557 |
From 1e50e285732925c417377cb78e53d075f134ca70 Mon Sep 17 00:00:00 2001
|
|
|
26d557 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
26d557 |
Date: Wed, 2 Nov 2022 10:06:40 +0100
|
|
|
26d557 |
Subject: [PATCH 5/9] accept positional arguments for i18n.merge_file
|
|
|
26d557 |
Content-Type: text/plain
|
|
|
26d557 |
|
|
|
26d557 |
Partial revert of upstream commit 61f2866a9f with a warning added.
|
|
|
26d557 |
|
|
|
26d557 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
26d557 |
---
|
|
|
26d557 |
mesonbuild/modules/i18n.py | 5 ++++-
|
|
|
26d557 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
26d557 |
|
|
|
26d557 |
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py
|
|
|
26d557 |
index 524a33110..f8d92d211 100644
|
|
|
26d557 |
--- a/mesonbuild/modules/i18n.py
|
|
|
26d557 |
+++ b/mesonbuild/modules/i18n.py
|
|
|
26d557 |
@@ -146,7 +146,6 @@ class I18nModule(ExtensionModule):
|
|
|
26d557 |
return [path.join(src_dir, d) for d in dirs]
|
|
|
26d557 |
|
|
|
26d557 |
@FeatureNew('i18n.merge_file', '0.37.0')
|
|
|
26d557 |
- @noPosargs
|
|
|
26d557 |
@typed_kwargs(
|
|
|
26d557 |
'i18n.merge_file',
|
|
|
26d557 |
CT_BUILD_BY_DEFAULT,
|
|
|
26d557 |
@@ -161,6 +160,10 @@ class I18nModule(ExtensionModule):
|
|
|
26d557 |
KwargInfo('type', str, default='xml', validator=in_set_validator({'xml', 'desktop'})),
|
|
|
26d557 |
)
|
|
|
26d557 |
def merge_file(self, state: 'ModuleState', args: T.List['TYPE_var'], kwargs: 'MergeFile') -> ModuleReturnValue:
|
|
|
26d557 |
+ if args:
|
|
|
26d557 |
+ mlog.warning('i18n.merge_file() does not take any '
|
|
|
26d557 |
+ 'positional arguments. This will become an error in the future.',
|
|
|
26d557 |
+ location=self.interpreter.current_node)
|
|
|
26d557 |
if self.tools['msgfmt'] is None or not self.tools['msgfmt'].found():
|
|
|
26d557 |
self.tools['msgfmt'] = state.find_program('msgfmt', for_machine=mesonlib.MachineChoice.BUILD)
|
|
|
26d557 |
podir = path.join(state.build_to_src, state.subdir, kwargs['po_dir'])
|
|
|
26d557 |
--
|
|
|
26d557 |
2.38.1
|
|
|
26d557 |
|