[gimp-help/wip/wormnest/meson: 11/11] WIP commit: Try to use meson as build system.




commit 77b96da123ea9c787d080f6974db9a18f04dcd38
Author: Jacob Boerema <jgboerema gmail com>
Date:   Fri May 28 17:32:58 2021 -0400

    WIP commit: Try to use meson as build system.
    
    It seems that meson isn't that well suited for
    something that has different source and build
    directory structures.
    
    Maybe we need something similar to the yelp
    module for meson.
    
    Currently we can build pot files, xml files and
    html files without xref and manually have to
    move css, images and stylesheets for the
    xml to html translations.
    
    Also all files are always built.

 meson.build                               | 465 ++++++++++++++++++++++++++++++
 src/appendix/meson.build                  |  98 +++++++
 src/concepts/meson.build                  | 101 +++++++
 src/dialogs/meson.build                   | 112 +++++++
 src/filters/animation/meson.build         | 101 +++++++
 src/filters/artistic/meson.build          | 114 ++++++++
 src/filters/blur/meson.build              | 102 +++++++
 src/filters/combine/meson.build           |  95 ++++++
 src/filters/decor/meson.build             | 103 +++++++
 src/filters/distort/meson.build           | 111 +++++++
 src/filters/edge-detect/meson.build       |  99 +++++++
 src/filters/enhance/meson.build           | 104 +++++++
 src/filters/generic/meson.build           |  99 +++++++
 src/filters/light-and-shadow/meson.build  | 104 +++++++
 src/filters/map/meson.build               | 105 +++++++
 src/filters/meson.build                   | 123 ++++++++
 src/filters/noise/meson.build             | 100 +++++++
 src/filters/render/meson.build            | 119 ++++++++
 src/filters/web/meson.build               |  95 ++++++
 src/glossary/meson.build                  |  77 +++++
 src/introduction/meson.build              |  77 +++++
 src/menus/colors/auto/meson.build         |  87 ++++++
 src/menus/colors/components/meson.build   |  87 ++++++
 src/menus/colors/desaturate/meson.build   |  84 ++++++
 src/menus/colors/info/meson.build         |  86 ++++++
 src/menus/colors/map/meson.build          |  89 ++++++
 src/menus/colors/meson.build              | 127 ++++++++
 src/menus/colors/tone-mapping/meson.build |  86 ++++++
 src/menus/edit/meson.build                | 110 +++++++
 src/menus/file/meson.build                | 100 +++++++
 src/menus/filters/meson.build             |  86 ++++++
 src/menus/help/meson.build                |  87 ++++++
 src/menus/image/meson.build               | 118 ++++++++
 src/menus/layer/meson.build               | 134 +++++++++
 src/menus/meson.build                     | 116 ++++++++
 src/menus/select/meson.build              |  98 +++++++
 src/menus/view/meson.build                | 105 +++++++
 src/meson.build                           | 118 ++++++++
 src/preface/meson.build                   |  98 +++++++
 src/toolbox/meson.build                   | 107 +++++++
 src/toolbox/paint/meson.build             | 110 +++++++
 src/toolbox/selection/meson.build         | 102 +++++++
 src/toolbox/transform/meson.build         | 107 +++++++
 src/tutorial/meson.build                  |  79 +++++
 src/using/meson.build                     | 111 +++++++
 src/using/preferences/meson.build         | 115 ++++++++
 tools/xml2pot.sh                          |  48 +++
 47 files changed, 5099 insertions(+)
---
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..342b0461c
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,465 @@
+project('gimp-help',
+    version: '2.10.0',
+    meson_version: '>= 0.50.0',
+)
+
+gimp_help_version = '2.10'
+src_dir = 'src'
+po_dir  = 'po'
+
+GIMP_HELP_LINGUAS = \
+  ['ca', 'da', 'de', 'el', 'en', 'en_GB', 'es', 'fi', 'fr', 'hr', 'it',
+   'ja', 'ko', 'lt', 'nl', 'nn', 'pt_BR', 'ro', 'ru', 'sl', 'sv', 'zh_CN',]
+
+ALL_LINGUAS = ''
+
+LINGUAS = ['en', 'nl', 'xy']
+
+SUBDIRS = 'quickreference'
+
+
+################################################################################
+# Define xml2po related stuff
+
+MSGWIDTH = 79
+
+XML2PO       = find_program(meson.source_root() / 'tools' / 'xml2po.py')
+XML2POFLAGS  = '--mode=gimphelp'
+
+#MSGUNIQ = /mingw64/bin/msguniq
+MSGUNIQ      = find_program('msguniq')
+MSGUNIQFLAGS = ''
+
+MSGCAT       = find_program('msgcat')
+MSGCATFLAGS  = '--width=@0@'.format(MSGWIDTH)
+
+xml2pot      = find_program(meson.source_root() / 'tools' / 'xml2pot.sh')
+xml2po       = find_program(meson.source_root() / 'tools' / 'xml2po.py')
+
+message('@0@'.format(XML2PO.path()))
+#message(MSGUNIQ)
+
+################################################################################
+# Define authors and maintainers sources
+
+# list of authors and contributors (no DocBook)
+AUTHORS_DATA_XML = ['stylesheets/authors.xml']
+
+# automatically generated authors section (DocBook)
+AUTHORS_DOCBOOK_XML = 'src/preface/authors.xml'
+#AUTHORS_DOCBOOK_DIRNAME = $(dir $(AUTHORS_DOCBOOK_XML))
+#AUTHORS_DOCBOOK_FILENAME = $(notdir $(AUTHORS_DOCBOOK_XML))
+
+# Stylesheets generating AUTHORS
+AUTHORS_TEXT_STYLESHEETS = \
+       ['stylesheets/authors_text.xsl',
+       'stylesheets/authors_common.xsl',]
+
+# Stylesheets generating src/preface/authors.xml
+AUTHORS_DOCBOOK_STYLESHEETS = \
+       ['stylesheets/authors_docbook.xsl',
+        'stylesheets/authors_common.xsl']
+
+AUTHORS_TEXT    = AUTHORS_TEXT_STYLESHEETS + AUTHORS_DATA_XML
+AUTHORS_DOCBOOK = AUTHORS_DOCBOOK_STYLESHEETS + AUTHORS_DATA_XML
+
+# Stylesheet generating MAINTAINERS
+DOAP_STYLESHEET = ['stylesheets/doap2text.xsl']
+
+# Maintainers doap
+MAINTAINERS_DOAP = ['gimp-help.doap']
+
+MAINTAINERS_TEXT = DOAP_STYLESHEET + MAINTAINERS_DOAP
+
+
+# used for creating the ChangeLog
+LAST_RELEASE_TAG = 'GIMP_HELP_2_8_2'
+
+warnings = ''
+
+################################################################################
+# Get Meson modules
+
+#pkgconfig = import('pkgconfig')
+#i18n      = import('i18n')
+#gnome     = import('gnome')
+pythonmod = import('python')
+
+###############################################################################
+# Check for python...
+
+python3_minver = '>=3.6'
+
+python = pythonmod.find_installation('python3', required: true)
+message('Found Python @0@'.format(python.language_version()))
+
+python_found = (
+  python.found() and
+  python.language_version().version_compare(python3_minver)
+)
+if not python_found
+  python_warning = '''
+  Python @0@ was not found or version was too old.
+  '''.format(python3_minver)
+  warning(python_warning)
+  warnings += python_warning
+endif
+
+
+###############################################################################
+# Configuration
+
+#python3 = import('python3')
+#conf = configuration_data()
+#conf.set('PYTHON', python.path())
+#conf.set('top_srcdir', meson.source_root())
+#conf.set('gimpdir', '~/gimp-2.10')
+
+top_srcdir = meson.source_root()
+# FIXME gimp_dir needs to be user configurable...
+gimp_dir   = '~/gimp-2.10'
+
+message(top_srcdir)
+
+
+################################################################################
+# Host system detection
+
+host_os = host_machine.system().to_lower()
+
+platform_linux = (
+  host_os.contains('linux')
+)
+
+platform_windows = (
+  host_os.contains('mingw') or
+  host_os.contains('cygwin') or
+  host_os.contains('windows')
+)
+
+platform_osx = (
+  host_os.contains('machten') or
+  host_os.contains('rhapsody') or
+  host_os.contains('darwin')
+)
+
+########################################################################
+####            The GIMP manual languages                           ####
+########################################################################
+
+all_linguas = ALL_LINGUAS
+if all_linguas == ''
+  all_linguas = GIMP_HELP_LINGUAS
+endif
+
+target_linguas = []
+foreach lang : LINGUAS
+  if not (lang in all_linguas)
+    lang_warning = 'Language "@0@" not found in all_linguas!'.format(lang)
+    warning(lang_warning)
+    warnings += lang_warning
+  else
+    target_linguas += lang
+  endif
+endforeach
+
+# if doc_linguas != ''
+#   doc_linguas_warning = '''
+#   Do not set the internal variable DOC_LINGUAS.
+#   '''
+#   warning(doc_linguas_warning)
+#   warnings += doc_linguas_warning
+# endif
+
+
+
+#gimpdir = get_option('gimpdir')
+#if gimpdir == ''
+  # Default value
+#  gimpdir = '../../gimp-2.10'
+#endif
+
+help_src_dir = meson.project_name() / src_dir
+help_po_dir  = meson.project_name() / po_dir
+#gimpdatadir    = get_option('datadir')    / project_subdir
+#gimpplugindir  = get_option('libdir')     / project_subdir
+#gimpsysconfdir = get_option('sysconfdir') / project_subdir
+#gimpmanpagedir = gimpdir
+#localedir      = get_option('datadir') / 'locale'
+
+message('Project source dir: ' + help_src_dir)
+message('Project locale dir: ' + help_po_dir)
+
+
+########################################################################
+####            External programs                                   ####
+########################################################################
+
+# Check for XML tools
+xmllint             = find_program('xmllint', required: false)
+xsltproc            = find_program('xsltproc')
+
+
+custom_target('validate-references',
+  input : [ ],
+  output: [ 'validate-references', ],
+  command: [
+    find_program(meson.source_root() / 'tools' / 'validate_references.py'),
+    meson.source_root(),
+  ],
+  build_by_default: false,
+)
+
+
+########################################################################
+####            Make AUTHORS and MAINTAINERS file                   ####
+########################################################################
+
+authors_file = custom_target('AUTHORS',
+  input : AUTHORS_TEXT,
+  output: 'AUTHORS',
+  command: [
+    xsltproc,
+    '-o', '@OUTPUT@',
+    '@INPUT@',
+  ],
+  #build_by_default: false,
+)
+
+authors_doc_dir = custom_target('authors-doc-dir',
+  input: [],
+  output: ['authors-doc-dir'],
+  command: [
+    'mkdir', '-p',
+    '@OUTDIR@' + '/src/preface'
+  ],
+  #build_by_default: true,
+)
+
+authors_doc = custom_target('authors-doc',
+  depends: [ authors_doc_dir ],
+  input : AUTHORS_DOCBOOK,
+  output: ['authors-doc'],
+#  output: [AUTHORS_DOCBOOK_XML],
+  command: [
+    xsltproc,
+    '-o', AUTHORS_DOCBOOK_XML,
+#    '-o', '/src/preface/'+'@OUTPUT@',
+    '@INPUT@',
+  ],
+  build_by_default: true,
+  #build_by_default: false,
+)
+
+maintainers_file = custom_target('MAINTAINERS',
+  input : MAINTAINERS_TEXT,
+  output: 'MAINTAINERS',
+  command: [
+    xsltproc,
+    '-o', '@OUTPUT@',
+    '@INPUT@',
+  ],
+  #build_by_default: false,
+)
+
+
+########################################################################
+####            Make pot files:  XML(en) --> POT                    ####
+########################################################################
+
+appendix_pot = [
+  'bibliography.xml',
+  'bugs.xml',
+  'contributing.xml',
+  'fdl.xml',
+  'history.xml',
+  'history-2.10.xml',
+  'history-20.xml',
+  'history-22.xml',
+  'history-24.xml',
+  'history-26.xml',
+  'history-28.xml',
+  'tone-mapping-tutorial.xml',
+]
+
+concepts_pot = [
+  'basic-setup.xml',
+  'brushes.xml',
+  'color-management.xml',
+  'concepts.xml',
+  'docks.xml',
+  'fonts-and-text.xml',
+  'gradients.xml',
+  'grid-and-guides.xml',
+  'image-types.xml',
+  'images-loading.xml',
+  'images.xml',
+  'imagewindow.xml',
+  'intro.xml',
+  'layer-groups.xml',
+  'layer-modes.xml',
+  'layers.xml',
+  'palettes.xml',
+  'patterns.xml',
+  'plugins.xml',
+  'qmask.xml',
+  'script-fu.xml',
+  'selection.xml',
+  'setup.xml',
+  'text-management.xml',
+  'toolbox.xml',
+  'tools-presets.xml',
+  'undo.xml',
+]
+
+pot_list = [
+  {'dir': 'appendix', 'files': appendix_pot, 'target': 'appendix.pot'},
+  {'dir': 'concepts', 'files': concepts_pot, 'target': 'concepts.pot'},
+]
+
+#xml2po_env = environment()
+#xml2po_env.append('XML2PO',  XML2PO.path())
+#xml2po_env.append('MSGUNIQ', MSGUNIQ.path())
+
+# Make pot directory if not existing
+run_command (
+  'mkdir', '-p',
+  meson.build_root() + '/pot'
+)
+# Make xml directory if not existing
+run_command (
+  'mkdir', '-p',
+  meson.build_root() + '/xml'
+)
+# Make html directory if not existing
+run_command (
+  'mkdir', '-p',
+  meson.build_root() + '/html'
+)
+
+# Seems currently these subdir pot targets always get built if
+# I add: build_by_default: true
+# However, if I don't add that, they do not get built at all
+# Probably because of the differing output directories from
+# the sources (pot versus src) it doesn't pick up that things
+# have changed and need to be rebuilt.
+# I do not know enough about meson to figure out how to fix
+# this, ideas are welcome
+# Maybe it could work if the meson.build files were located
+# in pot/ directories in the source instead of inside src/
+# since currently meson is also adding subdirs under src
+# where we have meson.build files.
+
+# --> Looks like you have to do it like explained in the
+#     files() command.
+
+pot_base = 'pot/'
+subdir('src')
+
+xml2pot_targets = []
+
+foreach pot_action : pot_list
+  xmlsubdir = pot_action.get('dir')
+  srcdir    = 'src/'+ xmlsubdir + '/'
+  targetdir = 'pot/'
+  srcfiles  = []
+  foreach srcfile : pot_action.get('files')
+    srcfiles += srcdir + srcfile
+  endforeach
+
+  #message('Creating target for ' + pot_action.get('target'))
+
+#   xml2pot_target = custom_target(pot_action.get('target'),
+#     input: srcfiles,
+#     output: [pot_action.get('target')],
+#     command: [
+# #      xml2pot, pot_action.get('target'), srcfiles,
+#       xml2pot, '@OUTPUT@', '@INPUT@',
+#     ],
+#     build_by_default: true,
+#   )
+  # xml2pot_target = run_target(pot_action.get('target'),
+  #   command: [
+  #     xml2pot, [pot_action.get('target')], srcfiles,
+  #   ],
+  #   # apparently env was only added in meson 0.57 while we are using 0.55...
+  #   #env: xml2po_env,
+  #   # env: {
+  #   #   'XML2PO' : XML2PO.path(),
+  #   #   'MSGUNIQ': MSGUNIQ.path(),
+  #   # }
+  #   # env: [
+  #   #   'XML2PO=test/',
+  #   #   'MSGUNIQ=msguniq',
+  #   # ]
+  # )
+#  xml2pot_targets += pot_action.get('target') #xml2pot_target
+#  xml2pot_targets += xml2pot_target
+
+#   xml2pot_target = custom_target('xml2pot-' + xmlsubdir,
+#     input: srcfiles,
+# #    output: ['xml2pot-' + xmlsubdir],
+#     output: [pot_action.get('target')],
+#     command: [
+#       xml2pot, '@OUTPUT@', '@INPUT@',
+# #      XML2PO, XML2POFLAGS, '--output=-',
+# #      '@INPUT@',
+#     #capture: [xml2po_result]
+#     ]
+#   )
+#   # msg_uniq = run_command(
+#   #   MSGUNIQ, MSGUNIQFLAGS
+#   # )
+endforeach
+
+# xml2pot = custom_target('xml2pot-all',
+#   output: 'xml2pot-all',
+#   command: xml2pot_targets,
+#   build_by_default: true,
+# )
+
+# pot_files = custom_target('potfiles',
+#   input: [],
+#   output:
+
+# )
+
+if xmllint.found()
+  run_target('validate-authors',
+    command: [
+      xmllint,
+      '--noout',
+      '--valid', 'authors.xml',
+    ],
+  )
+endif
+
+#custom_target('Changelog',
+#  input : [ ],
+#  output: [ 'Changelog', ],
+#  command: [
+#    generate_changelog,
+#    meson.source_root(),
+#    '@OUTPUT@'
+#  ],
+#  build_by_default: false,
+#)
+
+# lang='nl'
+# po_input = ['po/nl/gimp.po']
+# xml_input = ['src/gimp.xml']
+
+# gen = generator(
+#   po2xml_cmd,
+#   output: [
+#     'xml/'+lang+'/'+'@BASENAME@.xml',
+#   ],
+#   arguments: [
+#     '--po-file=' + '@INPUT@',
+#     '--language=' + lang,
+#     'output=@OUTPUT@',
+#     xml_input,
+#   ],
+# )
+
+# gen_xml = gen.process([ 'bugs' ])
diff --git a/src/appendix/meson.build b/src/appendix/meson.build
new file mode 100644
index 000000000..c4408ab9f
--- /dev/null
+++ b/src/appendix/meson.build
@@ -0,0 +1,98 @@
+# Create appendix.pot
+message('appendix submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+  'bibliography.xml',
+  'bugs.xml',
+  'contributing.xml',
+  'fdl.xml',
+  'history.xml',
+  'history-2.10.xml',
+  'history-20.xml',
+  'history-22.xml',
+  'history-24.xml',
+  'history-26.xml',
+  'history-28.xml',
+  'tone-mapping-tutorial.xml',
+]
+target_base = 'appendix'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+# appendix_pot = run_target(target,
+#     command: [
+#         xml2pot, target_pot, pot_source_files,
+#     ]
+# )
+
+# appendix_pot = run_command(target,
+#     command: [
+#         xml2pot, target_pot, pot_source_files,
+#     ]
+# )
+
+appendix_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/concepts/meson.build b/src/concepts/meson.build
new file mode 100644
index 000000000..7ad33c7b7
--- /dev/null
+++ b/src/concepts/meson.build
@@ -0,0 +1,101 @@
+# Create concepts.pot
+message('concepts submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+  'basic-setup.xml',
+  'brushes.xml',
+  'color-management.xml',
+  'concepts.xml',
+  'docks.xml',
+  # jb - seems to be obsolete and not used anymore:
+  #'fonts-and-text.xml',
+  'gradients.xml',
+  'grid-and-guides.xml',
+  'image-types.xml',
+  'images-loading.xml',
+  'images.xml',
+  'imagewindow.xml',
+  'intro.xml',
+  'layer-groups.xml',
+  'layer-modes.xml',
+  'layers.xml',
+  'palettes.xml',
+  'patterns.xml',
+  'plugins.xml',
+  'qmask.xml',
+  'script-fu.xml',
+  'selection.xml',
+  'setup.xml',
+  'text-management.xml',
+  'toolbox.xml',
+  'tools-presets.xml',
+  'undo.xml',
+]
+target_base = 'concepts'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+concepts_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/dialogs/meson.build b/src/dialogs/meson.build
new file mode 100644
index 000000000..ca5928796
--- /dev/null
+++ b/src/dialogs/meson.build
@@ -0,0 +1,112 @@
+# Create dialogs.pot
+message('dialogs submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+'brushes-dialog.xml',
+'buffers-dialog.xml',
+'channel-dialog.xml',
+'channel-menu.xml',
+'channel-selection-mask.xml',
+'color-dialog.xml',
+'dashboard.xml',
+'device-status-dialog.xml',
+'dialogs-content.xml',
+'dialogs-management.xml',
+'dialogs-misc.xml',
+'dialogs-structure.xml',
+'dialogs_introduction.xml',
+'document-dialog.xml',
+'edit-template-dialog.xml',
+'error-console.xml',
+'export-file-dialog.xml',
+'fonts-dialog.xml',
+'gradient-dialog.xml',
+'gradient-editor-dialog.xml',
+'histogram-dialog.xml',
+'images-dialog.xml',
+'indexed-palette-dialog.xml',
+'layer-dialog.xml',
+'layer-mask.xml',
+'navigation-dialog.xml',
+'palettes-dialog.xml',
+'path-dialog.xml',
+'patterns-dialog.xml',
+'pointer-dialog.xml',
+'qmask.xml',
+'sample-points.xml',
+'save-file-dialog.xml',
+'symmetry-painting.xml',
+'tagging.xml',
+'templates-dialog.xml',
+'tool-preset-editor.xml',
+'tool-presets-dialog.xml',
+'undo-history-dialog.xml',
+]
+target_base = 'dialogs'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+dialogs_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/animation/meson.build b/src/filters/animation/meson.build
new file mode 100644
index 000000000..7a9de50ed
--- /dev/null
+++ b/src/filters/animation/meson.build
@@ -0,0 +1,101 @@
+# Create pot file
+message('animation submenu')
+
+#target      = 'animation.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+
+target_base = 'animation'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'blend.xml',
+    'burn-in.xml',
+    'optimize.xml',
+    'playback.xml',
+    'rippling.xml',
+    'spinning-globe.xml',
+    'waves.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+animation_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
diff --git a/src/filters/artistic/meson.build b/src/filters/artistic/meson.build
new file mode 100644
index 000000000..3c0f263b4
--- /dev/null
+++ b/src/filters/artistic/meson.build
@@ -0,0 +1,114 @@
+# Create pot file
+message('artistic submenu')
+
+#target      = 'artistic.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+
+target_base = 'artistic'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+'applycanvas.xml',
+'cartoon-legacy.xml',
+'cartoon.xml',
+'clothify.xml',
+'cubism.xml',
+'GIMPressionist-orientmap.xml',
+'GIMPressionist-sizemap.xml',
+'GIMPressionist.xml',
+'glasstile.xml',
+'introduction.xml',
+'oilify-legacy.xml',
+'oilify.xml',
+'photocopy.xml',
+'predator.xml',
+'simple-linear-clustering.xml',
+'softglow-legacy.xml',
+'softglow.xml',
+'vangogh-lic.xml',
+'waterpixels.xml',
+'weave.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+artistic_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
diff --git a/src/filters/blur/meson.build b/src/filters/blur/meson.build
new file mode 100644
index 000000000..9ca3f9247
--- /dev/null
+++ b/src/filters/blur/meson.build
@@ -0,0 +1,102 @@
+# Create pot file
+message('blur submenu')
+
+#target      = 'blur.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+
+target_base = 'blur'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'circular-motion.xml',
+    'gauss.xml',
+    'gauss_select.xml',
+    'introduction.xml',
+    'linear-motion.xml',
+    'mean-curvature-blur.xml',
+    'median-blur.xml',
+    'pixelize.xml',
+    'tileable.xml',
+    'zoom-motion.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+blur_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/combine/meson.build b/src/filters/combine/meson.build
new file mode 100644
index 000000000..549d2a929
--- /dev/null
+++ b/src/filters/combine/meson.build
@@ -0,0 +1,95 @@
+# Create pot file
+message('combine submenu')
+
+#target      = 'combine.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'combine'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'depthmerge.xml',
+    'film.xml',
+    'introduction.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+combine_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/decor/meson.build b/src/filters/decor/meson.build
new file mode 100644
index 000000000..62f7794e1
--- /dev/null
+++ b/src/filters/decor/meson.build
@@ -0,0 +1,103 @@
+# Create pot file
+message('decor submenu')
+
+#target      = 'decor.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'decor'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'add-bevel.xml',
+    'addborder.xml',
+    'carve-it.xml',
+    'chrome-it.xml',
+    'coffee.xml',
+    'fog.xml',
+    'fuzzyborder.xml',
+    'introduction.xml',
+    'old-photo.xml',
+    'round-corners.xml',
+    'slide.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+decor_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/distort/meson.build b/src/filters/distort/meson.build
new file mode 100644
index 000000000..93284646a
--- /dev/null
+++ b/src/filters/distort/meson.build
@@ -0,0 +1,111 @@
+# Create pot file
+message('distort submenu')
+
+#target      = 'distort.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'distort'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'apply_lens.xml',
+    'curve_bend.xml',
+    'emboss-legacy.xml',
+    'emboss.xml',
+    'engrave.xml',
+    'introduction.xml',
+    'lens-distortion.xml',
+    'mosaic.xml',
+    'newsprint.xml',
+    'pagecurl.xml',
+    'polarcoords.xml',
+    'ripple.xml',
+    'shift.xml',
+    'spherize.xml',
+    'video.xml',
+    'vpropagate.xml',
+    'waves.xml',
+    'whirlpinch.xml',
+    'wind.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+distort_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/edge-detect/meson.build b/src/filters/edge-detect/meson.build
new file mode 100644
index 000000000..1e1d2c2f4
--- /dev/null
+++ b/src/filters/edge-detect/meson.build
@@ -0,0 +1,99 @@
+# Create pot file
+message('edge-detect submenu')
+
+#target      = 'edge-detect.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'edge-detect'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'dog.xml',
+    'edge_detect.xml',
+    'image_gradient.xml',
+    'introduction.xml',
+    'laplace.xml',
+    'neon.xml',
+    'sobel.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+edge_detect_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/enhance/meson.build b/src/filters/enhance/meson.build
new file mode 100644
index 000000000..e0922b121
--- /dev/null
+++ b/src/filters/enhance/meson.build
@@ -0,0 +1,104 @@
+# Create pot file
+message('enhance submenu')
+
+#target      = 'enhance.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'enhance'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'antialias.xml',
+    'deinterlace.xml',
+    'despeckle.xml',
+    'destripe.xml',
+    'high-pass.xml',
+    'introduction.xml',
+    'NL_filter.xml',
+    'noise-reduction.xml',
+    'red-eye-removal.xml',
+    'symmetric-nearest-neighbor.xml',
+    'unsharp_mask.xml',
+    'wavelet-decompose.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+enhance_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/generic/meson.build b/src/filters/generic/meson.build
new file mode 100644
index 000000000..8f3e051fb
--- /dev/null
+++ b/src/filters/generic/meson.build
@@ -0,0 +1,99 @@
+# Create pot file
+message('generic submenu')
+
+#target      = 'generic.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'generic'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'convol-matrix.xml',
+    'dilate.xml',
+    'distance-map.xml',
+    'erode.xml',
+    'gegl-graph.xml',
+    'introduction.xml',
+    'normal-map.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+generic_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/light-and-shadow/meson.build b/src/filters/light-and-shadow/meson.build
new file mode 100644
index 000000000..03edeafcb
--- /dev/null
+++ b/src/filters/light-and-shadow/meson.build
@@ -0,0 +1,104 @@
+# Create pot file
+message('light-and-shadow submenu')
+
+#target      = 'light-and-shadow.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'light-and-shadow'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'drop-shadow-legacy.xml',
+    'drop-shadow.xml',
+    'gflare.xml',
+    'introduction.xml',
+    'lens-flare.xml',
+    'lighting.xml',
+    'long-shadow.xml',
+    'perspective-shadow.xml',
+    'sparkle.xml',
+    'supernova.xml',
+    'vignette.xml',
+    'xach-effect.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+light_and_shadow_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/map/meson.build b/src/filters/map/meson.build
new file mode 100644
index 000000000..44eb7aa7d
--- /dev/null
+++ b/src/filters/map/meson.build
@@ -0,0 +1,105 @@
+# Create pot file
+message('map submenu')
+
+#target      = 'map.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'map'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'bumpmap.xml',
+    'displace.xml',
+    'fractal-trace-legacy.xml',
+    'fractal-trace.xml',
+    'illusion.xml',
+    'introduction.xml',
+    'little-planet.xml',
+    'map-object.xml',
+    'panorama-projection.xml',
+    'papertile.xml',
+    'recursive-transform.xml',
+    'tile-seamless.xml',
+    'tile.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+map_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/meson.build b/src/filters/meson.build
new file mode 100644
index 000000000..2740308f9
--- /dev/null
+++ b/src/filters/meson.build
@@ -0,0 +1,123 @@
+# Create appendix.pot
+message('filters submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+    'about-common-features.xml',
+    'animation.xml',
+    'artistic.xml',
+    'blur.xml',
+    'clipping-feature.xml',
+    'combine.xml',
+    'common-features.xml',
+    'decor.xml',
+    'distort.xml',
+    'edge-detect.xml',
+    'enhance.xml',
+    'generic.xml',
+    'introduction.xml',
+    'light-and-shadow.xml',
+    'map.xml',
+    'noise.xml',
+    'render.xml',
+    'web.xml',
+]
+target_base = 'filters'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+
+filters_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name = 'filters'
+target_name = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
+
+# subdirs of the filters menu
+
+subdir('animation')
+subdir('artistic')
+subdir('blur')
+subdir('combine')
+subdir('decor')
+subdir('distort')
+subdir('edge-detect')
+subdir('enhance')
+subdir('generic')
+subdir('light-and-shadow')
+subdir('map')
+subdir('noise')
+subdir('render')
+subdir('web')
diff --git a/src/filters/noise/meson.build b/src/filters/noise/meson.build
new file mode 100644
index 000000000..ebc9586ed
--- /dev/null
+++ b/src/filters/noise/meson.build
@@ -0,0 +1,100 @@
+# Create pot file
+message('noise submenu')
+
+#target      = 'noise.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'noise'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'cie-lch-noise.xml',
+    'hsv-noise.xml',
+    'hurl.xml',
+    'introduction.xml',
+    'pick.xml',
+    'rgb-noise.xml',
+    'slur.xml',
+    'spread.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+noise_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/render/meson.build b/src/filters/render/meson.build
new file mode 100644
index 000000000..7b65fd47f
--- /dev/null
+++ b/src/filters/render/meson.build
@@ -0,0 +1,119 @@
+# Create pot file
+message('render submenu')
+
+#target      = 'render.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'render'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'bayer-matrix.xml',
+    'cell-noise.xml',
+    'checkerboard-legacy.xml',
+    'checkerboard.xml',
+    'circuit.xml',
+    'cmlexplorer.xml',
+    'difference-clouds.xml',
+    'diffraction.xml',
+    'flame.xml',
+    'fractalexplorer.xml',
+    'gfig.xml',
+    'grid-legacy.xml',
+    'grid.xml',
+    'ifsfractal.xml',
+    'introduction.xml',
+    'jigsaw.xml',
+    'lava.xml',
+    'line-nova.xml',
+    'maze.xml',
+    'perlin-noise.xml',
+    'plasma.xml',
+    'qbist.xml',
+    'simplex-noise.xml',
+    'sinus.xml',
+    'solid-noise.xml',
+    'spheredesigner.xml',
+    'spyrogimp.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+render_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/filters/web/meson.build b/src/filters/web/meson.build
new file mode 100644
index 000000000..57c44da5b
--- /dev/null
+++ b/src/filters/web/meson.build
@@ -0,0 +1,95 @@
+# Create pot file
+message('web submenu')
+
+#target      = 'web.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'web'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'imagemap.xml',
+    'semiflatten.xml',
+    'slice.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+web_pot = custom_target(target,
+    depends: [filters_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'filters'
+filters_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_filters_base = filters_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_filters_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_filters_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_filters_base + '/'
+    po_dir     = '/po/'  + lang + '/' + filters_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/glossary/meson.build b/src/glossary/meson.build
new file mode 100644
index 000000000..0bc7e4498
--- /dev/null
+++ b/src/glossary/meson.build
@@ -0,0 +1,77 @@
+# Create glossary.pot
+message('glossary submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+'glossary.xml',
+]
+#target     = 'glossary.pot'
+#target_pot = pot_base + target
+target_base = 'glossary'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+glossary_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/introduction/meson.build b/src/introduction/meson.build
new file mode 100644
index 000000000..6a20d08d4
--- /dev/null
+++ b/src/introduction/meson.build
@@ -0,0 +1,77 @@
+# Create introduction.pot
+message('introduction submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+'whats-new.xml',
+]
+#target     = 'introduction.pot'
+#target_pot = pot_base + target
+target_base = 'introduction'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+introduction_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/colors/auto/meson.build b/src/menus/colors/auto/meson.build
new file mode 100644
index 000000000..7d7c548c4
--- /dev/null
+++ b/src/menus/colors/auto/meson.build
@@ -0,0 +1,87 @@
+# Create pot file
+message('auto - colors submenu')
+
+#target      = 'auto.pot'
+#target_pot  = pot_base + subdir_name + '/' + menus_subdir_name + '/' + target
+target_base = 'auto'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'color-enhance-legacy.xml',
+    'color-enhance.xml',
+    'equalize.xml',
+    'stretch-contrast-hsv.xml',
+    'stretch-contrast.xml',
+    'white-balance.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+auto_colors_pot = custom_target(target,
+    depends: [menus_colors_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_colors_base = subdir_name + '/' + menus_subdir_name + '/'
+target_menus_colors_base = menus_colors_base  + target_base
+message(target_menus_colors_base)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_colors_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_colors_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_colors_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_colors_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/colors/components/meson.build b/src/menus/colors/components/meson.build
new file mode 100644
index 000000000..faab20daa
--- /dev/null
+++ b/src/menus/colors/components/meson.build
@@ -0,0 +1,87 @@
+# Create pot file
+message('components - colors submenu')
+
+#target      = 'components.pot'
+#target_pot  = pot_base + subdir_name + '/' + menus_subdir_name + '/' + target
+target_base = 'components'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'channel-mixer.xml',
+    'compose.xml',
+    'decompose.xml',
+    'extract-component.xml',
+    'mono-mixer.xml',
+    'recompose.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+components_colors_pot = custom_target(target,
+    depends: [menus_colors_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_colors_base = subdir_name + '/' + menus_subdir_name + '/'
+target_menus_colors_base = menus_colors_base  + target_base
+message(target_menus_colors_base)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_colors_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_colors_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_colors_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_colors_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/colors/desaturate/meson.build b/src/menus/colors/desaturate/meson.build
new file mode 100644
index 000000000..de5253649
--- /dev/null
+++ b/src/menus/colors/desaturate/meson.build
@@ -0,0 +1,84 @@
+# Create pot file
+message('desaturate - colors submenu')
+
+#target      = 'desaturate.pot'
+#target_pot  = pot_base + subdir_name + '/' + menus_subdir_name + '/' + target
+target_base = 'desaturate'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'color-to-gray.xml',
+    'desaturate.xml',
+    'sepia.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+desaturate_colors_pot = custom_target(target,
+    depends: [menus_colors_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_colors_base = subdir_name + '/' + menus_subdir_name + '/'
+target_menus_colors_base = menus_colors_base  + target_base
+message(target_menus_colors_base)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_colors_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_colors_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_colors_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_colors_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/colors/info/meson.build b/src/menus/colors/info/meson.build
new file mode 100644
index 000000000..ed27d8956
--- /dev/null
+++ b/src/menus/colors/info/meson.build
@@ -0,0 +1,86 @@
+# Create pot file
+message('info - colors submenu')
+
+#target      = 'info.pot'
+#target_pot  = pot_base + subdir_name + '/' + menus_subdir_name + '/' + target
+target_base = 'info'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'borderaverage.xml',
+    'ccanalyse.xml',
+    'export-histogram.xml',
+    'histogram.xml',
+    'smooth_palette.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+info_colors_pot = custom_target(target,
+    depends: [menus_colors_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_colors_base = subdir_name + '/' + menus_subdir_name + '/'
+target_menus_colors_base = menus_colors_base  + target_base
+message(target_menus_colors_base)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_colors_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_colors_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_colors_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_colors_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/colors/map/meson.build b/src/menus/colors/map/meson.build
new file mode 100644
index 000000000..25fe391ea
--- /dev/null
+++ b/src/menus/colors/map/meson.build
@@ -0,0 +1,89 @@
+# Create pot file
+message('map - colors submenu')
+
+#target      = 'map.pot'
+#target_pot  = pot_base + subdir_name + '/' + menus_subdir_name + '/' + target
+target_base = 'map'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'alien-map.xml',
+    'color-exchange.xml',
+    'color-rotate.xml',
+    'gradientmap.xml',
+    'palettemap.xml',
+    'rearrange-colormap.xml',
+    'sample-colorize.xml',
+    'set-colormap.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+map_colors_pot = custom_target(target,
+    depends: [menus_colors_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_colors_base = subdir_name + '/' + menus_subdir_name + '/'
+target_menus_colors_base = menus_colors_base  + target_base
+message(target_menus_colors_base)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_colors_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_colors_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_colors_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_colors_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/colors/meson.build b/src/menus/colors/meson.build
new file mode 100644
index 000000000..3cba2ff0f
--- /dev/null
+++ b/src/menus/colors/meson.build
@@ -0,0 +1,127 @@
+# Create pot file
+message('colors submenu')
+
+#target      = 'colors.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+
+target_base = 'colors'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'auto.xml',
+    'brightness-contrast.xml',
+    'color-balance.xml',
+    'color-temperature.xml',
+    'colorize.xml',
+    'colortoalpha.xml',
+    'components.xml',
+    'curves.xml',
+    'dither.xml',
+    'exposure.xml',
+    'hot.xml',
+    'hue-chroma.xml',
+    'hue-saturation.xml',
+    'info.xml',
+    'introduction.xml',
+    'invert.xml',
+    'levels.xml',
+    'linear-invert.xml',
+    'map.xml',
+    'posterize.xml',
+    'rgb-clip.xml',
+    'saturation.xml',
+    'shadows-highlights.xml',
+    'threshold.xml',
+    'value-invert.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+colors_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_subdir_name = 'colors'
+target_name = 'create-subdir-menus-' + menus_subdir_name
+
+# Make sure subdir exists
+menus_colors_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/menus/' + menus_subdir_name,
+    ],
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
+# subdirs of the menus menu
+
+subdir('auto')
+subdir('components')
+subdir('desaturate')
+subdir('info')
+subdir('map')
+subdir('tone-mapping')
diff --git a/src/menus/colors/tone-mapping/meson.build b/src/menus/colors/tone-mapping/meson.build
new file mode 100644
index 000000000..e4e1d29d8
--- /dev/null
+++ b/src/menus/colors/tone-mapping/meson.build
@@ -0,0 +1,86 @@
+# Create pot file
+message('tone-mapping - colors submenu')
+
+#target      = 'tone-mapping.pot'
+#target_pot  = pot_base + subdir_name + '/' + menus_subdir_name + '/' + target
+target_base = 'tone-mapping'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'fattal.xml',
+    'mantiuk.xml',
+    'reinhard.xml',
+    'retinex.xml',
+    'stress.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+tone_mapping_colors_pot = custom_target(target,
+    depends: [menus_colors_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_colors_base = subdir_name + '/' + menus_subdir_name + '/'
+target_menus_colors_base = menus_colors_base  + target_base
+message(target_menus_colors_base)
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_colors_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_colors_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_colors_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_colors_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/edit/meson.build b/src/menus/edit/meson.build
new file mode 100644
index 000000000..973744c4a
--- /dev/null
+++ b/src/menus/edit/meson.build
@@ -0,0 +1,110 @@
+# Create pot file
+message('edit submenu')
+
+#target      = 'edit.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'edit'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'buffer.xml',
+    'clear.xml',
+    'copy-visible.xml',
+    'copy.xml',
+    'cut.xml',
+    'fill-bg.xml',
+    'fill-fg.xml',
+    'fill-path.xml',
+    'fill-pattern.xml',
+    'fill-selection-outline.xml',
+    'introduction.xml',
+    'module-manager.xml',
+    'paste-as-brush.xml',
+    'paste-as-new-image.xml',
+    'paste-as-new-layer-in-place.xml',
+    'paste-as-new-layer.xml',
+    'paste-as-pattern.xml',
+    'paste-as.xml',
+    'paste-in-place.xml',
+    'paste-into-selection-in-place.xml',
+    'paste-into-selection.xml',
+    'paste.xml',
+    'preferences.xml',
+    'redo.xml',
+    'shortcuts.xml',
+    'stroke-path.xml',
+    'stroke-selection.xml',
+    'undo-history.xml',
+    'undo.xml',
+    'units.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+edit_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/file/meson.build b/src/menus/file/meson.build
new file mode 100644
index 000000000..aa76101ed
--- /dev/null
+++ b/src/menus/file/meson.build
@@ -0,0 +1,100 @@
+# Create pot file
+message('file submenu')
+
+#target      = 'file.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'file'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'close-all.xml',
+    'close.xml',
+    'copy-location.xml',
+    'create-template.xml',
+    'create.xml',
+    'export-as.xml',
+    'export.xml',
+    'new.xml',
+    'open-as-layer.xml',
+    'open-location.xml',
+    'open-recent.xml',
+    'open.xml',
+    'print.xml',
+    'quit.xml',
+    'revert.xml',
+    'save-as-copy.xml',
+    'save-as.xml',
+    'save.xml',
+    'send-by-email.xml',
+    'show-in-file-manager.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+file_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/filters/meson.build b/src/menus/filters/meson.build
new file mode 100644
index 000000000..29bcab81f
--- /dev/null
+++ b/src/menus/filters/meson.build
@@ -0,0 +1,86 @@
+# Create pot file
+message('filters submenu')
+
+#target      = 'filters.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'filters'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'introduction.xml',
+    'python-fu.xml',
+    'repeat.xml',
+    'reset-all.xml',
+    'reshow.xml',
+    'script-fu.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+filters_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/help/meson.build b/src/menus/help/meson.build
new file mode 100644
index 000000000..956642632
--- /dev/null
+++ b/src/menus/help/meson.build
@@ -0,0 +1,87 @@
+# Create pot file
+message('help submenu')
+
+#target      = 'help.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'help'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'about.xml',
+    'context-help.xml',
+    'gimp-online.xml',
+    'help.xml',
+    'plug-in-browser.xml',
+    'procedure-browser.xml',
+    'tip-of-the-day.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+help_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/image/meson.build b/src/menus/image/meson.build
new file mode 100644
index 000000000..42af1e918
--- /dev/null
+++ b/src/menus/image/meson.build
@@ -0,0 +1,118 @@
+# Create pot file
+message('image submenu')
+
+#target      = 'image.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'image'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'align-layers.xml',
+    'assign-color-profile.xml',
+    'autocrop.xml',
+    'canvas-size.xml',
+    'color-management.xml',
+    'configure-grid.xml',
+    'convert-grayscale.xml',
+    'convert-indexed.xml',
+    'convert-rgb.xml',
+    'convert-to-color-profile.xml',
+    'crop.xml',
+    'discard-color-profile.xml',
+    'duplicate.xml',
+    'enable-color-management.xml',
+    'fit-canvas-to-layers.xml',
+    'fit-canvas-to-selection.xml',
+    'flatten.xml',
+    'guides-new-percent.xml',
+    'guides-new-selection.xml',
+    'guides-new.xml',
+    'guides-remove.xml',
+    'guides.xml',
+    'introduction.xml',
+    'merge-layers.xml',
+    'metadata-editor.xml',
+    'metadata-viewer.xml',
+    'metadata.xml',
+    'mode.xml',
+    'precision.xml',
+    'print-size.xml',
+    'properties.xml',
+    'save-color-profile-to-file.xml',
+    'scale.xml',
+    'slice-using-guides.xml',
+    'transform-flip.xml',
+    'transform-rotate.xml',
+    'transform.xml',
+    'zealous-crop.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+image_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/layer/meson.build b/src/menus/layer/meson.build
new file mode 100644
index 000000000..50d08220c
--- /dev/null
+++ b/src/menus/layer/meson.build
@@ -0,0 +1,134 @@
+# Create pot file
+message('layer submenu')
+
+#target      = 'layer.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'layer'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'alpha-add.xml',
+    'alpha-remove.xml',
+    'alpha-selection-add.xml',
+    'alpha-selection-intersect.xml',
+    'alpha-selection-replace.xml',
+    'alpha-selection-subtract.xml',
+    'alpha-semi-flatten.xml',
+    'anchor.xml',
+    'autocrop.xml',
+    'bottom.xml',
+    'color-to-alpha.xml',
+    'crop.xml',
+    'delete.xml',
+    'duplicate.xml',
+    'flip-horizontal.xml',
+    'flip-vertical.xml',
+    'introduction.xml',
+    'lower-to-bottom.xml',
+    'lower.xml',
+    'mask-add.xml',
+    'mask-apply.xml',
+    'mask-delete.xml',
+    'mask-disable.xml',
+    'mask-edit.xml',
+    'mask-selection-add.xml',
+    'mask-selection-intersect.xml',
+    'mask-selection-replace.xml',
+    'mask-selection-subtract.xml',
+    'mask-show.xml',
+    'mask.xml',
+    'merge-down.xml',
+    'new-from-visible.xml',
+    'new-layer-group.xml',
+    'new.xml',
+    'next.xml',
+    'offset.xml',
+    'previous.xml',
+    'raise-to-top.xml',
+    'raise.xml',
+    'resize-to-image.xml',
+    'resize.xml',
+    'rotate-180.xml',
+    'rotate-270.xml',
+    'rotate-90.xml',
+    'rotate-arbitrary.xml',
+    'scale.xml',
+    'stack-reverse.xml',
+    'stack.xml',
+    'text-commands.xml',
+    'text-discard.xml',
+    'threshold-alpha.xml',
+    'top.xml',
+    'transform.xml',
+    'transparency.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+combine_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/meson.build b/src/menus/meson.build
new file mode 100644
index 000000000..cc593524b
--- /dev/null
+++ b/src/menus/meson.build
@@ -0,0 +1,116 @@
+# Create menus.pot
+message('menus submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+    'about-plugin-menuitems.xml',
+    'colors.xml',
+    'edit.xml',
+    'file.xml',
+    'filters.xml',
+    'help.xml',
+    'image.xml',
+    'introduction.xml',
+    'layer.xml',
+    'select.xml',
+    'tools.xml',
+    'view.xml',
+    'windows-open-recent-docks.xml',
+    # next one is apparently not used anymore
+    #'windows-show-docks.xml',
+    'windows.xml',
+]
+#target     = 'menus.pot'
+#target_pot = pot_base + target
+target_base = 'menus'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+menus_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name = 'menus'
+target_name = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+menus_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
+# subdirs of the menus menu
+
+subdir('colors')
+subdir('edit')
+subdir('file')
+subdir('filters')
+subdir('help')
+subdir('image')
+subdir('layer')
+subdir('select')
+subdir('view')
diff --git a/src/menus/select/meson.build b/src/menus/select/meson.build
new file mode 100644
index 000000000..a6de8b618
--- /dev/null
+++ b/src/menus/select/meson.build
@@ -0,0 +1,98 @@
+# Create pot file
+message('select submenu')
+
+#target      = 'select.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'select'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'all.xml',
+    'border.xml',
+    'by_color.xml',
+    'distort.xml',
+    'feather.xml',
+    'float.xml',
+    'from-path.xml',
+    'grow.xml',
+    'invert.xml',
+    'none.xml',
+    'qmask-toggle.xml',
+    'remove-holes.xml',
+    'rounded-rectangle.xml',
+    'selection-editor.xml',
+    'sharpen.xml',
+    'shrink.xml',
+    'to-channel.xml',
+    'to-path.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+select_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/menus/view/meson.build b/src/menus/view/meson.build
new file mode 100644
index 000000000..9179bac17
--- /dev/null
+++ b/src/menus/view/meson.build
@@ -0,0 +1,105 @@
+# Create pot file
+message('view submenu')
+
+#target      = 'view.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'view'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'display-filters.xml',
+    'dot-for-dot.xml',
+    'flip-rotate.xml',
+    'fullscreen.xml',
+    'introduction.xml',
+    'navigwindow.xml',
+    'new.xml',
+    'padding-color.xml',
+    'show-all.xml',
+    'show-grid.xml',
+    'show-guides.xml',
+    'show-layer-boundary.xml',
+    'show-menubar.xml',
+    'show-rulers.xml',
+    'show-sample-points.xml',
+    'show-scrollbars.xml',
+    'show-selection.xml',
+    'show-statusbar.xml',
+    'shrink-wrap.xml',
+    'snap-to-canvas.xml',
+    'snap-to-grid.xml',
+    'snap-to-guides.xml',
+    'snap-to-path.xml',
+    'view-color-management.xml',
+    'zoom.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+view_pot = custom_target(target,
+    depends: [menus_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+menus_base = subdir_name + '/'
+target_menus_base = menus_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_menus_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_menus_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_menus_base + '/'
+    po_dir     = '/po/'  + lang + '/' + menus_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 000000000..c15dc2bd2
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,118 @@
+message('src submenu')
+
+subdir('appendix')
+subdir('concepts')
+subdir('dialogs')
+subdir('filters')
+subdir('glossary')
+# # #subdir('images') # not a directory with xml files
+subdir('introduction')
+subdir('menus')
+subdir('preface')
+subdir('toolbox')
+subdir('tutorial')
+subdir('using')
+
+# all_pots = custom_target('pot-all',
+#     depends: [appendix_pot],
+#     input:'',
+#     output: 'pot-all',
+#     command: [
+#         'ls',
+#     ],
+#     build_by_default: true,
+# )
+
+# list of source files to make a pot from
+pot_source_files = [
+    'gimp.xml',
+    'help-missing.xml',
+    'introduction.xml',
+    'key-reference.xml',
+]
+target     = 'gimp.pot'
+target_pot = pot_base + target
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+gimp_pot = custom_target(target,
+    #depends: [authors_doc],
+    input: pot_source_files,
+    output: [target],
+    command: [
+        xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = 'gimp.po'
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang,
+    )
+
+    # target per lang
+    target_base = lang + '-'
+    htmltarget = 'html-'+lang
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            target = target_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(target,
+                output: [target],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + '/po/' + lang + '/' + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + '/xml/' + lang + '/' + xmlfile,
+                    meson.source_root() + '/src/' + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        #TODO English has no po files...
+        foreach xmlfile : pot_source_files
+            target = target_base + xmlfile
+            lang_xml = meson.build_root()  + '/xml/' + lang + '/' + xmlfile
+            #message(target)
+            gimp_xml = custom_target(target,
+                output: [target],
+                command: [
+                    'cp',
+                    meson.source_root() + '/src/' + xmlfile,
+                    #meson.build_root()  + '/xml/' + lang + '/' + xmlfile,
+                    lang_xml,
+                ],
+                build_by_default: true,
+            )
+
+        endforeach
+        gimp_html = custom_target(htmltarget,
+            output: [htmltarget],
+            command: [
+                xsltproc,
+                '--verbose',
+                #'--timing',
+                '--nonet',
+                '--path', meson.build_root(),
+                '--path', meson.build_root()+'/xml/images',  # testing if this helps
+                '--xinclude',
+                '--stringparam', 'l10n.gentext.default.language ', lang,
+                '--output', 'html/' + lang + '/',
+                'stylesheets/plainhtml.xsl', #TODO refer to source??? or copy first!
+                'xml/' + lang + '/gimp.xml',
+                #meson.source_root() + '/src/' + xmlfile,
+                #meson.build_root()  + '/xml/' + lang + '/' + xmlfile,
+            ],
+            build_by_default: true,
+        )
+    endif
+endforeach
diff --git a/src/preface/meson.build b/src/preface/meson.build
new file mode 100644
index 000000000..2b97274a9
--- /dev/null
+++ b/src/preface/meson.build
@@ -0,0 +1,98 @@
+# Create preface.pot
+message('preface submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+    meson.build_root() + '/src/preface/' + 'authors.xml',
+]
+xml_source_files = [
+    'authors.xml',
+]
+
+#target     = 'preface.pot'
+#target_pot = pot_base + target
+
+target_base = 'preface'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+preface_pot = custom_target(target,
+    depends: [authors_doc],
+    input: pot_source_files,
+    output: [target],
+    command: [
+        xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name = 'preface'
+target_name = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+preface_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+    preface_authors = 'preface-authors'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : xml_source_files
+            xmltarget = xmltarget_base + xmlfile
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    # Special case here since authors.xml is only available
+                    # in the build dir!
+                    meson.build_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : xml_source_files
+            xmltarget = xmltarget_base + xmlfile
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    # Special case here since authors.xml is only available
+                    # in the build dir!
+                    meson.build_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root() + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/toolbox/meson.build b/src/toolbox/meson.build
new file mode 100644
index 000000000..5988e9ea9
--- /dev/null
+++ b/src/toolbox/meson.build
@@ -0,0 +1,107 @@
+# Create toolbox.pot
+message('toolbox submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+    'about-common-options-display.xml',
+    'color-picker.xml',
+    'gegl-operation.xml',
+    'intro.xml',
+    'measure.xml',
+    'other-tools.xml',
+    'paint-tools.xml',
+    'path.xml',
+    'selection-tools.xml',
+    'text.xml',
+    'toolbox-color-area.xml',
+    'transform-tools.xml',
+    'zoom.xml',
+]
+#target     = 'toolbox.pot'
+#target_pot = pot_base + target
+target_base = 'toolbox'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+toolbox_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name = 'toolbox'
+target_name = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+toolbox_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
+# subdirs of the toolbox menu
+
+subdir('paint')
+subdir('selection')
+subdir('transform')
diff --git a/src/toolbox/paint/meson.build b/src/toolbox/paint/meson.build
new file mode 100644
index 000000000..068fbe02f
--- /dev/null
+++ b/src/toolbox/paint/meson.build
@@ -0,0 +1,110 @@
+# Create pot file
+message('paint submenu')
+
+#target      = 'paint.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'paint'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'about-common-paint-options.xml',
+    'airbrush.xml',
+    'blur-sharpen.xml',
+    'brush-tools.xml',
+    'bucket-fill.xml',
+    'clone.xml',
+    'common-features.xml',
+    'dodge-burn.xml',
+    'dynamics.xml',
+    'eraser.xml',
+    'gradient.xml',
+    'heal.xml',
+    'ink.xml',
+    'MyPaint-brush.xml',
+    'paintbrush.xml',
+    'pencil.xml',
+    'perspective-clone.xml',
+    'smudge.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+paint_pot = custom_target(target,
+    depends: [toolbox_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'toolbox'
+toolbox_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+toolbox_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_toolbox_base = toolbox_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_toolbox_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_toolbox_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_toolbox_base + '/'
+    po_dir     = '/po/'  + lang + '/' + toolbox_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/toolbox/selection/meson.build b/src/toolbox/selection/meson.build
new file mode 100644
index 000000000..c32e9d513
--- /dev/null
+++ b/src/toolbox/selection/meson.build
@@ -0,0 +1,102 @@
+# Create pot file
+message('selection submenu')
+
+#target      = 'selection.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'selection'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'about-common-select-modifiers.xml',
+    'about-common-select-options.xml',
+    'by-color.xml',
+    'common-features.xml',
+    'ellipse.xml',
+    'foreground.xml',
+    'free.xml',
+    'fuzzy.xml',
+    'iscissors.xml',
+    'rectangle.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+selection_pot = custom_target(target,
+    depends: [toolbox_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'toolbox'
+toolbox_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+toolbox_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_toolbox_base = toolbox_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_toolbox_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_toolbox_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_toolbox_base + '/'
+    po_dir     = '/po/'  + lang + '/' + toolbox_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/toolbox/transform/meson.build b/src/toolbox/transform/meson.build
new file mode 100644
index 000000000..d408592df
--- /dev/null
+++ b/src/toolbox/transform/meson.build
@@ -0,0 +1,107 @@
+# Create pot file
+message('transform submenu')
+
+#target      = 'transform.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'transform'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'about-common-transform-options.xml',
+    'align.xml',
+    'cage.xml',
+    'common-features.xml',
+    'crop.xml',
+    'flip.xml',
+    'handle-transform.xml',
+    'move.xml',
+    'perspective.xml',
+    'rotate.xml',
+    'scale.xml',
+    'shear.xml',
+    'transform-3d.xml',
+    'unified-transform.xml',
+    'warp-transform.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+transform_pot = custom_target(target,
+    depends: [toolbox_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'toolbox'
+toolbox_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+toolbox_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_toolbox_base = toolbox_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_toolbox_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_toolbox_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_toolbox_base + '/'
+    po_dir     = '/po/'  + lang + '/' + toolbox_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/src/tutorial/meson.build b/src/tutorial/meson.build
new file mode 100644
index 000000000..f050adbc7
--- /dev/null
+++ b/src/tutorial/meson.build
@@ -0,0 +1,79 @@
+# Create tutorial.pot
+message('tutorial submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+'quickies.xml',
+'straight-lines.xml',
+]
+#target     = 'tutorial.pot'
+#target_pot = pot_base + target
+target_base = 'tutorial'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+tutorial_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
diff --git a/src/using/meson.build b/src/using/meson.build
new file mode 100644
index 000000000..5de271806
--- /dev/null
+++ b/src/using/meson.build
@@ -0,0 +1,111 @@
+# Create using.pot
+message('using submenu')
+
+# list of source files to make a pot from
+pot_source_files = [
+    'animated-brushes.xml',
+    'brushes.xml',
+    'customize-splashscreen.xml',
+    'fileformats.xml',
+    'fonts-and-text.xml',
+    'getting-unstuck.xml',
+    'grid-and-guides.xml',
+    'layers.xml',
+    'paths.xml',
+    'photography.xml',
+    'qmask.xml',
+    'script-fu-gui-api.xml',
+    'script-fu-tutorial.xml',
+    'selections.xml',
+    'setup.xml',
+    'shortcuts.xml',
+    'simpleobjects.xml',
+    'variable-size-brush.xml',
+    'web.xml',
+]
+#target     = 'using.pot'
+#target_pot = pot_base + target
+target_base = 'using'
+target      = target_base + '.pot'
+target_pot  = pot_base + target
+target_po   = target_base + '.po'
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+using_pot = custom_target(target,
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name = 'using'
+target_name = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+using_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_base + '/'
+    dest_dir   = '/xml/' + lang + '/'+ target_base + '/'
+    po_dir     = '/po/'  + lang + '/'
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
+
+# subdirs of the using menu
+
+subdir('preferences')
diff --git a/src/using/preferences/meson.build b/src/using/preferences/meson.build
new file mode 100644
index 000000000..f39c994fe
--- /dev/null
+++ b/src/using/preferences/meson.build
@@ -0,0 +1,115 @@
+# Create pot file
+message('preferences submenu')
+
+#target      = 'preferences.pot'
+#target_pot  = pot_base + subdir_name + '/' + target
+target_base = 'preferences'
+target      = target_base + '.pot'
+target_pot  = pot_base + subdir_name + '/' + target
+target_po   = target_base + '.po'
+
+# list of source files to make a pot from
+pot_source_files = [
+    'preferences_introduction.xml',
+    'prefs-color-management.xml',
+    'prefs-default-grid.xml',
+    'prefs-default-image.xml',
+    'prefs-dialog-defaults.xml',
+    'prefs-display.xml',
+    'prefs-folders-data.xml',
+    'prefs-folders.xml',
+    'prefs-help.xml',
+    'prefs-icon-theme.xml',
+    'prefs-image-window-appearance.xml',
+    'prefs-image-window-snapping.xml',
+    'prefs-image-window-title.xml',
+    'prefs-image-window.xml',
+    'prefs-import-export.xml',
+    'prefs-input-controllers.xml',
+    'prefs-input-devices.xml',
+    'prefs-interface.xml',
+    'prefs-system-resources.xml',
+    'prefs-theme.xml',
+    'prefs-tool-options.xml',
+    'prefs-toolbox.xml',
+    'prefs-window-management.xml',
+]
+
+# Debugging help...
+message('Creating target for ' + target_pot)
+
+preferences_pot = custom_target(target,
+    depends: [using_directory],
+    input: pot_source_files,
+    output: [target],
+    command: [
+    xml2pot, target_pot, meson.build_root(), meson.source_root(), '@INPUT@',
+    ],
+    build_by_default: true,
+)
+
+subdir_name  = 'using'
+using_base = subdir_name + '/'
+target_name  = 'create-subdir-' + subdir_name
+
+# Make sure subdir exists
+filters_directory = custom_target(target_name,
+    output: [target_name],
+    command: [
+        'mkdir', '-p',
+        meson.build_root() + '/pot/' + subdir_name,
+    ],
+)
+
+target_using_base = using_base  + target_base
+xml_lang_base = meson.build_root() + '/xml'
+po_source     = target_po
+# for each enabled language create a xml/lang/... target
+foreach lang : target_linguas
+    # Make lang directory if not existing
+    run_command (
+        'mkdir', '-p',
+        xml_lang_base + '/' + lang + '/'+ target_using_base ,
+    )
+
+    # target per lang
+    xmltarget_base = lang + '-'
+    xmlsrc_dir = '/src/' + target_using_base + '/'
+    dest_dir   = '/xml/' + lang + '/' + target_using_base + '/'
+    po_dir     = '/po/'  + lang + '/' + using_base
+
+    # en is a special case...
+    if lang != 'en'
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    xml2po,
+                    '--po-file=' + meson.source_root() + po_dir + po_source,
+                    '--language=' + lang,
+                    '--output=' + meson.build_root() + dest_dir + xmlfile,
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    else
+        # English has no po files...
+        foreach xmlfile : pot_source_files
+            xmltarget = xmltarget_base + xmlfile
+            #message(target)
+            gimp_xml = custom_target(xmltarget,
+                output: [xmltarget],
+                command: [
+                    'cp',
+                    meson.source_root() + xmlsrc_dir + xmlfile,
+                    meson.build_root()  + dest_dir   + xmlfile,
+                ],
+                build_by_default: true,
+            )
+        endforeach
+    endif
+
+endforeach
diff --git a/tools/xml2pot.sh b/tools/xml2pot.sh
new file mode 100644
index 000000000..662d7c532
--- /dev/null
+++ b/tools/xml2pot.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# Create a PO-template (POT)
+# Since meson can't do piped commands we use a script
+# Copyright (C) 2021 The GIMP Documentation Team.
+# License: GPL
+#
+# Assumptions: this script is in the same directory as xml2po
+#
+# First argument $1 - name of output.pot
+# $2 - build root
+# $3 = source root
+# Arguments $4-...  - xml input files
+#
+# Ideally we would want to be able to set where
+# xml2po, msguniq, msgcat etc. are located but with current (0.50) meson setting
+# env variables is cumbersome so let's skip that for now
+
+build_root=$2
+source_root=$3
+#out_pot="$MESON_BUILD_ROOT/pot/$1"
+#out_pot="$MESON_BUILD_ROOT/pot/$1"
+#out_pot=$build_root/pot/$1
+out_pot=$build_root/$1
+src_files="${@:4}"
+
+# Keeping these debug statments for now...
+# echo Meson source: $MESON_SOURCE_ROOT
+# echo Meson build: $MESON_BUILD_ROOT
+
+# echo First argument: $1
+# echo Meson source: $source_root
+# echo Meson build: $build_root
+# echo Source files: ${@:4}
+# #echo Source files: $src_files
+# echo Destination file: $out_pot
+
+$source_root/tools/xml2po.py --mode=gimphelp --output=- $src_files \
+  | msguniq | msgcat - --width=79 -o "$out_pot"
+
+recent_file="$(ls -t $src_files 2>/dev/null | sed 1q)"
+
+#echo "Most recently updated: $recent_file"
+
+# test -s file - Returns true if file exists, and is not empty.
+test -s "$out_pot" || rm -f "$out_pot"; \
+touch -c -r $recent_file "$out_pot" || true; \
+test -s "$out_pot"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]