MAKETEXT(1)
π MAKETEXT(1) π
okay bestie, welcome to maketext β it lives in section 1 of the manual (User Contributed Perl Documentation, no cap), and it's literally the girl who translates ur messages and does the plural math for u. let's get into it β¨
πΈ NAME πΈ
maketext β translate and make messages π¦
β¨ SYNOPSIS β¨
maketext [OPTION] [--domain=TEXTDOMAIN] MSGKEY [PARAM...]
maketext [OPTION] -s MSGKEY [PARAM...]
π DESCRIPTION π
okay so the maketext script takes a natural language message and translates it into the user's language, by looking up the translation in a message MO file, and then it handles the plural transformation with Maketext. that's the whole vibe. π
maketext is a command-line interface to Locale::Maketext::Gettext(3) (and Locale::Maketext(3)). it can be used in shell scripts, etc, to translate, maketext and return the result. and the way that works is it enables Maketext to be integrated into other programming languages/systems, like bash/csh, python, PHP, C, etc. it works like the command-line program gettext. iconic honestly. π
for example:
% maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 0 1
0 viruses were found in 1 file.
% maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 1 3
1 virus was found in 3 files.
%
see how it ate?? the plural agreement is doing its little main character moment. π₯
π OPTIONS π
-d,--domain=TEXTDOMAINβ retrieve translated messages from TEXTDOMAIN.-sβ adds a new line to the end of the output so that it behaves like theechoor thegettextcommand.-h,--helpβ display the help messages.-V,--versionβ display version information and exit.MSGKEYβ the original text used to look up translated text.PARAM...β parameters to Maketext for the plural and other text functions.
π ENVIRONMENT π
TEXTDOMAINβTEXTDOMAINis used to determine the text domain when the-dparameter is not given.TEXTDOMAINDIRβTEXTDOMAINDIRis used to search the message catalog/MO file if it does not reside in the system locale directories.
π¦ NOTES π¦
Maketext language function override, like quant or numerate, is not available here. suggestions are welcome. π
the current system locale directory search order is: /usr/share/locale, /usr/lib/locale, /usr/local/share/locale, /usr/local/lib/locale. suggestions are welcome. (yes, that's the same "suggestions are welcome" twice β she said it, so we say it π)
π BUGS π
report bugs to imacat <imacat@mail.imacat.idv.tw> β don't be shy, fr fr.
β SEE ALSO β
Locale::Maketext(3), Locale::Maketext::TPJ13(3), Locale::Maketext::Gettext(3), Locale::Maketext::Gettext::Functions(3), bindtextdomain(3), textdomain(3). also, please refer to the official GNU gettext manual at <https://www.gnu.org/software/gettext/manual/>.
π AUTHOR π
imacat <imacat@mail.imacat.idv.tw>
π COPYRIGHT π
Copyright (c) 2003-2021 imacat. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie!! this one's from perl v5.42.0, dated 2025-07-25, and it's your girl MAKETEXT(1) signing off πβ¨π go translate something gorgeous π¦πΈπ«Ά
π¦ where this page comes from
- fedora 43: perl-Locale-Maketext-Gettext 1.32-15.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms