logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Dist::Zilla::Plugin::PotWriter - Something that writes gettext language translation template file

Author

       David E. Wheeler <david@justatheory.com>

Contributor

       Charles McGarvey <ccm@cpan.org>

Description

       This role provides a utility method for generating a GNU gettext
       <http://www.gnu.org/software/gettext/>-style language translation template.

   InstanceMethods"write_pot"

         $self->write_pot(%params);

       Creates or updates a GNU gettext <http://www.gnu.org/software/gettext/>-style language translation file.
       The supported parameters are:

       "to"
           Path::Tiny object representing the file to write to. Required.

       "scan_files"
           Array reference listing the files to scan. Defaults to all *.pm files gathered by Dist::Zilla.

       "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".

       "package"
           The name  of  the  localization  package.  Defaults  to  the  distribution  name  as  configured  for
           Dist::Zilla.

       "version"
           The version of the package. Defaults to the version as configured for Dist::Zilla.

       "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.

Name

       Dist::Zilla::Plugin::PotWriter - Something that writes gettext language translation template file

Synopsis

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

         # ...

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

See Also