Dist::...sg_init(3pm)
π NAME π
Dist::...sg_init(3pm) β bestie, this is the Dist::Zilla::App::Command::msg_init command, and what it does is add language translation catalogs to a dist. Slay.
β¨ SYNOPSIS β¨
First, in dist.ini:
[LocaleTextDomain]
textdomain = My-App
lang_dir = po
Then on the command line:
dzil msg-init fr
π¦ DESCRIPTION π¦
Okay so here's the tea π: this command initializes and adds one or more GNU gettext (http://www.gnu.org/software/gettext/)-style language catalogs to your distribution. Iconic behavior.
It can go one of two ways:
- It uses an existing template file (like the kind you'd make with the
msg-scancommand), or - It scans your distribution's Perl modules directly to create the catalog. Main character energy, honestly.
It relies on the settings from the LocaleTextDomain plugin for its own settings, and it requires that the GNU gettext utilities be available. No gettext, no catalog, periodt.
π OPTIONS π
--xgettextβ where thexgettextprogram lives. That's the one distributed with GNU gettext. Defaults to justxgettext(orxgettext.exeon Windows), which totally works if it's chillin' in your path. Heads up though: this one is not used if--pot-filepoints to an existing template file.--msginitβ where themsginitprogram lives. Also distributed with GNU gettext. Defaults to justmsginit(ormsginit.exeon Windows), which again works if it's in your path. π--encodingβ the encoding to assume your Perl modules are encoded in. Defaults toUTF-8. As it should. π--pot-fileβ the name of the template file to use to generate the message catalogs. If you don't specify one,$lang_dir/$textdomain.potgets used if it exists. Otherwise, a temporary template file gets created by scanning the Perl sources. Ngl, it just figures it out.--copyright-holderβ the name of the application copyright holder. Defaults to the copyright holder defined indist.ini. This one is used only to generate a temporary template file.--bugs-emailβ the email address where translation bug reports should be sent. Defaults to the email address of the first distribution author, if available. Also used only to generate a temporary template file.
π AUTHOR π
David E. Wheeler <david@justatheory.com>
πΈ CONTRIBUTOR πΈ
Charles McGarvey <ccm@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012-2017 by David E. Wheeler.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole vibe, bestie π«Ά this page is perl v5.26.2, dated 2018-07-08, and yes it really is Dist::...sg_init(3pm) β go forth and translate, you absolute icon β¨π
π¦ where this page comes from
- debian bookworm: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms