Dist::..._merge(3pm)

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

πŸ’– Dist::Zilla::App::Command::msg_merge β€” no wait, it's giving Dist::..._merge(3pm) bestie πŸ’–

okay so first things first, the manual name is literally Dist::..._merge(3pm) and it's part of the User Contributed Perl Documentation collection, k? just so we're on the same page. and we're talking about Dist::Zilla::App::Command::msg_merge here, which is the actual command, the manual page just has a lil nickname. iykyk πŸ’…


✨ NAME ✨

Dist::Zilla::App::Command::msg_merge β€” merge localization strings into translation catalogs πŸ¦‹


🌸 SYNOPSIS 🌸

so in your dist.ini you're gonna have something like:

[LocaleTextDomain]
textdomain = My-App
lang_dir = po

then on the command line, bestie:

dzil msg-init fr de

and later, once you've added or modified some localization strings (because you always do):

dzil msg-merge

periodt. πŸŽ€


πŸ‘‘ DESCRIPTION πŸ‘‘

okay so this command merges localization strings into translation catalog files. where do the strings come from? from a GNU gettext-style language translation template β€” and if that phrase means nothing to you, it's the thing the msg-scan command makes for you. πŸ’–

and here's the cute part: if no template file is found, or like, one can't be found (😭), then the Perl sources get scanned and a temporary one gets whipped up on the spot. iconic behaviour honestly.

also important: this command relies on the settings from the LocaleTextDomain plugin for its settings, and it requires that the GNU gettext utilities be available. no gettext, no merge, sorry bestie. πŸ’€

⭐ Options ⭐

  • --xgettext β€” the location of the xgettext program, which ships with GNU gettext. defaults to just xgettext (or xgettext.exe on Windows 🌈) and that should work fine if it's chillin' in your path. not used if --pot-file is specified, so don't come for it.
  • --msgmerge β€” the location of the msgmerge program, also distributed with GNU gettext. defaults to just msgmerge (or msgmerge.exe on Windows πŸͺŸ), which works if it's in your path. slay.
  • --encoding β€” the encoding to assume the Perl modules are encoded in. defaults to UTF-8. ✨
  • --pot-file β€” the name of the template file to use when merging the message catalogs. if you don't specify it, then $lang_dir/$textdomain.pot gets used if it exists. otherwise, a temporary template file will be created by scanning the Perl sources. mystery template, love that for us πŸ•΅οΈ
  • --copyright-holder β€” name of the application copyright holder. defaults to the copyright holder defined in dist.ini. used only to generate a temporary template file.
  • --bugs-email β€” 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. πŸ›
  • --backup β€” back up each language file before merging it. the backup files will have the suffix ~. so like, safety first, bestie 🫢

🫢 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. fr fr, go wild 🌈✨


and that's the whole page, bestie πŸ’… this was Dist::..._merge(3pm) from perl v5.26.2, dated 2018-07-08 β€” no cap, that's the version and the date right there in the footer, we're just saying it cuter. mwah πŸŽ€πŸ’–

πŸ“¦ where this page comes from