1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
#! /usr/bin/perl
# config file tester.
#########################
use strict;
use warnings;
use lib q(t);
use Testhelper;
my @tests;
push @tests, {
'doc' => 'Multiple languages, no pot no po',
'po4a.conf' => 'cfg/multiple-nopotpo/po4a.conf',
'closed_path' => 'cfg/*/', # Do not use or modify the other tests
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po multiple.pot',
},
{
'doc' => 'Multiple languages, no po',
'po4a.conf' => 'cfg/multiple-nopo/po4a.conf',
'closed_path' => 'cfg/*/',
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po multiple.pot',
},
{
'doc' => 'Multiple languages, no po, --no-update',
'po4a.conf' => 'cfg/multiple-nopo/po4a.conf',
'options' => ' --no-update',
'closed_path' => 'cfg/*/',
'expected_outfile' => 'cfg/multiple-nopo/_output-noupdate',
'expected_files' => '',
},
{
'doc' => 'Multiple languages, with translation to create',
'po4a.conf' => 'cfg/multiple/po4a.conf',
'closed_path' => 'cfg/*/',
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po '
. 'multiple.man.de.1 multiple.man.es.1 multiple.man.fr.1 multiple.man.it.1 multiple.pot',
},
{
'doc' => 'Multiple languages, translation uptodate',
'po4a.conf' => 'cfg/multiple-uptodate/po4a.conf',
'closed_path' => 'cfg/*/',
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po '
. 'multiple.man.de.1 multiple.man.es.1 multiple.man.fr.1 multiple.man.it.1 multiple.pot',
},
{
'doc' => 'Multiple languages, translation uptodate, translate only one language',
'po4a.conf' => 'cfg/multiple-uptodate/po4a.conf',
'options' => ' --translate-only multiple.man.de.1',
'closed_path' => 'cfg/*/',
'expected_outfile' => 'cfg/multiple-uptodate/_output-only-one',
'expected_files' => 'multiple.man.de.1',
},
{
'doc' => 'Multiple languages, translation uptodate, translate only two languages',
'po4a.conf' => 'cfg/multiple-uptodate/po4a.conf',
'options' => ' --translate-only multiple.man.de.1 --translate-only multiple.man.es.1',
'closed_path' => 'cfg/*/',
'expected_outfile' => 'cfg/multiple-uptodate/_output-only-two',
'expected_files' => 'multiple.man.de.1 multiple.man.es.1',
},
{
'doc' => 'Multiple languages, translation already fuzzy',
'po4a.conf' => 'cfg/multiple-fuzzy/po4a.conf',
'closed_path' => 'cfg/*/',
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po multiple.pot',
},
{
'doc' => 'Multiple languages, translation fuzzied during the update',
'po4a.conf' => 'cfg/multiple-fuzzied/po4a.conf',
'closed_path' => 'cfg/*/',
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po multiple.pot',
},
{
'doc' => 'Multiple languages, translation would be fuzzied if --no-update were not given',
'po4a.conf' => 'cfg/multiple-fuzzied-noup/po4a.conf',
'options' => '--no-update',
'closed_path' => 'cfg/*/',
'expected_files' => '',
},
{
'doc' => 'Multiple languages, with a new string appearing in the master doc',
'po4a.conf' => 'cfg/multiple-newstr/po4a.conf',
'closed_path' => 'cfg/*/',
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po '
. 'multiple.man.de.1 multiple.man.es.1 multiple.man.fr.1 multiple.man.it.1 multiple.pot',
},
{
'doc' => 'Multiple languages, with a separate pot_in file',
'po4a.conf' => 'cfg/multiple-potin/po4a.conf',
'closed_path' => 'cfg/*/',
'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po '
. 'multiple.man.de.1 multiple.man.es.1 multiple.man.fr.1 multiple.man.it.1 multiple.pot',
};
run_all_tests(@tests);
0;
|