Revise testing
[geeqie.git] / po / meson.build
1 # This file is a part of Geeqie project (https://www.geeqie.org/).
2 # Copyright (C) 2008 - 2022 The Geeqie Team
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 add_project_arguments('-DGETTEXT_PACKAGE="geeqie"', language:'c')
15
16 i18n.gettext(meson.project_name(), args : ['--keyword=N_', '--from-code=UTF-8'])
17
18 # Create the list of translators for the About - Credits dialog
19 po_sources = files([
20   'ar.po',
21   'be.po',
22   'bg.po',
23   'ca.po',
24   'cs.po',
25   'da.po',
26   'de.po',
27   'el.po',
28   'en_GB.po',
29   'eo.po',
30   'es.po',
31   'et.po',
32   'eu.po',
33   'fi.po',
34   'fr.po',
35   'hu.po',
36   'id.po',
37   'it.po',
38   'ja.po',
39   'ko.po',
40   'nb.po',
41   'nl.po',
42   'pl.po',
43   'pt_BR.po',
44   'ro.po',
45   'ru.po',
46   'sk.po',
47   'sl.po',
48   'sr@latin.po',
49   'sr.po',
50   'sv.po',
51   'th.po',
52   'tlh.po',
53   'tr.po',
54   'uk.po',
55   'vi.po',
56   'zh_CN.po',
57   'zh_TW.po'
58 ])
59
60 po_source_list = ''
61 foreach name : po_sources
62   po_source_list = po_source_list + meson.project_source_root() + '/' + '@0@'.format(name) + '\n'
63 endforeach
64
65 translators_sh = join_paths(scriptsdir, 'translators.sh')
66
67 translator_resources = custom_target('translator_resources',
68                 input : ['locales.txt', 'translators.gresource.xml'],
69                 output : ['translators.h', 'translators.c'],
70                 command : [translators_sh, '@PRIVATE_DIR@', po_source_list, meson.current_build_dir() , '@INPUT0@', '@INPUT1@'])
71
72 project_sources += translator_resources