Part of canonical.buildd.pottery
Function | find_potfiles_in | Search the current directory and its subdirectories for POTFILES.in. |
Function | check_potfiles_in | Check if the files listed in the POTFILES.in file exist. |
Function | find_intltool_dirs | Search the current directory and its subdiretories for intltool |
Function | get_translation_domain | Get the translation domain for this PO directory. |
Function | chdir | Undocumented |
Function | generate_pot | Generate one PO template using intltool. |
Function | generate_pots | Top-level function to generate all PO templates in a package. |
Class | ConfigFile | Represent a config file and return variables defined in it. |
Class | Substitution | Find and replace substitutions. |
Function | _get_AC_PACKAGE_NAME | Get the value of AC_PACKAGE_NAME from function parameters. |
Function | _try_substitution | Try to find a substitution in the config files. |
Returns | A list of names of directories that contain a file POTFILES.in. |
The value of AC_PACKAGE_NAME is either the first or the fourth parameter of the AC_INIT call if it is called with at least two parameters.
Returns | The completed substitution or None if none was found. |
Imitates some of the behavior of intltool-update to find out which translation domain the build environment provides. The domain is usually defined in the GETTEXT_PACKAGE variable in one of the build files. Another variant is DOMAIN in the Makevars file. This function goes through the ordered list of these possible locations, top to bottom, and tries to find a valid value. Since the same variable name may be defined in multiple files (usually configure.ac and Makefile.in.in), it needs to keep trying with the next file, until it finds the most specific definition.
If the found value contains a substitution, either autoconf style (@...@) or make style ($(...)), the search is continued in the same file and back up the list of files, now searching for the substitution. Multiple substitutions or multi-level substitutions are not supported.