Locale-Utils-Autotranslator

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
      "version" : 2
   },
   "name" : "Locale-Utils-Autotranslator",
   "prereqs" : {
      "build" : {
         "requires" : {
            "Path::Tiny" : "0",
            "Test::Differences" : "0.60",
            "Test::Exception" : "0",
            "Test::More" : "0",
            "Test::NoWarnings" : "0"
         }
      },
      "runtime" : {
         "recommends" : {
            "Test::Pod" : "1.14",
            "Test::Pod::Coverage" : "1.04"
         },

META.yml  view on Meta::CPAN

---
abstract: 'Locale::Utils::Autotranslator - Interface for machine translation'
author:
  - 'Steffen Winkler <steffenw at cpan.org>'
build_requires:
  Path::Tiny: '0'
  Test::Differences: '0.60'
  Test::Exception: '0'
  Test::More: '0'
  Test::NoWarnings: '0'
dynamic_config: 1
generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Locale-Utils-Autotranslator

Makefile.PL  view on Meta::CPAN

require 5.008;
use ExtUtils::MakeMaker;
WriteMakefile
(
  'PL_FILES' => {},
  'INSTALLDIRS' => 'site',
  'EXE_FILES' => [],
  'VERSION_FROM' => 'lib/Locale/Utils/Autotranslator.pm',
  'NAME' => 'Locale::Utils::Autotranslator',
  'PREREQ_PM' => {
                   'Test::Differences' => '0.60',
                   'MooX::Types::MooseLike' => 0,
                   'Moo' => '1.003001',
                   'Test::Exception' => 0,
                   'Test::More' => 0,
                   'Try::Tiny' => 0,
                   'Encode' => 0,
                   'LWP::UserAgent' => 0,
                   'Locale::TextDomain::OO::Util::ExtractHeader' => 0,
                   'Carp' => 0,
                   'Test::NoWarnings' => 0,

t/01_autotranslation_utf-8.t  view on Meta::CPAN

#!perl -T

use strict;
use warnings;
use utf8;

use Moo;
use Path::Tiny qw(path);
use Test::More tests => 4;
use Test::NoWarnings;
use Test::Differences;

extends qw(
    Locale::Utils::Autotranslator
);

my $char = 1;
sub translate_text {
    my ($self, $msgid) = @_;

    return 'text ' . $char++;

t/11_with_paragraphs_utf-8.t  view on Meta::CPAN

#!perl

use strict;
use warnings;
use utf8;

use Test::More tests => 3;
use Test::Differences;
use Test::NoWarnings;

use Locale::Utils::Autotranslator;

my $auto_translator = Locale::Utils::Autotranslator->new(language => 'de');

eq_or_diff
    $auto_translator->with_paragraphs(
        " \t foo \n\nb ä \t r\n \n \n\n\n baz\nbam \t ",
        sub {

t/12_with_lines_utf-8.t  view on Meta::CPAN

#!perl

use strict;
use warnings;
use utf8;

use Test::More tests => 3;
use Test::Differences;
use Test::NoWarnings;

use Locale::Utils::Autotranslator;

my $auto_translator = Locale::Utils::Autotranslator->new(language => 'de');

eq_or_diff
    $auto_translator->with_lines(
        " \t foo \nb ä \t r\n \n baz \t ",
        sub {

t/13_translate_any_msgid.t  view on Meta::CPAN

#!perl

use strict;
use warnings;

use Moo;
use Test::More tests => 14;
use Test::Differences;
use Test::NoWarnings;

extends qw(
    Locale::Utils::Autotranslator
);

sub translate_text {
    my ($self, $msgid) = @_;

    return "<$msgid>";

t/21_api_mymemory_translated_net_utf-8.t  view on Meta::CPAN

#!perl -T

use strict;
use warnings;
use utf8;

use Moo;
use Path::Tiny qw(path);
use Test::More tests => 4;
use Test::NoWarnings;
use Test::Differences;

extends qw(
    Locale::Utils::Autotranslator::ApiMymemoryTranslatedNet
);

my %query_form_of;
{
    package MyResponse;
    use Encode qw(decode_utf8);
    use JSON qw(encode_json);

t/22_interactive_utf-8.t  view on Meta::CPAN


use strict;
use warnings;
use utf8;

use Moo;
use English qw($OS_ERROR $INPUT_RECORD_SEPARATOR);
use Path::Tiny qw(path);
use Test::More tests => 4;
use Test::NoWarnings;
use Test::Differences;

extends qw(
    Locale::Utils::Autotranslator::Interactive
);

my $output_filename = './translated interactive de_utf-8.po';
local *STDIN;
my @files = (
    "\n" eq "\x{D}\x{A}"
    ? (

t/31_test_examples_utf-8.t  view on Meta::CPAN

#!perl

use strict;
use warnings;
use utf8;

use Test::More;
use Test::Differences;
use Cwd qw(getcwd chdir);
use Encode qw(decode_utf8);
use English qw(-no_match_vars $CHILD_ERROR);

$ENV{AUTHOR_TESTING}
    or plan skip_all => 'Set $ENV{AUTHOR_TESTING} to run this test.';

my @data = (
    {
        test   => '01_my_translator',



( run in 0.875 second using v1.01-cache-2.11-cpan-131fc08a04b )