File Coverage

blib/lib/UI/Various/language/en.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1             package UI::Various::language::en;
2              
3             # Author, Copyright and License: see end of file
4              
5             =head1 NAME
6              
7             UI::Various::language::en - English language support of L
8              
9             =head1 SYNOPSIS
10              
11             # This module should never be used directly!
12             # It is used indirectly using the following:
13             use UI::Various;
14              
15             =head1 ABSTRACT
16              
17             This module contains all English texts of L.
18              
19             =head1 DESCRIPTION
20              
21             The module just provides a hash of texts to be used in L.
22              
23             The keys are the original English strings (to make mapping easy), with the
24             following rules applied:
25              
26             =over
27              
28             =item 1
29              
30             All characters are converted to lowercase.
31              
32             =item 2
33              
34             Each C> conversion sequence is replaced by an
35             underscore (C<_>) followed by the index of the sequence in the English
36             string.
37              
38             =item 3
39              
40             All non-word characters are replaced with underscores (C<_>).
41              
42             =item 4
43              
44             Multiple underscores (C<_>) are replaced by a single one, except for those
45             of a C conversion sequence. E.g. a conversion sequence after one
46             or more non-word characters appears as two underscores (C<_>) followed by
47             the index number.
48              
49             =item 5
50              
51             All leading and trailing underscores (C<_>) are removed.
52              
53             =item 6
54              
55             Keys and messages are on two separate lines, with the second line beginning
56             with the C<=E> and ending with C<,>. This eases the transfer of
57             messages added later to other language files.
58              
59             =back
60              
61             See C (C<"bad debug-level '%s'">) in the code as an
62             example.
63              
64             The easiest way to get the right key / text entry is calling the helper
65             script C> with the string as sole parameter.
66              
67             =cut
68              
69             #########################################################################
70              
71 24     24   259 use v5.14;
  24         71  
72 24     24   108 use strictures;
  24         42  
  24         121  
73 24     24   3642 no indirect 'fatal';
  24         40  
  24         127  
74 24     24   1362 no multidimensional;
  24         64  
  24         110  
75 24     24   818 use warnings 'once';
  24         47  
  24         10484  
76              
77             our $VERSION = '0.24';
78              
79             #########################################################################
80              
81             =head1 EXPORT
82              
83             =head2 %T - hash of english texts, 3 sections (errors, warnings/information
84             and special), each section alphabetically sorted by key
85              
86             Note that C<%T> is not exported into the callers name-space, it must always
87             be fully qualified.
88              
89             =cut
90              
91             # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
92              
93             our %T =
94             (
95             ####################################################################
96             # fatal and non-fatal error message, always without trailing "\n" for
97             # automatically added location:
98             _1_attribute_must_be_a_2_reference
99             => "'%s' attribute must be a %s reference",
100             _1_element_must_be_accompanied_by_parent
101             => '%s element must be accompanied by parent',
102             _1_may_not_be_empty
103             => "'%s' may not be empty",
104             _1_may_not_be_modified_directly_after_initialisation
105             => "'%s' may not be modified directly after initialisation",
106             _1_may_only_be_called_from_itself
107             => '%s may only be called from itself',
108             _1_to_cancel
109             => '%s to cancel',
110             bad_debug_level__1
111             => "bad debug-level '%s'",
112             bad_usage_of__1_as__2
113             => "bad usage of %s as %s",
114             bad_usage_of__1_pkg_is__2
115             => "bad usage of %s, \$pkg is '%s'",
116             can_t_remove__1_from_old_parent__2
117             => "can't remove '%s' from old parent '%s'",
118             can_t_remove__1_no_such_node_in__2
119             => "can't remove %s: no such node in %s",
120             cyclic_parent_relationship_detected__1_levels_above
121             => 'cyclic parent relationship detected %d levels above',
122             element__1_in_call_to__2__3_already_exists
123             => 'element %s in call to %s::%s already exists',
124             enter_number_to_choose_next_step
125             => 'enter number to choose next step',
126             enter_selection
127             => 'enter selection',
128             include_option_must_be_an_array_reference_or_a_scalar
129             => "'include' option must be an ARRAY reference or a scalar",
130             invalid_call_to__1__2
131             => 'invalid call to %s::%s',
132             invalid_object__1_in_call_to__2
133             => 'invalid object (%s) in call to %s',
134             invalid_object__1_in_call_to__2__3
135             => 'invalid object (%s) in call to %s::%s',
136             invalid_pair_in__1_attribute
137             => "invalid pair in '%s' attribute",
138             invalid_parameter__1_in_call_to__2
139             => "invalid parameter '%s' in call to %s",
140             invalid_parameter__1_in_call_to__2__3
141             => "invalid parameter '%s' in call to %s::%s",
142             invalid_parent__1_not_a_ui_various_container
143             => "invalid parent '%s' (not a UI::Various::container)",
144             invalid_scalar__1_in_call_to__2
145             => "invalid scalar '%s' in call to %s",
146             invalid_scalar__1_in_call_to__2__3
147             => "invalid scalar '%s' in call to %s::%s",
148             invalid_selection
149             => "invalid selection\n",
150             invalid_value__1_for_parameter__2_in_call_to__3__4
151             => "invalid value %s for parameter '%s' in call to %s::%s",
152             leave_box
153             => 'leave box',
154             leave_dialog
155             => 'leave dialogue',
156             leave_listbox
157             => 'leave listbox',
158             leave_window
159             => 'leave window',
160             mandatory_parameter__1_is_missing
161             => "mandatory parameter '%s' is missing",
162             message__1_missing_in__2
163             => "message '%s' missing in '%s'",
164             new_value
165             => 'new value',
166             next_previous_window
167             => ', <+>/<-> next/previous window',
168             no_element_found_for_index__1
169             => 'no element found for index %d',
170             no_free_position_for__1_in_call_to__2__3
171             => 'no free position for %s in call to %s::%s',
172             odd_number_of_parameters_in_initialisation_list_of__1
173             => 'odd number of parameters in initialisation list of %s',
174             old_value
175             => 'old value',
176             options_must_be_specified_as_hash
177             => 'options must be specified as {hash}',
178             parameter__1_must_be_a_positive_integer
179             => "parameter '%s' must be a positive integer",
180             parameter__1_must_be_a_positive_integer_in_call_to__2__3
181             => "parameter '%s' must be a positive integer in call to %s::%s",
182             parameter__1_must_be_in__2__3
183             => "parameter '%s' must be in [%s..%s]",
184             scrolls
185             => '+/- scrolls',
186             specified_implementation_missing
187             => 'specified implementation missing',
188             stderr_not_0_1_2_or_3
189             => 'stderr not 0, 1, 2 or 3',
190             ui_various_core_must_be_1st_used_from_ui_various
191             => 'UI::Various::core must be 1st used from UI::Various',
192             undefined_input
193             => 'undefined input',
194             undefined_logging_level__1
195             => "undefined logging level '%s'",
196             unknown_option__1
197             => "unknown option '%s'",
198             unsupported_language__1
199             => "unsupported language '%s'",
200             unsupported_ui_element__1__2
201             => "unsupported UI element '%s': %s",
202             unsupported_ui_package__1
203             => "unsupported UI package '%s'",
204             use_option_must_be_an_array_reference
205             => "'use' option must be an ARRAY reference",
206              
207             ####################################################################
208             # Warnings and information usually don't need location information, so
209             # it's good practice to finish all with a "\n";
210             using__1_as_ui
211             => "using '%s' as UI\n",
212              
213             ####################################################################
214             # don't translate these into other languages, they are only needed for
215             # specific tests (including fallback test):
216             zz_unit_test
217             => 'unit test string',
218             zz_unit_test_empty
219             => '',
220             zz_unit_test_text
221             => 'dummy text',
222             );
223              
224             1;
225              
226             #########################################################################
227             #########################################################################
228              
229             =head1 SEE ALSO
230              
231             L
232              
233             =head1 LICENSE
234              
235             Copyright (C) Thomas Dorner.
236              
237             This library is free software; you can redistribute it and/or modify it
238             under the same terms as Perl itself. See LICENSE file for more details.
239              
240             =head1 AUTHOR
241              
242             Thomas Dorner Edorner (AT) cpan.orgE
243              
244             =cut