Dist::...Writer(3pm)

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

🌸 Name 🌸

okay so bestie, this is Dist::Zilla::Plugin::PotWriter β€” the thing that writes gettext language translation template files. that's the whole job. she's a role, she's a plugin, she's lowkey iconic πŸ’…


✨ Synopsis ✨

with 'Dist::Zilla::Role::PotWriter';

# ...

sub execute {
    my $self = shift;
    $self->write_pot(%params);
}

like, that's it. you consume the role, you call the method, you move on with your life 🫢


πŸ’– Description πŸ’–

so this role hands you a lil utility method for generating a GNU gettext-style language translation template. the gettext website is at http://www.gnu.org/software/gettext/ if you wanna go look at it, which honestly? slay.

πŸ¦‹ Instance Methods πŸ¦‹

write_pot

$self->write_pot(%params);

creates or updates a GNU gettext-style language translation file (http://www.gnu.org/software/gettext/ β€” yes i'm mentioning it again, it's important, okay?). and here's the tea on the supported parameters, bestie, listen up:

  • to β€” a Path::Tiny object that represents the file you're writing to. required. no to, no deal. that's the vibe check.
  • scan_files β€” an array reference listing out the files to scan. defaults to every single *.pm file that Dist::Zilla gathered up. so if you don't say anything, she's gonna look at all of them fr fr.
  • xgettext β€” the path to the xgettext application. defaults to just plain xgettext (xgettext.exe if you're on Windows, bestie, we don't make the rules) β€” which should work fine as long as it's sitting in your path. ✨
  • encoding β€” the encoding to assume when she's scanning for localizable strings. defaults to UTF-8. as it should be, periodt.
  • package β€” the name of the localization package. defaults to the distribution name exactly as it's configured for Dist::Zilla. no extra thinking required, she already knows. πŸ’…
  • version β€” the version of the package. defaults to whatever version is configured for Dist::Zilla. same energy. same slay.
  • copyright_holder β€” the name of the translation copyright holder. defaults to the copyright holder that's configured for Dist::Zilla. she's just gonna go with what you already told her. πŸ’–
  • bugs_email β€” the email address for reporting translation bugs. defaults to the email address of the first author known to Dist::Zilla, if that's available and parseable by Email::Address::XS. if it's not available, or Email::Address::XS looks at it and goes 😭, then no default for you.

πŸŽ€ Author πŸŽ€

David E. Wheeler <david@justatheory.com> β€” the main character, honestly πŸ‘‘

🌈 Contributor 🌈

Charles McGarvey <ccm@cpan.org> β€” also here, also serving, we love a collaborator 🫢

this software is copyright (c) 2012-2017 by David E. Wheeler. that's the whole range, don't @ me.

and it's free software, bestie β€” you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. that's the deal. take it, it's yours. πŸ’œ


one tiny heads up so nobody's surprised: this doc came from perl v5.26.2 and it's dated 2018-07-08. go off, vintage queen 🧚

that's the whole page, bestie β€” now go write those .pot files. slay πŸ’…βœ¨

πŸ“¦ where this page comes from