Dist::...sg_init(3pm)

πŸ“¦
version 0.91 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– 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:

  1. It uses an existing template file (like the kind you'd make with the msg-scan command), or
  2. 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 the xgettext program lives. That's the one distributed with GNU gettext. Defaults to just xgettext (or xgettext.exe on Windows), which totally works if it's chillin' in your path. Heads up though: this one is not used if --pot-file points to an existing template file.
  • --msginit β€” where the msginit program lives. Also distributed with GNU gettext. Defaults to just msginit (or msginit.exe on Windows), which again works if it's in your path. πŸ’…
  • --encoding β€” the encoding to assume your Perl modules are encoded in. Defaults to UTF-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.pot gets 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 in dist.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>


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