Re: [gnome-cy] The State of Things (was: Gwersyll Cyntaf/Basecamp)

Hi Dafydd

Success on using your .mos - more details below.  I'll do some screenshots and 
post them on the site.

On Dydd Llun 16 Mehefin 2003 12:59 yp, Dafydd Harries wrote:
> Right, interesting. I'm still not entirely sure what locale-gen does.

I suspect it's just regenerating what you already have.

> Hmm; Shift+RightCtrl doesn't do anything for me.

Yes, presumably your Multi-key (/usr/X11R6/lib/X11/Xmodmap) is set up 

> I could set up an easy way for you to scrape the status of my translation
> repository, which tends to be a little ahead of CVS in terms of msgstrs,
> but a little behind in terms of msgids, if you see what I mean.

I don't understand the last clause :-), but I would like to look at doing 
this, if you could give me more details.

> There's a machine on which I do all sorts of things, including GNOME CVS
> checkouts and translation work, and which also happens to have the
> webserver I use. It's in Nottingham somewhere.

So you have root access on it?  I'm looking at getting something like that set 
up, specifically in order to do things like this.

> If you do have success, let me know, and I'll add instructions to the
> web page as appropriate.

OK.  On SuSE I installed everything I could find that was to do with Gnome2, 
then logged out ot KDE and logged into Gnome.  The first time it came up it 
couldn't find Galeon, and also couldn't find gnomesu (to use the SuSE YaST 
configuration tool).  So I logged back into KDE and installed Galeon and also 
xsu, and everything worked OK then.  I took the scattergun approach of 
copying all your .mo files to each of /opt/gnome/share/locale/cy/LC_MESSAGES 
and /opt/gnome2/share/locale/cy/LC_MESSAGES, since I didn't know which (if 
any) files related to Gnome1 and Gnome2.  The cy and LC_MESSAGES directories 
at each of these locations did not exist, so I had to create them.  Then I 
set the RC_LANG variable via YaST to cy_GB.UTF-8, and logged out/in.  
locale charmap
showed that the encoding used was ANSI_X something or other, so I ran:
locale -i cy_GB -f UTF-8 cy_GB.UTF-8
and logged out/in, and then UTF-8 showed up as the encoding.  (This was on a 
machine where the correct i18n packages had already been installed.)

I must say Gnome looks very nice.  I downsized the font, and the icons still 
seem a bit on the large side, but the anti-aliasing and backgrounds are very 
cool.  X apps don't seem to use the Gnome fonts, though, so they don't look 
as integrated as in KDE.  I thought Nautilus was a crap file-manager until I 
discovered how to turn the directory tree on .... :-) But very nice indeed.

The Welsh doesn't show up in as many places as KDE, but where I've found it so 
far (terminal, gedit, panel thingies), it looks great.  Like KDE, there are a 
few places where corrections will have to be made (I really love the "dros 
droo" on my screenshot of KWrite!), but I think it's pretty impressive.

I'll take a few screenshots and put them up (can you let me know if there are 
any other obvious places where Welsh comes up that I haven't mentioned 
above?), and link directly to your tarball from the downloads page.  As 
regards documentation, either you can do some notes, or I can redo the 
instructions that I enclose with the KDE build(attached for ease of 
reference) to apply to Gnome as well, and put that there as a separate item 
for download.  Let me know what you want done.

> It was there, but not linked - I can't remember where I got it from.
> Telsa, I expect. It's linked in now.

Great - I'll arrange for it to be swallowed.

> You could try the GTP status pages for 2.2:
> which indicate that it's 12% done.

Ah yes - thanks.

> Hum. I don't think we can ever, strictly speaking, say "a Welsh desktop
> is now available on all GNU/Linux distributions", as "available" and
> "all distributions" are tricky phrases. I'm not sure how to handle
> announcements regarding completeness and availability.

Well, let's say it would be available on all distros which are running 
reasonably up-to-date KDE or Gnome.  But you're right, the meaning of 
"available" (ie where, how much) is ambiguous.  That's why I'm trying to work 
in terms of "sub-projects", where it's possible to say "these apps will now 
appear in Welsh, and we're moving on now to work on these other ones".

> I think that it will be "in the box" no matter how much of it is done.
> I'm not sure whether there's any practical difference between them. The
> extent of being supported might just be that it says "Welsh is
> supported" on the GNOME website, or it may be that it's made easier for
> people to use supported translations. Can anybody shed light on this?

Oooh, I think that would be cheating <grin>.

> It depends whether you're approaching documentation thinking "the
> existing documentation should be available in Welsh" or thinking "there
> should be some Welsh documentation on how to do things on the desktop".
> I was thinking along the lines of translating what's there already
> rather than beginning new Welsh-only documentation. Of course, writing
> new documentation is a noble goal, but if I was writing new
> documentation (or adding to existing documentation), I would tend
> towards doing it in English so that it can be translated into other
> languages more easily.

Well I always think there's a big difference between knowing what an app can 
do, and knowing how to make it do what I want it to do.  So that's the 
rationale there - additional tutorial-type things, rather than existing 
"what's on each menu" things.  One of the reasons I worked on Rosegarden and 
TkGate is that they have really good tutorials to get you started.  

FINAL VERY IMPORTANT QUESTION:  Can someone enlighten me on the gettext plural 
formula that you've decided to use with Welsh?  For example, in English it's:
Two forms, singular used for one only
Plural-Forms: nplurals=2; plural=n != 1;
What are you using with Welsh Gnome?

Best wishes

KGyfieithu - meddalwedd rhydd yn Gymraeg
KGyfieithu - free software in Welsh

Cyfieithiadau penbwrdd KDE 3.1
KDE 3.1 desktop translations

Cyfosodiad dros-dro o 15 Mehefin 2003
Interim build of 15 June 2003

Cyfarwyddiadau gosod
Installation instructions


1.  The tarball consists of these instructions, a directory "entry_flag" containing the desktop.entry file and a Welsh flag, and
a directory "mo_files", containing the files that have been translated in machine object (.mo) format.  Installation of this
interim build is as simple as ensuring that your machine is using "cy" (Cymraeg) as the locale, and then copying these files
to their proper places.  The instructions below are based on SuSE 8.2, but should apply (mutatis mutandis) to all
recent Linux distros.

SuSE-centric, SevenOfNine("Do not seek to engage us in irrelevant discourse")-compliant instructions:

(a) Install kde3-i18n-en_GB (UK English translations for KDE), and copy all the .mo files in
/opt/kde3/share/locale/en_GB/LC_MESSAGES into /opt/kde3/share/locale/cy/LC_MESSAGES
(b) Run the YaST2 Control Centre -> System -> Editor for /etc/sysconfig Files.  Click the plus beside System, then the plus
beside Environment, then the plus beside Language.  Click on RC_LANG.  In the entry field Setting of: RC_LANG delete
whatever is there (probably en_GB.ISO-8859-1), and enter cy_GB.UTF-8.  Click Finish.
(c) Copy the files in entry_flag to /opt/kde3/share/locale/cy
(d) Copy the files in mo_files to /opt/kde3/share/locale/cy/LC_MESSAGES
(e) Run the KDE Control Centre -> Regional and Accessibility -> Country/Region & Language, and on the Locale tab click the
Add Language button.  From the dropdown select Welsh, and click Apply.
(f) Logout and reboot.

Instructions that are a bit more explanatory, still SuSE-centric, but with nods to other distros

2.  In older distros (eg SuSE 8.0), the cy locale was not available on a default install.  It was necessary to install the package
glibc-i18ndata to get the source charmaps and locales (which were stored in /usr/lib/locale), and then run (as root):
localedef -i cy_GB -f UTF-8 cy_GB.utf8
This created a new cy_GB.utf8 locale (Cymraeg, located in Great Britain, using the UTF-8 encoding).  With recent distros, thanks
to work by Alan Cox and others, the cy locale is available from install.  For example, on SuSE 8.2, running:
locale -a
among the possible locales, and cy has its own folder in /usr/share/locale.  So the only thing that is necessary is to set the LANG
variable to cy - see 5 below.  (If you are using a distro other than SuSE, and things don't seem to be working, check that you have
a cy locale available, and if it is not there, install the relevant locales package for your distro.)

3.  Further information on locales on SuSE 8.2 (which is NOT necessary if you are installing the KGyfieithu build, but may be nice to know):
/opt/gnome/share/locale/cy/LC_MESSAGES stores Gnome .mo files
/opt/gnome2/share/locale/cy/LC_MESSAGES stores Gnome2 .mo files
/opt/kde3/share/locale/cy/LC_MESSAGES stores KDE .mo files
/usr/share/locale/cy/LC_MESSAGES stores other X .mo files
/usr/lib/gconv stores the prebuilt locale encodings
If for some reason you have to rebuild the locales, the package to install to get the source charmaps and locales is now called
glibc-i18ndata, and they are now installed to /usr/share/i18n, with only a locale-archive file now located in /usr/lib/locale.

4.  The usual encoding for English is ISO-8859-1, and that may be what was installed as default on your PC.  You can check the
current encoding by running:
locale charmap
and get a list of available encodings by running
locale -m
The ISO-8859-1 encoding cannot represent all the accented letters even in European languages (w/y with the circumflex is a
case in point in Welsh), and fails completely for non-European languages.  The IT world is therefore moving towards the use of
Unicode (UTF-8) encoding, which allows all letters in all languages to be encoded properly.  It therefore makes sense to set your
machine's encoding to UTF-8 at the same time as you set the locale to Welsh.  (Support for UTF-8 is, however, still patchy, and you
may come across instances where applications refuse to work with UTF-8.)  When you set your locale and encoding to
cy_GB.UTF-8, the computer will recognise and handle all the required characters, but you also need to ensure that XFree86
knows about the new encoding.  Otherwise, when you enter a character, XFree86 will default to ASCII, and although the codes of
the accented letters are sent from the keyboard, XFree86 will ignore them unless they happen to be in the ASCII table.  You therefore
need to ensure that the file /usr/X11R6/lib/X11/locale/locale.dir contains a line of the form:
This maps the locale name cy_GB.UTF-8 to the locale database filename in /usr/X11R6/lib/X11/locale, in this case en_US.UTF-8,
which is a default file for all locales wishing to use UTF-8 - XFree86 will then recognise what the keyboard sends.  This is already
done by default in SuSE 8.2, where /usr/X11R6/lib/X11/locale/locale.dir contains:
iso8859-1/XLC_LOCALE				cy_GB.ISO8859-1
iso8859-14/XLC_LOCALE			cy_GB.ISO8859-14
iso8859-15/XLC_LOCALE			cy_GB.ISO8859-15
If you are using another distro, you need to check the files you have available, and create the line if necessary in locale.dir -  the file
path in the left-hand column needs to exist in /usr/X11R6/lib/X11/locale/, and the locale name in the right-hand column needs to
match your LC_CTYPE value  - see 5 below.  (Thanks to Pablo on the Mandrake Cooker list for his posting on this: linux-mandrake com/msg106224.html.

5.  If the relevant files, locales and encodings seem to be all correct and accounted for, all that needs to be done is to set the LANG
variable.  In SuSE, this can be done through a GUI (see SoN-compliant instructions (b) above), or you can hand-edit /etc/sysconfig/language.
Other distros will have similar options.  On the SuSE setup, the LANG variable is called RC-LANG for system housekeeping purposes, and
by default it is the only one that needs to be set, since it will be used if none of the other variables (LC_CTYPE, LC_NUMERIC,
LC_TIME, etc) are specified.  Other systems will probably be similar - read your docs, or ask on the Web if you are not sure.  One important
point to note is that you must enter the LANG variable in whatever form your system is expecting it.  For example, I believe Red Hat uses
the form "cy_GB.utf8", but this will NOT work with SuSE (unless you go and edit all the files mentioned above, which seems a bit perverse) -
SuSE is set up to use the form "cy_GB-UTF-8".  If you use .utf8 instead of .UTF-8, you will get messages saying "locales not supported
on X server".  You do not necessarily have to enter the full cy_GB-UTF-8 - you could use an alias.  These are set up in the file
/usr/X11R6/lib/X11/locale/locale.alias, which by default on SuSE 8.2 contains the lines:
cy								cy_GB.ISO8859-1
cy_GB							cy_GB.ISO8859-1
cy_GB.iso88591					cy_GB.ISO8859-1
cy_GB.ISO-8859-1				cy_GB.ISO8859-1
cy_GB.iso885914				cy_GB.ISO8859-14
cy_GB.ISO-8859-14				cy_GB.ISO8859-14
cy_GB.iso885915				cy_GB.ISO8859-15
cy_GB.ISO-8859-15				cy_GB.ISO8859-15
cy_GB euro					cy_GB.ISO8859-15
So you could edit the first line to read:
cy								cy_GB.UTF-8
and just enter cy for the LANG variable.

6.  Now all that is left is to set up KDE.  You may think that once you have installed the KGyfieithu .mo files, you can select Welsh
in the KDE Control Centre, and have it appear.  In fact, this is not the case.  If there is no .mo file for a particular application,
KDE will not even read the existing translated .mo files to get, for example, any global strings that might be used in that
application - it will always use the default US English.  For example, much of the Settings menu in KMail is translated in, but unless there is a in /opt/kde3/share/locale/cy/LC_MESSAGES those strings will not be read, and that
Settings menu will stubbornly refuse to appear as Gosodiadau.  So what we need to do first is trick KDE into
thinking that it has a full set of Welsh .mo files.  We can do this by installing a language that has such a set,
copying these into the KDE Welsh directory, and then copying the KGyfieithu files in there as well, which will overwrite the other
language's .mo files when a Welsh translation exists, but leave the other langage's .mo files for use when no Welsh version
exists (yet!).  Virtually any fairly complete KDE language version could be used for this, but some people might have difficulty using
Swedish or French for those bits of the interface where the Welsh is not yet available!  Luckily, however, there is a language version
that fits our needs perfectly - the UK English version of KDE.  On SuSE 8.2, this is package kde3-i18n-en_GB, and your distro
probably has something similar.  If not, download it from a KDE mirror, or if you have a slow connection, you might find it on
a magazine covermount CD.  Once en_GB is installed, copy all the .mo files in /opt/kde3/share/locale/en_GB/LC_MESSAGES
into /opt/kde3/share/locale/cy/LC_MESSAGES.  This applies to SuSE - your distro may store these files in a different directory;
for example, Debian (I believe) uses /usr/share/locale/cy/LC_MESSAGES, and others may use
/usr/local/share/locale/cy/LC_MESSAGES.  If the cy directory is not there, all you need to do is create it.

7.  Now comes the easy bit - copy the files in the entry_flag directory of this KGyfieithu interim build to /opt/kde3/share/locale/cy
(or the equivalent directory on your distro - see above).  This will set up an entry for Welsh in the KDE Control Centre (though
the flag may not actually appear).  Then copy the files in the mo_files directory of this build to
/opt/kde3/share/locale/cy/LC_MESSAGES.  You will of course need to be root to do both of these things.  Finally, use the KDE
Control Centre to select Welsh as the local language - see the SoN-compliant instructions (e) above.

8.  Logout of KDE, and reboot for good measure.  You may find that on reboot you have to reselect some of the fonts in individual
KDEapplications, but this is a minor task.  More importantly, you should see that significant parts of the desktop are now showing
up in Welsh instead of English.  It can only get better!

9.  One final point concerns input of accented characters.  X allows you to use key combinations to do this, but first, you have
to find out what key(s) on your system are set up as Multi-key, the key combination that tells X that a special character is coming.
You can find this by looking in the system-wide Xmodmap file; in SuSE 8.2 (and other distros are probably similar) that is
in /usr/X11R6/lib/X11/Xmodmap, which is a symlink to /etc/X11/Xmodmap, and contains the lines:
!! Right control key is Control or, if shifted, Compose
keycode 109 = Control_R Multi_key
This tells us that the Multi-key is a combined keypress of Shift + right-hand Ctrl. So to get ô, you would just press those two keys
simultaneously, and then ^ and o sequentially (fairly fast). Similarly for the other characters.  Note that using the ISO-8859-1 encoding
the order of entry of the accent and the letter did not matter - you could enter ^ and then o, or o and then ^, and you would still get
ô.  With the UTF-8 encoding, order of entry does matter - you have to enter the accent first, and then the letter.  The key-mappings
to use are defined in /usr/X11R6/lib/X11/locale/compose.dir, which contains the lines:
iso8859-1/Compose			cy_GB.ISO8859-1
iso8859-14/Compose			cy_GB.ISO8859-14
iso8859-15/Compose			cy_GB.ISO8859-15
en_US.UTF-8/Compose		cy_GB.UTF-8
In a similar way to the locale encoding files (see 4 above), these map the locales to a compose table giving the key-mappings,
which in the case of the UTF-8 encoding is the file /usr/X11R6/lib/X11/locale/en_US.UTF-8/Compose.  In cases where your current
font does not contain the accented character, a suitable character from another font will be used, eg ŵ or ŷ.

We hope you enjoy using KDE in Welsh!

Best wishes


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]