NAME

Jenkins::i18n::Warnings - class to handle translation warnings

SYNOPSIS

use Jenkins::i18n::Warnings;

DESCRIPTION

Jenkins::i18n::Warnings

EXPORT

None by default.

ATTRIBUTES

All attributes are "private".

METHODS

new

Creates a new instance.

Expects no parameters, returns a new instance.

add

Adds a new warnings.

Each warning has a type, so the message must be identified. Valid types are:

  • empty: translation files with keys that have an empty value.

  • unused: translation files with keys that are deprecated.

  • same: translation files that have keys with unstranslated text (still in English).

  • non_jenkins: translation files with keys that are part of Hudson, not Jenkins.

  • missing: translation files that are missing.

Expects as positional parameters:

  1. The warning type.

  2. The warning message.

has_unused

Returns true (1) or false (0) if there are unused warnings;

reset

Removes all captured warnings, bringing the instance to it's original state.

summary

Prints to STDERR all collected warnings so far, one per line.

Expects as parameter the translation file being processed.

has_missing

Returns true (1) or false (0) if there are missing warnings collected.

has_found

Returns true (1) or false (0) if there are warnings regarding terms that were found in the properties values.

SEE ALSO

AUTHOR

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 of Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

This file is part of Jenkins Translation Tool project.

Jenkins Translation Tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Jenkins Translation Tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Jenkins Translation Tool. If not, see (http://www.gnu.org/licenses/).

The original `translation-tool.pl` script was licensed through the MIT License, copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors. Translations files generated by the Jenkins Translation Tool CLI are distributed with the same MIT License.