ALT Linux Bugzilla
– Attachment 1598 Details for
Bug 9894
Show localized 'Select language' prompt
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
localized prompt
design-bootloader-Compact-2.9.8-alt-prompts.diff (text/plain), 2.65 KB, created by
Grigory Batalov
on 2006-08-19 15:40:18 MSD
(
hide
)
Description:
localized prompt
Filename:
MIME Type:
Creator:
Grigory Batalov
Created:
2006-08-19 15:40:18 MSD
Size:
2.65 KB
patch
obsolete
>diff -rubB design-bootloader-Compact-2.9.8.orig/dia_lang.inc design-bootloader-Compact-2.9.8/dia_lang.inc >--- design-bootloader-Compact-2.9.8.orig/dia_lang.inc 2005-06-27 13:33:34 +0400 >+++ design-bootloader-Compact-2.9.8/dia_lang.inc 2006-08-19 14:31:43 +0400 >@@ -12,6 +12,7 @@ > % fallback if there is no "languages" > /lang.items [ "en" ] def > /lang.names [ "English" ] def >+/lang.prompts [ "In order to select language, press F3" ] def > > /.la.locale 0 def > /.la.name 1 def >@@ -22,7 +23,7 @@ > [ "bg" "ÐÑлгаÑÑки" ] > [ "be" "ÐелаÑÑÑкаÑ" ] > [ "cs" "ÄeÅ¡tina" ] >- [ "en" "English" ] >+ [ "en" "Eng lish" ] > [ "fr" "Français" ] > [ "de" "Deutsch" ] > [ "es" "Español" ] >@@ -45,6 +46,12 @@ > [ "zh_TW" "ç¹é«ä¸æ" ] > ] def > >+/lang.defaultprompts [ >+ [ "en" "In order to select language, press F3" ] >+ [ "ru" "ЧÑÐ¾Ð±Ñ Ð²ÑбÑаÑÑ ÑзÑк, нажмиÑе F3" ] >+ [ "uk" "ÐибÑÑ Ð¼Ð¾Ð²Ð¸ клавÑÑÐ¾Ñ F3" ] >+ [ "be" "по-белаÑÑÑÑки" ] >+] def > > % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > % Get language name. >@@ -59,6 +66,18 @@ > } forall > } def > >+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >+% Get localized prompt. >+% >+% Returns locale if not found. >+% >+% ( locale ) ==> ( name ) >+% >+/lang.getdefprompt { >+ lang.defaultprompts { >+ dup .la.locale get 2 index eq { .la.name get exch pop exit } { pop } ifelse >+ } forall >+} def > > % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > % Parse "languages" file. >@@ -115,6 +134,24 @@ > > 0 seteotchar > >+ /lang.maxprompt 0 def >+ /lang.prompts [ >+ >+ lang.items { >+ dup >+ >+ dup length add >+ dup 0 0 put >+ 1 add >+ >+ dup "" ne { exch pop } { pop lang.getdefprompt } ifelse >+% save maximum prompt width >+ dup strsize pop dup lang.maxprompt gt { /lang.maxprompt exch def } { pop } ifelse >+ >+ } forall >+ >+ ] def >+ > } def > > >@@ -128,6 +165,7 @@ > /xmenu xmenu.lang def > > lang.parsedata >+ lang.showprompts > > xmenu .xm_current lang.default put > xmenu .xm_list lang.names put >@@ -150,6 +188,29 @@ > > > % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >+% Show localized prompts >+% >+% ( ) ==> ( ) >+% >+/lang.showprompts { >+ >+% move to 'Boot options' position >+ boot.pos moveto >+% move left by half of max prompt and by 40 px down >+ 0 lang.maxprompt 2 div sub 40 rmoveto >+ >+ lang.prompts { >+ >+ dup show >+% move -width(prompt), +height(prompt) >+ strsize exch 0 exch sub exch rmoveto >+ >+ } forall >+ >+} def >+ >+ >+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > % Update language. > % > % ( ) ==> ( )
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9894
: 1598 |
1599