aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorCharles Brunet <charles.brunet@optelgroup.com>2024-11-07 10:58:14 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2025-04-09 18:41:00 +0300
commit1afdac1bc4cbf9816e7109bbedef2825c4fe1155 (patch)
tree1a378a4ccd00e0e49c831f32e324fa8e0db7f6ab /docs/markdown/snippets
parent0c9420205cc132743e5b3788b3a6a87502e79415 (diff)
downloadmeson-1afdac1bc4cbf9816e7109bbedef2825c4fe1155.zip
meson-1afdac1bc4cbf9816e7109bbedef2825c4fe1155.tar.gz
meson-1afdac1bc4cbf9816e7109bbedef2825c4fe1155.tar.bz2
New xgettext method for i18n module
This method call xgettext to extract translatable string from source files into a .pot translation template. It differs from a plain CustomTarget in three ways: - It accepts build targets as sources, and automatically resolves source files from those build targets; - It detects command lines that are too long, and writes, at config time, the list of source files into a text file to be consumed by the xgettext command; - It detects dependencies between pot extraction targets, based on the dependencies between source targets.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/i18n_xgettext.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/markdown/snippets/i18n_xgettext.md b/docs/markdown/snippets/i18n_xgettext.md
new file mode 100644
index 0000000..0ad0a14
--- /dev/null
+++ b/docs/markdown/snippets/i18n_xgettext.md
@@ -0,0 +1,12 @@
+## i18n module xgettext
+
+There is a new `xgettext` function in `i18n` module that acts as a
+wrapper around `xgettext`. It allows to extract strings to translate from
+source files.
+
+This function is convenient, because:
+- It can find the sources files from a build target;
+- It will use an intermediate file when the number of source files is too
+ big to be handled directly from the command line;
+- It is able to get strings to translate from the dependencies of the given
+ targets.