Bug 145854

Summary: Khmer not working in YaST
Product: [openSUSE] SUSE Linux 10.1 Reporter: Jens Herden <jens.herden>
Component: InstallationAssignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: jsuchome, snwint
Version: Beta 1   
Target Milestone: ---   
Hardware: 32bit   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log

Description Jens Herden 2006-01-26 15:07:52 UTC
On the first screen, the language selector, I can see the new language Khmer but I am missing it when I hit F2 at the boot screen. 

I am not sure if it is technical possible to add Khmer because of the needed support for complex scripts. I just report it here in case it is.
Comment 1 Steffen Winterfeldt 2006-01-27 15:12:22 UTC
beta2 has an entry but in latin script. I'm not prepared to handle things
like subscript consonants (yet).
Comment 2 Jens Herden 2006-02-02 07:58:18 UTC
Thanks for fixing this. And I think Latin script is fine here.

But I just tested beta2 and choosing Khmer does not show the expected result. The installation still starts in English!
I understand that changing the boot screen to Khmer is not possible because of lack of support for complex scripts but when the first installation screen shows up I expect a Khmer interface. 
Starting the installation in English and switching on the first screen to Khmer does work.
So I will open the bug again. 
Comment 3 Steffen Winterfeldt 2006-02-02 11:50:45 UTC
Very strange. Looks like a YaST bug.

If 'Locale: km_KH' is in /etc/install.inf, YaST correctly skips the
initial language selection and sets language and timezone to Khmer but
still shows english texts. In fact, you don't get translations in _any_
language after that.

All works fine if you start with English and go through the initial language
dialog.

Maybe Khmer crashes YaST's translation engine? :-)
Comment 4 Thomas Fehr 2006-02-02 11:53:59 UTC
Reassigned to maintainer of yast2-country.
Comment 5 Steffen Winterfeldt 2006-02-02 11:58:27 UTC
Created attachment 66169 [details]
y2log

Here's a y2log for enhanced debugging pleasure.
Comment 6 Jiří Suchomel 2006-02-02 12:29:18 UTC
Steffen, are the files with translations in inst-sys?

> 006-02-02 18:44:31 <3> linux(8900) [bash] ShellCommand.cc(shellcommand):78 /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
Comment 7 Steffen Winterfeldt 2006-02-02 13:20:06 UTC
Yes. If I abort and start yast again in English, everything works.
Comment 8 Jiří Suchomel 2006-02-02 14:26:13 UTC
how do I set Locale to km_KH (not booting from CD) when Khmer is not in linuxrc menu?
Comment 9 Steffen Winterfeldt 2006-02-02 14:35:20 UTC
Abort yast, edit /etc/install.inf, then run 'yast'.
Booting with lang=km_KH should work, too.
Comment 10 Jiří Suchomel 2006-02-02 17:33:18 UTC
Reproduced; but I do not understand. 
yast2 language client doesn't change the language in UI when something was set in linuxrc, it is just skipped. Stefan, don't you have any idea?
Comment 11 Stefan Hundhammer 2006-02-03 10:29:11 UTC
Are we sure _we_ have Khmer in all the various tables etc. we are using for language support? IIRC there are several YCP files with maps for keyboard, timezone, etc.; I have no clue what happens if a language set by linuxrc isn't present there.
Comment 12 Jiří Suchomel 2006-02-03 11:14:43 UTC
Stefan, of course yast2-country has Khmer in all its tables - it works on al other cases but setting from linuxrc. I'm asking how yast sets the language for installation when it actaully does _not_ use the yast2-counry API, which is this situation.
Comment 13 Jiří Suchomel 2006-02-03 15:40:40 UTC
I can't find a problem in yast2-country, as I wrote, it just skips the language setting if it was set before.

Marcus, isn't there any problem in start scripts?
Comment 14 Jens Herden 2006-02-03 17:03:54 UTC
Maybe this is related to the absence of yast2-trans-km?

This is a wild guess, but I read this https://bugzilla.novell.com/show_bug.cgi?id=147927
and I thought I let you know. 
Comment 15 Jiří Suchomel 2006-02-06 07:39:19 UTC
No, it's some problem of initialization; the Khmer works when set in running yast.
Comment 16 Jiří Suchomel 2006-02-07 08:46:59 UTC
Marcus, could you comment?
Comment 17 Marcus Schaefer 2006-02-07 10:45:21 UTC
I try to explain how this works:

1) Starting an installation will ask the user for its language.
2) According to this selection an entry in /etc/sysconfig/keyboard:KEYTABLE
   will be available later.

   PROBLEM: Khmer didn't have a console font and the kbd package didn't
            provide a Khmer map.gz file. The contents of KEYTABLE are
            undefined (default us)

3) The x11 suggestion is based on the contents of the KEYTABLE
   variable. SaX2 has a basic mapping table from console map to X11 map
   
   PROBLEM: In this case there is no mapping available because Khmer doesn't
            exist on the console. Default is "us"

My solution suggestion is to create a link for Khmer console map pointing
to us. For example:

   /usr/share/kbd/keymaps/i386/qwerty/khmer.map.gz -> us.map.gz

If this would exist I can add a new entry in my mapping table and if
someone can tell me how to setup a Khmer X11 keyboard I can address the
problem.
Comment 18 Jiří Suchomel 2006-02-07 11:28:09 UTC
I think this is misunderstanding. There is not a problem with setting keyboard layout for Khmer, but that the installation didn't start correctly in Khmer when the language was set in the boot menu (=before yast). I asked you not because of keyboard but because of the startup scripts - I think the problem might be somewhere in this area.
Comment 19 Marcus Schaefer 2006-02-07 11:35:34 UTC
the startup scripts didn't handle the language. I'm only exporting the
variables set by linuxrc. You can have a look to /var/log/YaST2/y2start.log
for details
Comment 20 Jiří Suchomel 2006-02-13 08:09:17 UTC
I can't see anything wrong in yast, IMHO the problem must be before.
Comment 21 Steffen Winterfeldt 2006-02-13 10:19:19 UTC
according to comment 17 it's something with startup scripts
Comment 22 Jiří Suchomel 2006-02-13 10:30:20 UTC
No, this bug is not related to keyboard mapping.
Comment 23 Marcus Schaefer 2006-02-13 10:43:38 UTC
As I already said the startup scripts doesn't do any critical lang
setup. See the following code:

  FirstStage/F04-language

-------------------------------------------------

#=============================================
# 4) set language environment
#---------------------------------------------
LANGUAGE=en_US
infofile=/content
if [ -f $infofile ];then
    LANGUAGE=`sed -n 's/^LANGUAGE \([^ ]*\)/\1/p' $infofile`
fi
if [ ! "$Locale" = "" ];then
    LANGUAGE=$Locale
fi
set_language_init
unset LC_CTYPE
log "\tLanguage set to: $LANG"

#=============================================
# 4.1) start unicode mode
#---------------------------------------------
export LANG
start_unicode

------------------------------------

If /content is wrong or $Locale is not set a bug may occur but
both information come from another point not the startup scripts
The set_language_init function will assign LANGUAGE to LANG and
include the fbiterm check for Japanese.

The log file /var/log/YaST2/y2start.log tells you what LANG has been
set
Comment 24 Steffen Winterfeldt 2006-02-13 11:31:23 UTC
well, it's certainly not a bug in linuxrc when yast can't set the language
Comment 25 Jiří Suchomel 2006-02-13 13:31:51 UTC
Isn't the problem somewhere in the fonts? Mike, any idea?
Comment 26 Steffen Winterfeldt 2006-02-13 13:58:24 UTC
No, Khmer fonts work fine.
Comment 27 Jiří Suchomel 2006-02-14 15:07:40 UTC
Back to linuxrc: why there is no entry for Khmer in linuxrc menu? (contradictory to comment #2)?
Comment 28 Steffen Winterfeldt 2006-02-14 16:30:11 UTC
The bootloader has an entry. linuxrc just passes the value on. linuxrc does
absolutely nothing with it except setting the 'locale' entry in install.inf,
so IMO adding an entry in linuxrc is pointless (same as for Hindi,
for example).
Comment 31 Jiří Suchomel 2006-02-17 15:20:47 UTC
What is special for the installation with km_KH is that locale (?) error (see comment #6). This is called only to get list of available locales and doesn't affect the translation process - anyway, if I comment that call in yast, nothing changes. 
But it might be a sign that somehing deeper is broken... (?)

Comment 32 Steffen Winterfeldt 2006-03-02 15:21:07 UTC
Ok, found the problem. Though there was a Khmer locale, it was missing
a Khmer utf8 locale. I've added it and now it works.
Comment 33 Jens Herden 2006-04-04 13:42:40 UTC
I can confirm that the problem is solved in beta9. I can choose Khmer now at the boot screen and get the Khmer interface. 
Strange is that the entry in the menu now is "km_KH"? Reason for a new bug report I guess :-(
Comment 34 Steffen Winterfeldt 2006-04-04 13:50:22 UTC
I've fixed it. Strange, that noone noticed it. :-(