Dist::...otFile(3pm)

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

✨ 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_file parameter 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 LocaleTextDomain plugin, 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 the msg-scan command. πŸ‘‘
  • 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 the xgettext application. Defaults to just xgettext (xgettext.exe on Windows), which should work if it's in your path. 🌈
  • encoding β€” encoding to assume when scanning for localizable strings. Defaults to UTF-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 by Email::Address::XS. πŸ“§

πŸ‘‘ 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. 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