diff options
author | Matt Wilson <msw@redhat.com> | 2000-04-17 20:00:33 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-04-17 20:00:33 +0000 |
commit | 6f122a2794396f1777e3fe41bc98fda27e67ae44 (patch) | |
tree | 3074b305703c1f0170673657ae0e5834a1085f5a | |
parent | 96040f2d2acfcc3052eefd2102227aabbaf70f6f (diff) | |
download | anaconda-6f122a2794396f1777e3fe41bc98fda27e67ae44.tar.gz anaconda-6f122a2794396f1777e3fe41bc98fda27e67ae44.tar.xz anaconda-6f122a2794396f1777e3fe41bc98fda27e67ae44.zip |
merge from anaconda-6-2j-branch
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Makefile.inc | 6 | ||||
-rw-r--r-- | fstab.py | 5 | ||||
-rw-r--r-- | iutil.py | 39 | ||||
-rw-r--r-- | iw/installpath.py | 39 | ||||
-rw-r--r-- | iw/keyboard.py | 9 | ||||
-rw-r--r-- | iw/language.py | 6 | ||||
-rw-r--r-- | iw/rootpartition.py | 13 | ||||
-rw-r--r-- | iw/timezone.py | 3 | ||||
-rw-r--r-- | lang-table | 34 | ||||
-rw-r--r-- | lang-table-kon | 2 | ||||
-rw-r--r-- | loader/Makefile | 68 | ||||
-rw-r--r-- | loader/kon2/.config | 2 | ||||
-rw-r--r-- | loader/kon2/src/main.c | 2 | ||||
-rw-r--r-- | loader/lang.c | 65 | ||||
-rw-r--r-- | loader/loader.c | 72 | ||||
-rw-r--r-- | milo.py | 12 | ||||
-rw-r--r-- | po/ja.po | 26 | ||||
-rw-r--r-- | textw/timezone.py | 2 | ||||
-rw-r--r-- | todo.py | 8 | ||||
-rwxr-xr-x | utils/uniqkanji.pl | 44 |
21 files changed, 310 insertions, 149 deletions
@@ -23,7 +23,7 @@ CATALOGS = po/anaconda.pot PYFILES = $(wildcard *.py) -all: subdirs _xkb.so xmouse.so $(CATALOGS) +all: subdirs _xkb.so xmouse.so $(CATALOGS) lang-table _xkb.so: xkb.c gcc -Wall -o _xkb.o -fPIC -I/usr/include/python1.5 `gtk-config --cflags gtk` -c xkb.c diff --git a/Makefile.inc b/Makefile.inc index 18ebb61d9..0facf62b9 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -8,3 +8,9 @@ ANACONDADATADIR = /usr/share/anaconda ARCH := $(patsubst i%86,i386,$(shell uname -m)) ARCH := $(patsubst sparc%,sparc,$(ARCH)) + +# +# define options +# +JAPANESE=1 + @@ -301,8 +301,9 @@ class Fstab: rt.write("#nr-spare-disks 0\n") i = 0 for subDevName in makeup: - isys.makeDevInode(deviceDict[subDevName], '%s/%s' % - (devPrefix, deviceDict[subDevName])) + if createDevices: + isys.makeDevInode(deviceDict[subDevName], '%s/%s' % + (devPrefix, deviceDict[subDevName])) rt.write(" device %s/%s\n" % (devPrefix, deviceDict[subDevName],)) rt.write(" raid-disk %d\n" % (i,)) @@ -291,3 +291,42 @@ esac execWithRedirect('/bin/sh', args, stdin = None, stdout = None, stderr = None, root = root) + +def defaultZone(): + if os.access("lang-table", os.R_OK): + f = open("lang-table", "r") + elif os.access("/etc/lang-table", os.R_OK): + f = open("/etc/lang-table", "r") + else: + f = open("/usr/lib/anaconda/lang-table", "r") + + lines = f.readlines () + f.close() + + for line in lines: + string.strip(line) + l = string.split(line) + if l[4] == os.environ["LANG"]: + return l[6] + + return "America/New_York" + +def defaultKeyboard(): + if os.access("lang-table", os.R_OK): + f = open("lang-table", "r") + elif os.access("/etc/lang-table", os.R_OK): + f = open("/etc/lang-table", "r") + else: + f = open("/usr/lib/anaconda/lang-table", "r") + + lines = f.readlines () + f.close() + + for line in lines: + string.strip(line) + l = string.split(line) + if l[4] == os.environ["LANG"]: + return l[5] + + return "us" + diff --git a/iw/installpath.py b/iw/installpath.py index 71cd2434f..f26cdd723 100644 --- a/iw/installpath.py +++ b/iw/installpath.py @@ -33,14 +33,17 @@ WORKSTATION_GNOME = 3 WORKSTATION_KDE = 4 SERVER = 5 +def D_(x): + return x + class InstallPathWindow (InstallWindow): - installTypes = ((WORKSTATION_GNOME, _("GNOME Workstation"), + installTypes = ((WORKSTATION_GNOME, D_("GNOME Workstation"), "gnome-workstation.png"), - (WORKSTATION_KDE, _("KDE Workstation"), + (WORKSTATION_KDE, D_("KDE Workstation"), "kde-workstation.png"), - (SERVER, _("Server"), "server.png"), - (CUSTOM, _("Custom"), "custom.png")) + (SERVER, D_("Server"), "server.png"), + (CUSTOM, D_("Custom"), "custom.png")) def __init__ (self, ics): if iutil.getArch() == 'sparc': @@ -213,10 +216,11 @@ class InstallPathWindow (InstallWindow): default = WORKSTATION_GNOME self.installBox = GtkVBox (FALSE, 0) + group = None self.installClasses = [] for (type, name, pixmap) in self.installTypes: - group = self.pixRadioButton (group, name, pixmap) + group = self.pixRadioButton (group, _(name), pixmap) self.installBox.pack_start (group, FALSE) self.installClasses.append ((group, type)) if (type == default): @@ -225,11 +229,18 @@ class InstallPathWindow (InstallWindow): spacer = GtkLabel("") spacer.set_usize(60, 1) - table = GtkTable(2, 3) - table.attach(installButton, 0, 2, 0, 1) - table.attach(spacer, 0, 1, 1, 2, xoptions = FALSE) - table.attach(self.installBox, 1, 2, 1, 2, xoptions = FILL | EXPAND) - table.attach(self.upgradeButton, 0, 2, 2, 3) + InstallPathWindow.fdisk = GtkCheckButton (_("Use fdisk")) + align = GtkAlignment () + align.add (InstallPathWindow.fdisk) + align.set (0.0, 0.0, 0.0, 0.0) + + table = GtkTable(2, 4) + table.attach(installButton, 0, 2, 0, 1, xoptions = FILL | EXPAND) + table.attach(align, 2, 3, 0, 1, xoptions = FALSE) +# table.attach(spacer, 0, 1, 1, 2, xoptions = FALSE) + self.installBox.set_usize(300, -1) + table.attach(self.installBox, 1, 3, 1, 2) + table.attach(self.upgradeButton, 0, 3, 2, 3) box.pack_start(table, FALSE) @@ -239,16 +250,8 @@ class InstallPathWindow (InstallWindow): else: fdiskState = InstallPathWindow.fdisk.get_active() - InstallPathWindow.fdisk = GtkCheckButton (_("Use fdisk")) InstallPathWindow.fdisk.set_active(fdiskState) - align = GtkAlignment () - align.add (InstallPathWindow.fdisk) - align.set (0.0, 0.0, 0.0, 0.0) - hbox.pack_start (box, TRUE) - hbox.pack_start (align, FALSE) - box = hbox - self.toggled (installButton, INSTALL) self.toggled (self.upgradeButton, UPGRADE) box.set_border_width (5) diff --git a/iw/keyboard.py b/iw/keyboard.py index 3acce3cb2..e9d6f0a00 100644 --- a/iw/keyboard.py +++ b/iw/keyboard.py @@ -4,6 +4,8 @@ import xkb import string import keyboard from translate import _ +from kbd import Keyboard +import iutil class KeyboardWindow (InstallWindow): @@ -40,6 +42,13 @@ class KeyboardWindow (InstallWindow): self.kb.setRule (self.model, self.layout, self.variant, "complete") def getScreen (self): + if not self.hasrun: + default = iutil.defaultKeyboard() + if Keyboard.console2x.has_key (default): + self.model = Keyboard.console2x[default][0] + self.layout = Keyboard.console2x[default][1] + self.kb.setRule (self.model, self.layout, self.variant, "complete") + box = GtkVBox (FALSE, 5) im = self.ics.readPixmap ("gnome-keyboard.png") if im: diff --git a/iw/language.py b/iw/language.py index f77f6d350..68cbe707b 100644 --- a/iw/language.py +++ b/iw/language.py @@ -18,8 +18,6 @@ class LanguageWindow (InstallWindow): ics.readHTML ("lang") self.ics = ics self.icw = ics.getICW () - self.question = (_("What language should be used during the " - "installation process?")) self.languages = self.todo.language.available () self.running = 0 self.lang = None @@ -30,7 +28,6 @@ class LanguageWindow (InstallWindow): self.icw.setLanguage (self.languages[self.lang]) return None - def select_row (self, clist, row, col, event): if self.running: lang = clist.get_text (clist.selection[0], 0) @@ -39,7 +36,8 @@ class LanguageWindow (InstallWindow): def getScreen (self): self.running = 0 mainBox = GtkVBox (FALSE, 10) - label = GtkLabel (self.question) + label = GtkLabel (_("What language should be used during the " + "installation process?")) label.set_alignment (0.5, 0.5) label.set_line_wrap (TRUE) diff --git a/iw/rootpartition.py b/iw/rootpartition.py index 7be4b74a0..bef01cb2c 100644 --- a/iw/rootpartition.py +++ b/iw/rootpartition.py @@ -152,14 +152,6 @@ class LoopSizeWindow(InstallWindow): return vbox class AutoPartitionWindow(InstallWindow): - def __init__ (self, ics): - InstallWindow.__init__ (self, ics) - - self.todo = ics.getToDo () - ics.setTitle (_("Automatic Partitioning")) - ics.setNextEnabled (TRUE) - self.ics = ics - def getPrev(self): self.druid = None self.beingDisplayed = 0 @@ -194,8 +186,9 @@ class AutoPartitionWindow(InstallWindow): return None - def __init__(self, todo): - InstallWindow.__init__(self, todo) + def __init__(self, ics): + InstallWindow.__init__(self, ics) + ics.setTitle (_("Automatic Partitioning")) self.druid = None self.beingDisplayed = 0 diff --git a/iw/timezone.py b/iw/timezone.py index 783f8e77c..959793b33 100644 --- a/iw/timezone.py +++ b/iw/timezone.py @@ -3,6 +3,7 @@ from iw import * import string from gnome.ui import GnomeCanvas from translate import _ +import iutil import timezonemap @@ -123,7 +124,7 @@ class TimezoneWindow (InstallWindow): if rc: (self.default, asUTC, asArc) = rc else: - self.default = "America/New_York" + self.default = iutil.defaultZone () asUTC = 0 if (string.find (self.default, "UTC") != -1): diff --git a/lang-table b/lang-table index 677d2644e..dcbc0a60b 100644 --- a/lang-table +++ b/lang-table @@ -1,17 +1,17 @@ -Czech cs lat2-sun16 iso02 cs_CZ -English en None None en_US -French fr None None fr_FR -German de None None de_DE -Hungarian hu lat2-sun16 iso02 hu_HU -Icelandic is lat0-sun16 iso15 is_IS -Italian it lat0-sun16 iso15 it_IT -Norwegian no lat0-sun16 iso15 no_NO -Romanian ro lat2-sun16 iso02 ro_RO -Russian ru cyr-sun16 koi8-r ru_RU.KOI8-R -Serbian sr lat2-sun16 iso02 sr_YU -Slovak sk lat2-sun16 iso02 sk_SK -Slovenian sl lat2-sun16 iso02 sl_SI -Spanish es None None es_ES -Swedish sv lat0-sun16 iso15 sv_SV -Turkish tr lat5-sun16 iso09 tr_TR -Ukrainian uk cyr-sun16 koi8-u uk_UA.KOI8-U +Czech cs lat2-sun16 iso02 cs_CZ cz-lat2 Europe/Prague +English en None None en_US us America/New_York +French fr None None fr_FR fr-latin1 Europe/Paris +German de None None de_DE de-latin1 Europe/Berlin +Hungarian hu lat2-sun16 iso02 hu_HU hu Europe/Budapest +Icelandic is lat0-sun16 iso15 is_IS is-latin1 Europe/Rome +Italian it lat0-sun16 iso15 it_IT it Iceland +Norwegian no lat0-sun16 iso15 no_NO no-latin1 Europe/Oslo +Romanian ro lat2-sun16 iso02 ro_RO ro Europe/Bucharest +Russian ru cyr-sun16 koi8-r ru_RU.KOI8-R ru Europe/Moscow +Serbian sr lat2-sun16 iso02 sr_YU sr Europe/Belgrade +Slovak sk lat2-sun16 iso02 sk_SK sk-qwerty Europe/Bratislava +Slovenian sl lat2-sun16 iso02 sl_SI slovene Europe/Ljubljana +Spanish es None None es_ES es Eurpoe/Madrid +Swedish sv lat0-sun16 iso15 sv_SV us Europe/Stockholm +Turkish tr lat5-sun16 iso09 tr_TR trq Turkey +Ukrainian uk cyr-sun16 koi8-u uk_UA.KOI8-U uk Europe/Kiev diff --git a/lang-table-kon b/lang-table-kon new file mode 100644 index 000000000..47885268c --- /dev/null +++ b/lang-table-kon @@ -0,0 +1,2 @@ +English en None None en_US us America/New_York +Japanese ja None None ja_JP.eucJP jp106 Asia/Tokyo
\ No newline at end of file diff --git a/loader/Makefile b/loader/Makefile index dec373147..f4d4b9c4c 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -14,30 +14,24 @@ SOURCES = $(subst .o,.c,$(OBJS) $(LOADEROBJS)) BINS = init DIRS = NETOBJS = net.o -ifeq (i386, $(ARCH)) -KON = 0 -endif PCMCIAOBJS = pcmcia.o $(NETOBJS) OPTS = -O2 -g MODULELINKAGE :=../isys/modutils/insmod/libmodutils.a \ - ../isys/modutils/util/libutil.a \ - ../isys/modutils/obj/libobj.a + ../isys/modutils/util/libutil.a \ + ../isys/modutils/obj/libobj.a CFLAGS = $(DEBUG) $(OPTS) -Wall -D_GNU_SOURCE=1 -I/usr/include/rpm -I.. -DUSE_ALT_DNS=1 -DVERSION='"$(VERSION)"' -DHAVE_LIBIO_H -ggdb ALLOBJS = $(OBJS) $(PCMCIAOBJS) -ifeq (1, $(KON)) -DIRS += kon2 -OBJS += ./kon2/src/libkon.a ./kon2/src/display.a ./kon2/lib/libgon.a -CFLAGS += -DINCLUDE_KON=1 -endif - +# XXX Japanese is i386 only at the moment ifeq (i386, $(ARCH)) -BINS += loader-local loader-network loader-pcmcia -DIRS += pcmcia-install -OBJS += stubs.o +BINS += loader-local loader-network loader-pcmcia \ + loader-local-kon loader-network-kon loader-pcmcia-kon +DIRS += pcmcia-install kon2 +OBJS += stubs.o +KONOBJS += ./kon2/src/libkon.a ./kon2/src/display.a ./kon2/lib/libgon.a endif ifeq (ia64, $(ARCH)) @@ -80,20 +74,19 @@ STATIC=-static endif endif -ifeq (1, $(KON)) -LANGS = ja -else -LANGS = $(shell awk '{ print $$2 }' ../lang-table | grep -v '^en$$') -endif +LANGS = $(shell awk '{ print $$2 }' ../lang-table | egrep -v '(^en$$)|(^ja$$)') TR = $(patsubst %,tr/%.tr,$(LANGS)) TRFILES = $(patsubst %,%.tr,$(LANGS)) -all: dirs $(BINS) loader.tr +all: dirs $(BINS) loader.tr kon-loader.tr loader.tr: $(TR) ../lang-table (cd tr; ls $(TRFILES) | cpio --quiet -Hcrc -o | gzip -9) > $@ +kon-loader.tr: tr/ja.tr ../lang-table + (cd tr; echo ja.tr | cpio --quiet -Hcrc -o | gzip -9) > $@ + loader.po: *.c xgettext --default-domain=loader --add-comments \ --keyword=_ --keyword=N_ *.c @@ -126,12 +119,26 @@ loader-local: loader-local.o $(OBJS) $(MODULELINKAGE) \ -L ../stubs -lz -lresolv -lnewt -lslang -lpci +loader-local-kon: loader-local-kon.o $(OBJS) + $(CC) -g $(STATIC) -o $@ $^ -lpopt \ + -lkudzu_loader ../isys/libisys.a ../balkan/libbalkan.a \ + $(MODULELINKAGE) \ + -L ../stubs -lz -lresolv -lnewt -lslang -lpci + ./kon2/src/libkon.a ./kon2/src/display.a ./kon2/lib/libgon.a + loader-network: loader-net.o $(OBJS) $(NETOBJS) $(CC) -g $(STATIC) -o $@ $^ -lpopt \ -lkudzu_loader ../isys/libisys.a ../balkan/libbalkan.a \ $(MODULELINKAGE) \ -lpump -lrpm -lbz2 -lz -lresolv -lnewt -lslang -lpci +loader-network-kon: loader-net-kon.o $(OBJS) $(NETOBJS) + $(CC) -g $(STATIC) -o $@ $^ -lpopt \ + -lkudzu_loader ../isys/libisys.a ../balkan/libbalkan.a \ + $(MODULELINKAGE) \ + -lpump -lrpm -lbz2 -lz -lresolv -lnewt -lslang -lpci + ./kon2/src/libkon.a ./kon2/src/display.a ./kon2/lib/libgon.a + loader-pcmcia: loader-pcmcia.o pcmcia.o popen.o $(OBJS) $(PCMCIAOBJS) $(CC) -g $(STATIC) -o $@ loader-pcmcia.o $(OBJS) \ $(PCMCIAOBJS) -L pcmcia-install/cardmgr -lcardmgr -lprobe popen.o \ @@ -140,25 +147,44 @@ loader-pcmcia: loader-pcmcia.o pcmcia.o popen.o $(OBJS) $(PCMCIAOBJS) $(MODULELINKAGE) \ -lpump -lrpm -lbz2 -lz -lresolv -lnewt -lslang -lpci +loader-pcmcia-kon: loader-pcmcia-kon.o pcmcia.o popen.o $(OBJS) $(PCMCIAOBJS) + $(CC) -g $(STATIC) -o $@ loader-pcmcia-kon.o $(OBJS) \ + $(PCMCIAOBJS) -L pcmcia-install/cardmgr -lcardmgr -lprobe popen.o \ + -lpopt \ + -lkudzu_loader ../isys/libisys.a ../balkan/libbalkan.a \ + $(MODULELINKAGE) \ + ./kon2/src/libkon.a ./kon2/src/display.a ./kon2/lib/libgon.a + loader.o: loader.c $(CC) -DINCLUDE_LOCAL -DINCLUDE_NETWORK $(CFLAGS) -o $@ -c $^ loader-local.o: loader.c $(CC) -DINCLUDE_LOCAL $(CFLAGS) -o $@ -c $^ +loader-local-kon.o: loader.c + $(CC) -DINCLUDE_LOCAL -DINCLUDE_KON $(CFLAGS) -o $@ -c $^ + loader-net.o: loader.c $(CC) -DINCLUDE_NETWORK $(CFLAGS) -o $@ -c $^ +loader-net-kon.o: loader.c + $(CC) -DINCLUDE_NETWORK -DINCLUDE_KON $(CFLAGS) -o $@ -c $^ + loader-pcmcia.o: loader.c $(CC) -DINCLUDE_PCMCIA -DINCLUDE_LOCAL -DINCLUDE_NETWORK \ $(CFLAGS) -o $@ -c $^ +loader-pcmcia-kon.o: loader.c + $(CC) -DINCLUDE_PCMCIA -DINCLUDE_LOCAL -DINCLUDE_NETWORK \ + -DINCLUDE_KON $(CFLAGS) -o $@ -c $^ + init: init.o $(MINILIBC) $(CC) $(STATIC) -g $(LDFLAGS) -o $@ init.o $(MINILIBC) clean: rm -f *.o .depend *~ loader-local loader-network loader.old loader-pcmcia probe modprobe \ - loader.po loader.tr tr/*.tr loader init + loader.po loader.tr tr/*.tr loader init loader-local-kon loader-network-kon \ + loader-pcmcia-kon for n in $(DIRS); do \ (cd $$n; make clean) \ done diff --git a/loader/kon2/.config b/loader/kon2/.config index be693892f..e9e116669 100644 --- a/loader/kon2/.config +++ b/loader/kon2/.config @@ -3,7 +3,7 @@ BINDIR = $(TOPDIR)/usr/bin LIBDIR = $(TOPDIR)/etc MANDIR = $(TOPDIR)/usr/man/ja_JP.ujis/man1 CONFIG_NAME = kon.cfg -OPTS = -DCONFIG_NAME=\"$(LIBDIR)/$(CONFIG_NAME)\" -I$(INCDIR) +OPTS = -DCONFIG_NAME=\"$(LIBDIR)/$(CONFIG_NAME)\" -I$(INCDIR) -g CFLAGS = -O2 -Wall $(OPTS) LD = gcc $(CFLAGS) RM = rm -f diff --git a/loader/kon2/src/main.c b/loader/kon2/src/main.c index 1598d64a0..439da2c25 100644 --- a/loader/kon2/src/main.c +++ b/loader/kon2/src/main.c @@ -41,11 +41,13 @@ kon_main(int argc, const char *argv[]) { extern void ChangeNewConsole(); +#if 0 /* disable version number by request */ #ifdef MINI_KON fprintf(stderr, "Kanji ON Console MINI " VERSION "\n\n"); #else fprintf(stderr, "Kanji ON Console " VERSION "\n\n"); #endif +#endif if (geteuid() != 0) { fprintf(stderr, "can not get I/O permissions.\n"); exit(EXIT_FAILURE); diff --git a/loader/lang.c b/loader/lang.c index 2f9752ea4..f516c1f77 100644 --- a/loader/lang.c +++ b/loader/lang.c @@ -70,7 +70,7 @@ char * translateString(char * str) { } struct langInfo { - char * lang, * key, * font, * map, * lc_all; + char * lang, * key, * font, * map, * lc_all, * keyboard; } ; static struct langInfo * languages = NULL; @@ -81,7 +81,8 @@ static void loadLanguageList(int flags) { "/etc/lang-table"; FILE * f; char line[256]; - char name[256], key[256], sun[256], console[256], code[256]; + char name[256], key[256], sun[256], console[256], code[256], + keyboard[256], timezone[256]; int lineNum = 0; f = fopen(file, "r"); @@ -94,8 +95,8 @@ static void loadLanguageList(int flags) { while (fgets(line, sizeof(line), f)) { lineNum++; languages = realloc(languages, sizeof(*languages) * (numLanguages + 1)); - if (sscanf(line, "%s %s %s %s %s\n", name, key, sun, console, - code) != 5) { + if (sscanf(line, "%s %s %s %s %s %s %s\n", name, key, sun, console, + code, keyboard, timezone) != 7) { logMessage("bad line %d in lang-table", lineNum); } else { languages[numLanguages].lang = strdup(name); @@ -103,6 +104,7 @@ static void loadLanguageList(int flags) { languages[numLanguages].font = strdup(sun); languages[numLanguages].map = strdup(console); languages[numLanguages].lc_all = strdup(code); + languages[numLanguages].keyboard = strdup(keyboard); numLanguages++; } } @@ -302,29 +304,34 @@ int chooseLanguage(char ** lang, int flags) { numStrings = allocedStrings = 0; } + { + extern int continuing; + extern void stopNewt(void); + + if (!strcmp (languages[choice].key, "ja") && !continuing) { + char * args[4]; + + stopNewt(); + + args[0] = "kon"; + args[1] = "-e"; + args[2] = FL_TESTING(flags) ? "./loader" : "/sbin/continue"; + args[3] = NULL; + + execv(FL_TESTING(flags) ? "./loader" : "/sbin/loader", args); + } + } + loadLanguage (NULL, flags); if (languages[choice].map) loadFont(languages[choice].map, flags); + newtDrawRootText(0, 0, _("Welcome to Red Hat Linux")); + newtPushHelpLine(_(" <Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen ")); + return 0; } -struct defaultKeyboardByLang { - char * lang, * keyboard; -} defaultKeyboards[] = { - { "de", "de-latin1" }, - { "cs", "cz-lat2" }, - { "fi", "fi-latin1" }, - { "hu", "hu" }, - { "is", "is-latin1" }, - { "it", "it" }, - { "no", "no-latin1" }, - { "ru", "ru" }, - { "se", "se-latin1" }, - { "tr", "trq" }, - { "ja", "jp106" }, - { NULL, NULL } }; - #ifdef __sparc__ struct defaultKeyboardByLang defaultSunKeyboards[] = { @@ -406,6 +413,7 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) { int i; char * defkbd = keymap ? *keymap : NULL; struct defaultKeyboardByLang * kbdEntry; + char *lang; #ifdef __sparc__ #define KBDTYPE_SUN 0 @@ -452,17 +460,26 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) { } } #endif - - if (!defkbd && getenv("LANG")) { - kbdEntry = defaultKeyboards; + + if (!languages) loadLanguageList(flags); + + lang = getenv("LANG"); + if (!defkbd && lang) { + for (i = 0; i < numLanguages; i++) { + if (!strncmp(languages[i].key, lang, 2)) { + defkbd = languages[i].keyboard; + break; + } + } + #ifdef __sparc__ if (kbdtype == KBDTYPE_SUN) kbdEntry = defaultSunKeyboards; -#endif while (kbdEntry->lang && strcmp(kbdEntry->lang, getenv("LANG"))) kbdEntry++; if (kbdEntry->keyboard) defkbd = kbdEntry->keyboard; +#endif } if (!defkbd) #ifdef __sparc__ diff --git a/loader/loader.c b/loader/loader.c index a9b641c7d..ae971d7ee 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -113,9 +113,7 @@ static struct installMethod installMethods[] = { static int numMethods = sizeof(installMethods) / sizeof(struct installMethod); static int newtRunning = 0; -#ifdef INCLUDE_KON -static int startKon = 1; -#endif +int continuing = 0; void doSuspend(void) { newtFinished(); @@ -136,7 +134,7 @@ static void startNewt(int flags) { } } -static void stopNewt(void) { +void stopNewt(void) { if (newtRunning) newtFinished(); } @@ -1122,7 +1120,15 @@ static char * doMountImage(char * location, startNewt(flags); +#ifdef INCLUDE_KON + if (continuing) + step = STEP_KBD; + else + step = STEP_LANG; +#else step = STEP_LANG; +#endif + while (step != STEP_DONE) { switch (step) { case STEP_LANG: @@ -1555,19 +1561,11 @@ static int parseCmdLineFlags(int flags, char * cmdLine, char ** ksSource) { flags |= LOADER_FLAGS_KSFILE; *ksSource = argv[i] + 8; } else if (!strncasecmp(argv[i], "lang=", 5)) { + /* For Japanese, we have two options. We should just + display them so we don't have to start kon if it is not needed. */ +#ifndef INCLUDE_KON setLanguage (argv[i] + 5, flags); -#ifdef INCLUDE_KON - if (!strcmp (argv[i] + 5, "ja") && startKon) { - char * args[5]; - - args[0] = "kon"; - args[1] = "-e"; - args[2] = "/sbin/continue"; - args[3] = NULL; - - execv(FL_TESTING(flags) ? "./loader" : "/sbin/loader", args); - } -#endif /* INCLUDE_KON */ +#endif } } @@ -1826,6 +1824,7 @@ void loadUpdates(struct knownDevices *kd, moduleList modLoaded, } while (!done); chdir("/tmp/updates"); + setenv("PYTHONPATH", "/tmp/updates", 1); return; } @@ -1907,8 +1906,9 @@ int main(int argc, char ** argv) { else if (!strcmp(argv[0] + strlen(argv[0]) - 3, "kon")) { i = kon_main(argc, argv); return i; - } else if (!strcmp(argv[0] + strlen(argv[0]) - 8, "continue")) - startKon = 0; + } else if (!strcmp(argv[0] + strlen(argv[0]) - 8, "continue")) { + continuing = 1; + } #endif #ifdef INCLUDE_PCMCIA @@ -1969,28 +1969,36 @@ int main(int argc, char ** argv) { flags |= LOADER_FLAGS_KICKSTART; } +#ifdef INCLUDE_KON + if (continuing) + setLanguage ("ja", flags); +#endif + #ifdef INCLUDE_PCMCIA startNewt(flags); - winStatus(40, 3, _("PC Card"), _("Initializing PC Card Devices...")); - startPcmcia(modLoaded, modDeps, modInfo, flags); - newtPopWindow(); + if (!continuing) { + winStatus(40, 3, _("PC Card"), _("Initializing PC Card Devices...")); + startPcmcia(modLoaded, modDeps, modInfo, flags); + newtPopWindow(); + } #endif kdFindIdeList(&kd); kdFindScsiList(&kd); kdFindNetList(&kd); - if (((access("/proc/bus/pci/devices", X_OK) && - access("/proc/openprom", X_OK)) || FL_MODDISK(flags)) + if (!continuing) { + if (((access("/proc/bus/pci/devices", X_OK) && + access("/proc/openprom", X_OK)) || FL_MODDISK(flags)) && !ksFile) { - startNewt(flags); - devLoadDriverDisk(modInfo, modLoaded, &modDeps, flags, 1); - } - - busProbe(modInfo, modLoaded, modDeps, probeOnly, &kd, flags); - if (probeOnly) exit(0); + startNewt(flags); + devLoadDriverDisk(modInfo, modLoaded, &modDeps, flags, 1); + } + busProbe(modInfo, modLoaded, modDeps, probeOnly, &kd, flags); + if (probeOnly) exit(0); + } if (FL_KSHD(flags)) { ksFile = "/tmp/ks.cfg"; kickstartFromHardDrive(ksFile, modLoaded, modDeps, ksSource, flags); @@ -2150,7 +2158,11 @@ int main(int argc, char ** argv) { if (FL_RESCUE(flags)) { *argptr++ = "/bin/sh"; } else { - *argptr++ = "/usr/bin/anaconda"; + if (!access("./anaconda", X_OK)) + *argptr++ = "./anaconda"; + else + *argptr++ = "/usr/bin/anaconda"; + *argptr++ = "-m"; *argptr++ = url; @@ -106,13 +106,16 @@ class MiloInstall: pass os.symlink("../boot/milo.conf", self.todo.instPath + "/etc/milo.conf") + if os.access (self.todo.instPath + "/boot/milo.conf", os.R_OK): + os.rename (self.todo.instPath + "/boot/milo.conf", + self.todo.instPath + "/boot/milo.conf.rpmsave") else: hasboot = 0 kernelroot = '/boot/' + if os.access (self.todo.instPath + "/etc/milo.conf", os.R_OK): + os.rename (self.todo.instPath + "/etc/milo.conf", + self.todo.instPath + "/etc/milo.conf.rpmsave") - if os.access (self.todo.instPath + "/etc/milo.conf", os.R_OK): - os.rename (self.todo.instPath + "/etc/milo.conf", - self.todo.instPath + "/etc/milo.conf.rpmsave") f = open (self.todo.instPath + "/etc/milo.conf", "w") if hasboot: f.write ("# NOTICE: You have a /boot partition. This means that all\n") @@ -133,7 +136,8 @@ class MiloInstall: for version, label in kernels: f.write ("image=%svmlinuz-%s\n" % (kernelroot, version)) f.write ("\tlabel=%s\n" % label) - f.write ("\troot=/dev/%s" % rootDevice) + f.write ("\troot=/dev/%s\n" % rootDevice) + f.close() def write (self): if onMILO (): @@ -679,7 +679,7 @@ msgstr "パッケージのインストール" # ../text.py:830
#: ../text.py:835 msgid "Name : " -msgstr "名前 : " +msgstr "名前 : " # ../text.py:793
# ../text.py:831
@@ -691,7 +691,7 @@ msgstr "サイズ : " # ../text.py:832
#: ../text.py:837 msgid "Summary: " -msgstr "説明: " +msgstr "説明 : " # ../text.py:820
# ../text.py:858
@@ -715,13 +715,13 @@ msgstr " 時間" # ../text.py:862
#: ../text.py:867 msgid "Total :" -msgstr "合計 :" +msgstr "合計:" # ../text.py:831
# ../text.py:869
#: ../text.py:874 msgid "Completed: " -msgstr "完了: " +msgstr "完了:" # ../text.py:841
# ../text.py:879
@@ -2853,32 +2853,32 @@ msgstr "パーティション" # ../libfdisk/gnomefsedit.c:3319
#: ../libfdisk/gnomefsedit.c:3319 msgid "_Add..." -msgstr "_追加..." +msgstr "追加\n(_A)..." # ../libfdisk/gnomefsedit.c:3226
# ../libfdisk/gnomefsedit.c:3326
#: ../libfdisk/gnomefsedit.c:3326 msgid "_Edit..." -msgstr "_編集..." +msgstr "編集\n(_E)..." # ../libfdisk/gnomefsedit.c:3228
# ../libfdisk/gnomefsedit.c:3327
#: ../libfdisk/gnomefsedit.c:3327 msgid "_Reset" -msgstr "_リセット" +msgstr "リセット\n(_R)" # ../libfdisk/gnomefsedit.c:3227
# ../libfdisk/gnomefsedit.c:3332
#: ../libfdisk/gnomefsedit.c:3332 msgid "_Delete" -msgstr "_削除" +msgstr "削除\n(_D)" # ../libfdisk/gnomefsedit.c:1914
# ../libfdisk/gnomefsedit.c:3345
#. try having make raid device button available in read-only mode too #: ../libfdisk/gnomefsedit.c:3345 msgid "_Make RAID Device" -msgstr "RAIDデバイスを作成する" +msgstr "RAIDデバイス\nを作成する(_M)" # ../libfdisk/gnomefsedit.c:3266
# ../libfdisk/gnomefsedit.c:3355
@@ -3505,8 +3505,8 @@ msgstr "" "以下の情報を入力してください:\n" "\n" " o FTP サーバの名前または IP アドレス\n" -" o 使用アーキテクチャ用の Red Hat Linux を含む、そのサーバ\n" -" 上のディレクトリ\n" +" o 使用アーキテクチャ用の Red Hat Linux\n" +" を含む、そのサーバ上のディレクトリ\n" # ../loader/urls.c:160
# ../loader/urls.c:160
@@ -3521,8 +3521,8 @@ msgstr "" "以下の情報を入力してください:\n" "\n" " o Webサーバの名前または IP アドレス\n" -" o 使用アーキテクチャ用の Red Hat Linux を含む、そのサーバ\n" -" 上のディレクトリ\n" +" o 使用アーキテクチャ用の Red Hat Linux\n" +" を含む、そのサーバ上のディレクトリ\n" # ../loader/urls.c:178
# ../loader/urls.c:178
diff --git a/textw/timezone.py b/textw/timezone.py index dd80fdc09..01c86342c 100644 --- a/textw/timezone.py +++ b/textw/timezone.py @@ -60,7 +60,7 @@ class TimezoneWindow: if rc: (default, asUtc, asArc) = rc else: - default = "US/Eastern" + default = iutil.defaultZone() asUtc = 0 bb = ButtonBar(screen, [(_("OK"), "ok"), (_("Back"), "back")]) @@ -1159,9 +1159,13 @@ class ToDo: how = "u" else: how = "i" - + + # XXX HACK HACK for Japanese. + # Remove me when the japanese locales are in glibc package + ts.add(self.hdList['locale-ja'].h, self.hdList['locale-ja'].h, how) for p in self.hdList.selected(): - ts.add(p.h, p.h, how) + if p.name != 'locale-ja': + ts.add(p.h, p.h, how) total = total + 1 totalSize = totalSize + p.h[rpm.RPMTAG_SIZE] diff --git a/utils/uniqkanji.pl b/utils/uniqkanji.pl new file mode 100755 index 000000000..fe8391290 --- /dev/null +++ b/utils/uniqkanji.pl @@ -0,0 +1,44 @@ +#!/usr/bin/perl + +print STDERR "Scanning message and help files and surveys which multibyte chars are used...\n"; + +while (<>) { + &entry_kanji($_); +} + +print STDERR "\n$count unique chars\n"; + +$fillzero = 0; +$charset = 0; +$jismode = $bigfivemode = 0; + +print STDERR "Spit out the list of characters being used in the input.\n"; + +foreach $i (sort(keys(%usedkanji))) +{ + print chr($i / 256) . chr($i % 256) . "\n"; +} + + +sub entry_kanji +{ + local($line) = @_; + local($i, $len, $c, $kchar); + + $len = length($line); + + for ($i = 0; $i < $len; $i++) { + $line =~ s/^(.)//; + $c = ord($1); + if ($c >= 0xa0 && $c <= 0xff) { + $line =~ s/^(.)//; + $kchar = $c * 256 + ord($1); + $i++; + if (!$usedkanji{$kchar}) { + $usedkanji{$kchar} = 1; + printf(STDERR "%04x ", $kchar); + $count++; + } + } + } +} |