{
    "mode": "info",
    "parameter": "gettextize",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/gettextize/json",
    "generated": "2026-11-10T00:32:52Z",
    "sections": {
        "File: gettext.info,  Node: gettextize Invocation,  Next: Adjusting Files,  Prev: Prerequisites,  Up: Maintainers": {
            "content": "",
            "subsections": [
                {
                    "name": "13.3 Invoking the 'gettextize' Program",
                    "content": "The 'gettextize' program is an interactive tool that helps the\nmaintainer of a package internationalized through GNU 'gettext'.  It is\nused for two purposes:\n\n* As a wizard, when a package is modified to use GNU 'gettext' for\nthe first time.\n\n* As a migration tool, for upgrading the GNU 'gettext' support in a\npackage from a previous to a newer version of GNU 'gettext'.\n\nThis program performs the following tasks:\n\n* It copies into the package some files that are consistently and\nidentically needed in every package internationalized through GNU\n'gettext'.\n\n* It performs as many of the tasks mentioned in the next section\n*note Adjusting Files:: as can be performed automatically.\n\n* It removes obsolete files and idioms used for previous GNU\n'gettext' versions to the form recommended for the current GNU\n'gettext' version.\n\n* It prints a summary of the tasks that ought to be done manually and\ncould not be done automatically by 'gettextize'.\n\nIt can be invoked as follows:\n\ngettextize [ OPTION... ] [ DIRECTORY ]\n\nand accepts the following options:\n\n'-f'\n'--force'\nForce replacement of files which already exist.\n\n'--po-dir=DIR'\nSpecify a directory containing PO files.  Such a directory contains\nthe translations into various languages of a particular POT file.\nThis option can be specified multiple times, once for each\ntranslation domain.  If it is not specified, the directory named\n'po/' is updated.\n\n'--no-changelog'\nDon't update or create ChangeLog files.  By default, 'gettextize'\nlogs all changes (file additions, modifications and removals) in a\nfile called 'ChangeLog' in each affected directory.\n\n'--symlink'\nMake symbolic links instead of copying the needed files.  This can\nbe useful to save a few kilobytes of disk space, but it requires\nextra effort to create self-contained tarballs, it may disturb some\nmechanism the maintainer applies to the sources, and it is likely\nto introduce bugs when a newer version of 'gettext' is installed on\nthe system.\n\n'-n'\n'--dry-run'\nPrint modifications but don't perform them.  All actions that\n'gettextize' would normally execute are inhibited and instead only\nlisted on standard output.\n\n'--help'\nDisplay this help and exit.\n\n'--version'\nOutput version information and exit.\n\nIf DIRECTORY is given, this is the top level directory of a package\nto prepare for using GNU 'gettext'.  If not given, it is assumed that\nthe current directory is the top level directory of such a package.\n\nThe program 'gettextize' provides the following files.  However, no\nexisting file will be replaced unless the option '--force' ('-f') is\nspecified.\n\n1. The 'ABOUT-NLS' file is copied in the main directory of your\npackage, the one being at the top level.  This file contains a\nreference to the GNU gettext documentation.  It also avoids an\nerror from Automake in packages that use the Automake option 'gnu'\nor 'gnits': \"error: required file './ABOUT-NLS' not found\".\n\n2. A 'po/' directory is created for eventually holding all translation\nfiles, but initially only containing the file 'po/Makefile.in.in'\nfrom the GNU 'gettext' distribution (beware the double '.in' in the\nfile name) and a few auxiliary files.  If the 'po/' directory\nalready exists, it will be preserved along with the files it\ncontains, and only 'Makefile.in.in' and the auxiliary files will be\noverwritten.\n\nIf '--po-dir' has been specified, this holds for every directory\nspecified through '--po-dir', instead of 'po/'.\n\n3. The file 'config.rpath' is copied into the directory containing\nconfiguration support files.  It is needed by the 'AMGNUGETTEXT'\nautoconf macro.\n\n4. Only if the project is using GNU 'automake': A set of 'autoconf'\nmacro files is copied into the package's 'autoconf' macro\nrepository, usually in a directory called 'm4/'.\n\nIf your site support symbolic links, 'gettextize' will not actually\ncopy the files into your package, but establish symbolic links instead."
                }
            ]
        },
        "This avoids duplicating the disk space needed in all packages.  Merely": {
            "content": "using the '-h' option while creating the 'tar' archive of your\ndistribution will resolve each link by an actual copy in the\ndistribution archive.  So, to insist, you really should use '-h' option\nwith 'tar' within your 'dist' goal of your main 'Makefile.in'.\n\nFurthermore, 'gettextize' will update all 'Makefile.am' files in each\naffected directory, as well as the top level 'configure.ac' or\n'configure.in' file.\n\nIt is interesting to understand that most new files for supporting\nGNU 'gettext' facilities in one package go in 'po/' and 'm4/'\nsubdirectories.  Still, these directories will mostly contain package\ndependent files.\n\nThe 'gettextize' program makes backup files for all files it replaces\nor changes, and also write ChangeLog entries about these changes.  This\nway, the careful maintainer can check after running 'gettextize' whether\nits changes are acceptable to him, and possibly adjust them.  An\nexception to this rule is the 'intl/' directory, which is removed as a\nwhole if it still existed.\n\nIt is important to understand that 'gettextize' can not do the entire\njob of adapting a package for using GNU 'gettext'.  The amount of\nremaining work depends on whether the package uses GNU 'automake' or\nnot.  But in any case, the maintainer should still read the section\n*note Adjusting Files:: after invoking 'gettextize'.\n\nIn particular, if after using 'gettexize', you get an error\n'ACCOMPILEIFELSE was called before ACGNUSOURCE' or 'ACRUNIFELSE\nwas called before ACGNUSOURCE', you can fix it by modifying\n'configure.ac', as described in *note configure.ac::.\n\nIt is also important to understand that 'gettextize' is not part of\nthe GNU build system, in the sense that it should not be invoked\nautomatically, and not be invoked by someone who doesn't assume the\nresponsibilities of a package maintainer.  For the latter purpose, a\nseparate tool is provided, see *note autopoint Invocation::.\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}