diff options
-rw-r--r-- | docs/markdown/snippets/merge_file_sanity.md | 15 | ||||
-rw-r--r-- | mesonbuild/modules/i18n.py | 5 |
2 files changed, 16 insertions, 4 deletions
diff --git a/docs/markdown/snippets/merge_file_sanity.md b/docs/markdown/snippets/merge_file_sanity.md new file mode 100644 index 0000000..ff59c51 --- /dev/null +++ b/docs/markdown/snippets/merge_file_sanity.md @@ -0,0 +1,15 @@ +## i18n.merge_file no longer arbitrarily leaves your project half-built + +The i18n module partially accounts for builds with NLS disabled, by disabling +gettext compiled translation catalogs if it cannot build them. Due to +implementation details, this also disabled important data files created via +merge_file, leading to important desktop files etc. not being installed. + +This overreaction has been fixed. It is no longer possible to have NLS-disabled +builds which break the project by not installing important files which have +nothing to do with NLS (other than including some). + +If you were depending on not having the Gettext tools installed and +successfully mis-building your project, you may need to make your project +actually work with NLS disabled, for example by providing some version of your +files which is still installed even when merge_file cannot be run. diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 04d0696..09703bb 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -167,10 +167,7 @@ class I18nModule(ExtensionModule): ) def merge_file(self, state: 'ModuleState', args: T.List['TYPE_var'], kwargs: 'MergeFile') -> ModuleReturnValue: if self.tools['msgfmt'] is None: - self.tools['msgfmt'] = state.find_program('msgfmt', required=False, for_machine=mesonlib.MachineChoice.BUILD) - if not self.tools['msgfmt'].found(): - self.nogettext_warning(state.current_node) - return ModuleReturnValue(None, []) + self.tools['msgfmt'] = state.find_program('msgfmt', for_machine=mesonlib.MachineChoice.BUILD) podir = path.join(state.build_to_src, state.subdir, kwargs['po_dir']) ddirs = self._get_data_dirs(state, kwargs['data_dirs']) |