Esmith::FormMagick::LexTester

From SME Server
Revision as of 09:42, 20 December 2013 by Stephdl (talk | contribs)
Jump to navigation Jump to search
PythonIcon.png Skill level: developer
Risk of inconsistencies with Koozali SME Server methodology, upgrades & functionality is high. One must be knowledgeable about how changes impact their Koozali SME Server. Significant risk of irreversible harm.


NAME

      esmith::FormMagick::LexTester - test FormMagick lexicon completeness

In a root terminal you can do the command below if you want to display the up-to-date content

perldoc esmith::FormMagick::LexTester

SYNOPSIS

          use esmith::FormMagick::LexTester;
          my $lt = esmith::FormMagick::Lextester->new();
          foreach my $lang (qw(en fr de)) {
              my $ok = $lt->lextest($lang);
              unless ($ok) {
                  my @untranslated = @{$lt->{untranslated}};
                  warn "Untranslated terms for $lang: @untranslated\n",
              }
          }

DESCRIPTION

esmith::FormMagick::LexTester is a subclass of esmith::FormMagick whose speciality is checking the completeness of localisation lexicons.

new();

Exactly as for esmith::FormMagick

$lt->lextest($lang)

Given a two-letter language code, checks the completeness of the lexicon for that language. Returns true on success, false on failure. If it fails, it sets $lt->{untranslated}, which is an arrayref containing a list of strings to be translated.

SEE ALSO

      CGI::FormMagick
      Esmith::FormMagick