Dist::...ompile(3pm)

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

πŸ’… NAME πŸ’…

Dist::Zilla::App::Command::msg_compile β€” bestie, this is the command that compiles your language translation files ✨ It lives in the User Contributed Perl Documentation corner of the manual universe, and it's about to make your i18n era iconic πŸŽ€


🌸 SYNOPSIS 🌸

okay so first you gotta set it up in dist.ini, like:

[LocaleTextDomain]
textdomain = My-App
lang_dir = po

and then on the command line you just go:

dzil msg-compile po/fr.po

periodt πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So what this command actually does is take one or more GNU gettext-style language catalogs (gettext is over at <http://www.gnu.org/software/gettext/> if you wanna meet it) and compile them into a directory inside your distribution. The whole point? Being able to compile just a catalog while you're actively working on it, so you can vibe-check how it looks β€” without having to compile your entire distribution every single time 😭 honestly a lifesaver.

It's flexible too, she contains multitudes:

  • it can compile the specific translation files you point at, or
  • it'll scan the language directory and compile all the translation files in the distribution πŸ’–

For its settings it leans on the LocaleTextDomain plugin (iykyk), and it does require that the GNU gettext utilities be available. No gettext, no party πŸ™ˆ


⭐ OPTIONS ⭐

  • -d β€” the short queen herself. Short form of the destination directory option below πŸ‘‘
  • --dest-dir β€” where the compiled catalogs go, bestie. The compiled language files get stored in this directory as LocaleData/$language/LC_MESSAGES/$textdomain.mo. And as long as that directory is in Perl's @INC, Locale::TextDomain should be able to find them there 🫢 Defaults to the current directory, no cap.
  • --msgfmt β€” tells her where the msgfmt program lives. msgfmt ships with GNU gettext (<http://www.gnu.org/software/gettext/>). Defaults to just msgfmt (or msgfmt.exe on Windows), which should totally work if it's chillin' in your path ✨

🌈 AUTHOR 🌈

David E. Wheeler <david@justatheory.com> β€” the main character who wrote this πŸ’œ


πŸŽ€ CONTRIBUTOR πŸŽ€

Charles McGarvey <ccm@cpan.org> β€” iconic assist, we love to see it πŸ¦‹


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. so like, go forth and remix, bestie πŸ’–


and that's the whole page, fr fr ✨ this lil' gem was documented by User Contributed Perl Documentation and the footer stamps it with perl v5.26.2, dated 2018-07-08 β€” a whole vintage moment, and still slaying to this day πŸŽ€πŸ’…πŸ«Ά

πŸ“¦ where this page comes from