File: support.language.pl.template

package info (click to toggle)
language-env 0.64
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,588 kB
  • ctags: 125
  • sloc: perl: 6,243; makefile: 83; tcl: 64; sh: 18
file content (343 lines) | stat: -rw-r--r-- 11,942 bytes parent folder | download | duplicates (4)
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# !Nihongo,Japanese! -*-coding: iso-8859-1;-*-
#
# -------------------------------------------------------------------
# The 1st line indicates the name of the language WITH ASCII CHARSET.
# (NOT ISO-8859-1 !!!)  The language name is specified between two
# exclamation marks ("!").  This name is used as an item of language 
# list.
# 
# Here is an example for Japanese.  'Nihongo' is a Japanese word which
# means 'Japanese language', which is expressed in Latin alphabets.
# 
# You can also specify the codeset of your language support file as 
# this way.  Read infopages of emacs20 for detail.
# -------------------------------------------------------------------
#
#
#
# -------------------------------------------------------------------
# Template of Language Support File
#
# People who want to add a new language support to this package
# have to write a language support file.  This file is a template
# for such language support file.  This file also serves as a default
# language support file for a language whose support file lacks a part
# of subroutines.
# Read /usr/share/doc/language-env/README.i18n for detail.
# ------------------------------------------------------------------
#
#
#
# ---------------------------------------------------
# isNC() is a subroutine to check Native Character 
# Environment.  Native Character Environment means 
# an environment where non-ASCII native character, 
# such as Kanji in Japanese or umlaut in German, can 
# be displayed. NOTE THAT ISO-8859-1 IS NOT ASCII!
#
# The meaning of return value is:
#   0: not Native Character Environment, and
#   1: Native Character Environment.
# isNC() should try to establish Native Character
# Environment if it can.  If isNC() can not figure
# out here is Native Character Environment or not,
# return 0. Otherwise 'MOJI-BAKE' or entirely
# meaningless row of characters may occur.
#
# Three parameters are given.
#  The first one is the name of the script.
#  The second one is the command option given to the
#  script.
#  The third one is $main::opt_N, which inhibits to
#  fork another set-language-env.
# ---------------------------------------------------
sub isNC($$$)
{
	return 0;
}

# ---------------------------------------------------
# initialize() is a subroutine to initialize Sub:: 
# variables with/without dialog.
# Any variables in Sub:: package can be set here to
# be used in dot.*.pl files.
# ---------------------------------------------------
sub initialize()
{
	return 0;
}

# ---------------------------------------------------
# sourceset2displayset() is a subroutine to convert a 
# string from Source Character Codeset into Display 
# Character Codeset.
#
# This subroutine needs 'real' contents if the language
# (character set) has multiple codesets and a codeset
# for source code and a codeset to be displayed is
# different.
#
# For example, Japanese version converts from EUC-JP 
# into ISO-2022-JP because EUC-JP is the safest for
# source code and ISO-2022-JP is the safest to be
# displayed.
# ---------------------------------------------------
sub sourceset2displayset ($)
{
	return $_[0];
}

# ---------------------------------------------------
# analcode() is a subroutine to guess the codeset of
# string given by a parameter.  The meaning of the
# result value is same to convcode().
#
# This subroutine is used to detect the codeset of
# existing dotfiles because the additional contents
# have to be written in the same codeset to the
# existing contents.  Of course this subroutine
# is needed only for languages for which multiple
# codesets are used.
#
# The programmer for each language can determine
# the meaning of the return value of this subroutine.
# For example, Japanese version of analcode returns
# 'JIS' for ISO-2022-JP codeset, 'SJIS' for Shift-JIS
# codeset, and 'EUC' for EUC-JP codeset.
# ---------------------------------------------------
sub analcode($)
{
	return 0;
}

# ---------------------------------------------------
# Convert the given string from its codeset into the
# given codeset.  The string is given by the 1st 
# parameter and the codeset is given by the 2nd 
# parameter.  The actual value of the 2nd parameter
# has to be the same as the return value of analcode
# subroutine.
#
# This subroutine is used to write additional contents
# to dotfiles in proper codeset.  Of course this 
# subroutine is needed only for languages for which
# multiple codesets are used.
# ---------------------------------------------------
sub convcode($$)
{
	return $_[0];
}


# ---------------------------------------------------
# This hash variable contains translated messages in your language.
# This is similar to catalog file for gettext.
#
# The KEYs of the hash are original strings in the source code
# (/usr/bin/set-language-env).  The VALUEs of the hash are translated
# messages.  One VALUE can contain two messages whose meanings are
# same.  These two messages are separated by "\000".  The first
# message has to be expressed by ASCII characters (NOT ISO-8859-1!!!)
# and the second one can contain native characters such as Kanji,
# characters with umlaut and Cyrillic characters. The second messages
# has to written in the Source Character Codeset (see the comment
# for sourceset2displayset() subroutine).  The second messages can
# be omitted if it is same as the first one.
# ---------------------------------------------------

%messages = (

# msgid
  "\nPush [Enter] key to End.\n" =>
# msgstr1 (in native language but in ASCII)
  "\nPush [Enter] key to End.\n\000".
# msgstr2 (in native language and in native character set: for
# example ISO-8859-1)
  "\nPush [Enter] key to End.\n" ,

# msgid
  "Now obtaining package list...\n" =>
# msgstr1 (in ASCII)
  "Now obtaining package list...\n\000".
# msgstr2 (in Native Character Set)
  "Now obtaining package list...\n" ,

# msgid
  "Do setting? " =>
# msgstr1 (in ASCII)
  "Do setting? \000".
# msgstr2 (in Native Character Set)
  "Do setting? " ,

# msgid
  "Setting is not done.\n" =>
# msgstr1 (ASCII)
  "Setting is not done.\n\000".
# msgstr2 (in Native Character Set)
  "Setting is not done.\n" ,

# msgid
  "Do setting...\n" =>
# msgstr1 (ASCII)
  "Do setting...\n\000".
# msgstr2 (in Native Character Set)
  "Do setting...\n" ,

# msgid
  "Cannot read \"%s\".\n" =>
# msgstr1 (ASCII)
  "Cannot read \"%s\".\n\000".
# msgstr2 (in Native Character Set)
  "Cannot read \"%s\".\n" ,

# msgid
  "Making a new file \"%s\"...\n" =>
# msgstr1 (ASCII)
  "Making a new file \"%s\"...\n\000".
# msgstr2 (in Native Character Set)
  "Making a new file \"%s\"...\n" ,

# msgid
  "Cannot open \"%s\".\n" =>
# msgstr1 (ASCII)
  "Cannot open \"%s\".\n\000".
# msgstr2 (in Native Character Set)
  "Cannot open \"%s\".\n" ,

# msgid
  "Cannot write to \"%s\".\n" =>
# msgstr1 (ASCII)
  "Cannot write to \"%s\".\n\000".
# msgstr2 (in Native Character Set)
  "Cannot write to \"%s\".\n" ,

# msgid
  "Cannot lock \"%s\".\n" =>
# msgstr1 (ASCII)
  "Cannot lock \"%s\".\n\000".
# msgstr2 (in Native Character Set)
  "Cannot lock \"%s\".\n" ,

# msgid
  "Cannot close \"%s\".\n" =>
# msgstr1 (ASCII)
  "Cannot close \"%s\".\n\000".
# msgstr2 (in Native Character Set)
  "Cannot close \"%s\".\n" ,

# msgid
  "Install the following packages.\n" =>
# msgstr1 (ASCII)
  "Install the following packages.\n\000".
# msgstr2 (in Native Character Set)
  "Install the following packages.\n" ,

# msgid
  "   Setting is now done.  To activate these settings,\n".
  "logout and login.\n".
  "   Read each dotfile and confirm the modification.\n".
  "If you don't like the setting, modify directly or\n".
  "add overriding setting after 'language-env end' line.\n".
  "   Read /usr/share/doc/language-env/README.* for detail.\n" =>
# msgstr1 (ASCII)
  "   Setting is now done.  To activate these settings,\n".
  "logout and login.\n".
  "   Read each dotfile and confirm the modification.\n".
  "If you don't like the setting, modify directly or\n".
  "add overriding setting after 'language-env end' line.\n".
  "   Read /usr/share/doc/language-env/README.* for detail.\n\000".
# msgstr2 (in Native Character Set)
  "   Setting is now done.  To activate these settings,\n".
  "logout and login.\n".
  "   Read each dotfile and confirm the modification.\n".
  "If you don't like the setting, modify directly or\n".
  "add overriding setting after 'language-env end' line.\n".
  "   Read /usr/share/doc/language-env/README.* for detail.\n" ,

# msgid
  "Usage: set-language-env [options]\n".
  "  -l language : Specify language (otherwise choose from menu)\n".
  "  -h          : This help message\n".
  "  -v          : 'verbose mode'\n".
  "  -s          : Display list of supported languages and exit\n".
  "  -r          : Remove all settings\n".
  "  -N          : Never fork another set-language-env (for internal use)\n".
  "  -c          : Don't use native character set (for internal use)\n".
  "  -C          : Use native character set (for internal use)\n".
  "  -E          : Setting for /etc/skel directory (root user only)\n" =>
# msgstr1 (ASCII)
  "Usage: set-language-env [options]\n".
  "  -l language : Specify language (otherwise choose from menu)\n".
  "  -h          : This help message\n".
  "  -v          : 'verbose mode'\n".
  "  -s          : Display list of supported languages and exit\n".
  "  -r          : Remove all settings\n".
  "  -N          : Never fork another set-language-env (for internal use)\n".
  "  -c          : Don't use native character set (for internal use)\n".
  "  -C          : Use native character set (for internal use)\n".
  "  -E          : Setting for /etc/skel directory (root user only)\n\000".
# msgstr2 (in Native Character Set)
  "Usage: set-language-env [options]\n".
  "  -l language : Specify language (otherwise choose from menu)\n".
  "  -h          : This help message\n".
  "  -v          : 'verbose mode'\n".
  "  -s          : Display list of supported languages and exit\n".
  "  -r          : Remove all settings\n".
  "  -N          : Never fork another set-language-env (for internal use)\n".
  "  -c          : Don't use native character set (for internal use)\n".
  "  -C          : Use native character set (for internal use)\n".
  "  -E          : Setting for /etc/skel directory (root user only)\n" ,

# msgid
  "Install the following locales.\n" =>
# msgstr1 (ASCII)
  "Install the following locales.\n\000".
# msgstr2 (in Native Character Set)
  "Install the following locales.\n" ,

# msgid
  "(Edit /etc/locale.gen and invoke locale-gen)\n" =>
# msgstr1 (ASCII)
  "(Edit /etc/locale.gen and invoke locale-gen)\n\000".
# msgstr2 (in Native Character Set)
  "(Edit /etc/locale.gen and invoke locale-gen)\n" ,

# msgid
  "" =>
# msgstr1 (ASCII)
  "\000".
# msgstr2 (in Native Character Set)
  ""

);

# ---------------------------------------------------
# These variables describe which characters to be used
# for user input to express 'yes' and 'no' in native 
# language.  '*_upper' and '*_lower' have to be 
# different because upper one is used to express
# default reply (when only Enter is pressed).  ASCII
# codeset has to be used.  (NOT ISO-8859-1!!!!)
# ---------------------------------------------------
$yes_upper = "Y";
$yes_lower = "y";
$no_upper = "N";
$no_lower = "n";

# ---------------------------------------------------
# This variable shows the needed locale.  This is
# introduced since language-env 0.12 because locales
# package stopped to supply precompiled locale data
# since locales 2.2-1.
#
# The check is done by whether the directory of
# /usr/lib/locales/$needlocale exists or not.
#
# Multiple locales can be specified with delimiter
# of space code.
#
# You may specify how to write /etc/locale.gen line
# for the locale like the following.  In the string,
# whitespace must be replaced by "!".
# ---------------------------------------------------
$need_locale = 'en_US.UTF-8 en_US@euro(en_US@euro!ISO-8859-15)';