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 23     23   253 use v5.14;
  23         71  
72 23     23   110 use strictures;
  23         40  
  23         139  
73 23     23   4006 no indirect 'fatal';
  23         41  
  23         146  
74 23     23   1443 no multidimensional;
  23         45  
  23         132  
75 23     23   908 use warnings 'once';
  23         35  
  23         10242  
76              
77             our $VERSION = '0.22';
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_parameter__1_in_call_to__2
137             => "invalid parameter '%s' in call to %s",
138             invalid_parameter__1_in_call_to__2__3
139             => "invalid parameter '%s' in call to %s::%s",
140             invalid_parent__1_not_a_ui_various_container
141             => "invalid parent '%s' (not a UI::Various::container)",
142             invalid_scalar__1_in_call_to__2
143             => "invalid scalar '%s' in call to %s",
144             invalid_scalar__1_in_call_to__2__3
145             => "invalid scalar '%s' in call to %s::%s",
146             invalid_selection
147             => "invalid selection\n",
148             invalid_value__1_for_parameter__2_in_call_to__3__4
149             => "invalid value %s for parameter '%s' in call to %s::%s",
150             leave_box
151             => 'leave box',
152             leave_dialog
153             => 'leave dialogue',
154             leave_listbox
155             => 'leave listbox',
156             leave_window
157             => 'leave window',
158             mandatory_parameter__1_is_missing
159             => "mandatory parameter '%s' is missing",
160             message__1_missing_in__2
161             => "message '%s' missing in '%s'",
162             new_value
163             => 'new value',
164             next_previous_window
165             => ', <+>/<-> next/previous window',
166             no_element_found_for_index__1
167             => 'no element found for index %d',
168             no_free_position_for__1_in_call_to__2__3
169             => 'no free position for %s in call to %s::%s',
170             odd_number_of_parameters_in_initialisation_list_of__1
171             => 'odd number of parameters in initialisation list of %s',
172             old_value
173             => 'old value',
174             options_must_be_specified_as_hash
175             => 'options must be specified as {hash}',
176             parameter__1_must_be_a_positive_integer
177             => "parameter '%s' must be a positive integer",
178             parameter__1_must_be_a_positive_integer_in_call_to__2__3
179             => "parameter '%s' must be a positive integer in call to %s::%s",
180             parameter__1_must_be_in__2__3
181             => "parameter '%s' must be in [%s..%s]",
182             scrolls
183             => '+/- scrolls',
184             specified_implementation_missing
185             => 'specified implementation missing',
186             stderr_not_0_1_2_or_3
187             => 'stderr not 0, 1, 2 or 3',
188             ui_various_core_must_be_1st_used_from_ui_various
189             => 'UI::Various::core must be 1st used from UI::Various',
190             undefined_input
191             => 'undefined input',
192             undefined_logging_level__1
193             => "undefined logging level '%s'",
194             unknown_option__1
195             => "unknown option '%s'",
196             unsupported_language__1
197             => "unsupported language '%s'",
198             unsupported_ui_element__1__2
199             => "unsupported UI element '%s': %s",
200             unsupported_ui_package__1
201             => "unsupported UI package '%s'",
202             use_option_must_be_an_array_reference
203             => "'use' option must be an ARRAY reference",
204              
205             ####################################################################
206             # Warnings and information usually don't need location information, so
207             # it's good practice to finish all with a "\n";
208             using__1_as_ui
209             => "using '%s' as UI\n",
210              
211             ####################################################################
212             # don't translate these into other languages, they are only needed for
213             # specific tests (including fallback test):
214             zz_unit_test
215             => 'unit test string',
216             zz_unit_test_empty
217             => '',
218             zz_unit_test_text
219             => 'dummy text',
220             );
221              
222             1;
223              
224             #########################################################################
225             #########################################################################
226              
227             =head1 SEE ALSO
228              
229             L
230              
231             =head1 LICENSE
232              
233             Copyright (C) Thomas Dorner.
234              
235             This library is free software; you can redistribute it and/or modify it
236             under the same terms as Perl itself. See LICENSE file for more details.
237              
238             =head1 AUTHOR
239              
240             Thomas Dorner Edorner (AT) cpan.orgE
241              
242             =cut