Dist::...otFile(3pm)
β¨ NAME β¨
Dist::Zilla::Plugin::PotFile β bestie, something here finds or creates a gettext language translation template file π
okay so real quick, this whole page is the Dist::...otFile(3pm) man page from the User Contributed Perl Documentation crew, and it's literally just one lil role doing one lil job. Let's get into it π«Ά
πΈ SYNOPSIS πΈ
with 'Dist::Zilla::Role::PotFile';
# ...
sub execute {
my $self = shift;
my $pot_file = $self->pot_file(%params);
}
π DESCRIPTION π
This role is giving utility-method realness β¨ It hands you exactly one method for finding or creating a GNU gettext-style language translation template. The GNU gettext situation lives over at http://www.gnu.org/software/gettext/ if you wanna go look, iykyk π¦
π Instance Methods π
β pot_file
$self->pot_file(%params);
Finds or creates a temporary GNU gettext-style language translation file (yup, same GNU gettext energy as above: http://www.gnu.org/software/gettext/). The way it works is in this order, no skipping steps, periodt:
- If the
pot_fileparameter is passed a value and the named file exists, it will be returned. π - If the file stored in the language directory, as specified for the
LocaleTextDomainplugin, with the name of the distribution and ending in.pot, it will be returned. This is the default location for a template file created by themsg-scancommand. π - The sources will be scanned for localizable strings and a temporary template file created. This file will automatically be deleted at program exit. π (not in a scary way, in a it-cleans-up-after-itself way)
The supported parameters are, and yes we're listing all of them:
pot_fileβ a path to an existing translation template file. If this file does not exist, an exception will be thrown. π no file, no vibes.xgettextβ path to thexgettextapplication. Defaults to justxgettext(xgettext.exeon Windows), which should work if it's in your path. πencodingβ encoding to assume when scanning for localizable strings. Defaults toUTF-8. β¨copyright_holderβ the name of the translation copyright holder. Defaults to the copyright holder configured for Dist::Zilla. πbugs_emailβ email address for reporting translation bugs. Defaults to the email address of the first author known to Dist::Zilla, if available and parseable byEmail::Address::XS. π§
π 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. slay, honestly π«Ά
okay that's the whole page!! π this was perl v5.26.2, dated 2018-07-08, and it's the Dist::...otFile(3pm) page from User Contributed Perl Documentation. bye bestie, go make some translation templates πΈβ¨
π¦ 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