diff cmake/MolkoBuildTranslations.cmake @ 245:97f55f6b9593

doc: add CMake macros documentation
author David Demelier <markand@malikania.fr>
date Mon, 30 Nov 2020 10:54:59 +0100
parents 498da86d1cd7
children
line wrap: on
line diff
--- a/cmake/MolkoBuildTranslations.cmake	Mon Nov 30 09:48:52 2020 +0100
+++ b/cmake/MolkoBuildTranslations.cmake	Mon Nov 30 10:54:59 2020 +0100
@@ -17,36 +17,39 @@
 #
 
 #
-# molko_build_translations
-# ------------------------
+# # molko_build_translations
+#
+# Build translations and update them.
 #
-# Synopsis:
+# ## Synopsis
 #
+# ```cmake
 # molko_build_translations(
 #   TARGET              target name
 #   SOURCES             target sources
 #   OUTPUTS             output variable
 #   TRANSLATIONS        list of localizations
 # )
+# ```
 #
 # Generate target and output commands for NLS (via GNU gettext) support for the
-# given TARGET name.
+# given *TARGET* name.
 #
-# The argument SOURCES must contain sources to extract gettext keywords, it will
-# search for _, N_. The list of SOURCES can contain any files, only .c and .h
-# will be filtered.
+# The argument *SOURCES* must contain sources to extract gettext keywords, it
+# will search for _, N_. The list of *SOURCES* can contain any files, only .c
+# and .h will be filtered.
 #
-# The argument OUTPUTS will be set with the generated .mo files in the binary
-# directory and installed to CMAKE_INSTALL_LOCALEDIR.
+# The argument *OUTPUTS* will be set with the generated .mo files in the binary
+# directory and installed to *CMAKE_INSTALL_LOCALEDIR*.
 #
-# The argument TRANSLATIONS should contain a list of languages supported in the
+# The argument *TRANSLATIONS* should contain a list of languages supported in the
 # gettext form (ll_LL@variant, see ISO 639 and ISO 3166 for more details).
 #
-# This macro create a <TARGET>-po target that will recreate the .pot file and
+# This macro create a `<TARGET>-po` target that will recreate the .pot file and
 # every .po files in the nls/ directory for each language specified in
-# TRANSLATIONS. Note, if you add a new language into translations but do not
-# copy the .pot file, a warning will be issued and you should copy the .pot file
-# as the new .po language file.
+# *TRANSLATIONS*. Note, if you add a new language into translations but do not
+# copy the .pot file, a warning will be issued and you should copy the .pot
+# file as the new .po language file.
 #
 # Since the target is modifying files directly in the source tree they are not
 # included in any build process and must be invoked manually.