View | Details | Raw Unified | Return to bug 9894
Collapse All | Expand All

(-)design-bootloader-Compact-2.9.8.orig/dia_lang.inc (-1 / +62 lines)
Lines 12-17 Link Here
12
% fallback if there is no "languages"
12
% fallback if there is no "languages"
13
/lang.items [ "en" ] def
13
/lang.items [ "en" ] def
14
/lang.names [ "English" ] def
14
/lang.names [ "English" ] def
15
/lang.prompts [ "In order to select language, press F3" ] def
15
16
16
/.la.locale 0 def
17
/.la.locale 0 def
17
/.la.name   1 def
18
/.la.name   1 def
Lines 22-28 Link Here
22
  [ "bg" "Български" ]
23
  [ "bg" "Български" ]
23
  [ "be" "Беларуская" ]
24
  [ "be" "Беларуская" ]
24
  [ "cs" "Čeština" ]
25
  [ "cs" "Čeština" ]
25
  [ "en" "English" ]
26
  [ "en" "Eng lish" ]
26
  [ "fr" "Français" ]
27
  [ "fr" "Français" ]
27
  [ "de" "Deutsch" ]
28
  [ "de" "Deutsch" ]
28
  [ "es" "Español" ]
29
  [ "es" "Español" ]
Lines 45-50 Link Here
45
  [ "zh_TW" "繁體中文" ]
46
  [ "zh_TW" "繁體中文" ]
46
] def
47
] def
47
48
49
/lang.defaultprompts [
50
  [ "en" "In order to select language, press F3" ]
51
  [ "ru" "Чтобы выбрать язык, нажмите F3" ]
52
  [ "uk" "Вибір мови клавішою F3" ]
53
  [ "be" "по-беларусски" ]
54
] def
48
55
49
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
56
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
50
% Get language name.
57
% Get language name.
Lines 59-64 Link Here
59
  } forall
66
  } forall
60
} def
67
} def
61
68
69
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
70
% Get localized prompt.
71
%
72
% Returns locale if not found.
73
%
74
% ( locale ) ==> ( name )
75
%
76
/lang.getdefprompt {
77
  lang.defaultprompts {
78
    dup .la.locale get 2 index eq { .la.name get exch pop exit } { pop } ifelse
79
  } forall
80
} def
62
81
63
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
82
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
64
% Parse "languages" file.
83
% Parse "languages" file.
Lines 115-120 Link Here
115
134
116
  0 seteotchar
135
  0 seteotchar
117
136
137
  /lang.maxprompt 0 def
138
  /lang.prompts [
139
140
    lang.items {
141
      dup
142
143
      dup length add
144
      dup 0 0 put
145
      1 add
146
147
      dup "" ne { exch pop } { pop lang.getdefprompt } ifelse
148
% save maximum prompt width
149
      dup strsize pop dup lang.maxprompt gt { /lang.maxprompt exch def } { pop } ifelse
150
151
    } forall
152
153
  ] def
154
118
} def
155
} def
119
156
120
157
Lines 128-133 Link Here
128
  /xmenu xmenu.lang def
165
  /xmenu xmenu.lang def
129
166
130
  lang.parsedata
167
  lang.parsedata
168
  lang.showprompts
131
169
132
  xmenu .xm_current lang.default put
170
  xmenu .xm_current lang.default put
133
  xmenu .xm_list lang.names put
171
  xmenu .xm_list lang.names put
Lines 150-155 Link Here
150
188
151
189
152
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
190
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
191
% Show localized prompts
192
%
193
% ( ) ==> ( )
194
%
195
/lang.showprompts {
196
197
% move to 'Boot options' position
198
  boot.pos moveto
199
% move left by half of max prompt and by 40 px down
200
  0 lang.maxprompt 2 div sub 40 rmoveto
201
  
202
  lang.prompts {
203
 
204
    dup show
205
% move -width(prompt), +height(prompt)
206
    strsize exch 0 exch sub exch rmoveto
207
208
  } forall
209
210
} def
211
212
213
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
153
% Update language.
214
% Update language.
154
%
215
%
155
% ( ) ==> ( )
216
% ( ) ==> ( )

Return to bug 9894