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

Re: [adam@onshore.com: Installation Manual Translations -- we need help]



Peter,

In order to add support for a new language (I'll take Swedish for my example
:), you need to do the following things (I believe, I need to put this
information into documentation):

1. create a file called swedish.src:

<language name="Swedish" charset="iso-8859-1" font="LatArCyrHeb-16" acm="iso01">
    <name>Swedish</name>
    <hint>You have chosen Swedish.  Press Enter to proceed</hint>
    <list>
        <name>Choose Language Variant</name>

        <item arch="i386 powerpc" locale="se" acm="iso01" font="LatArCyrHeb-16" keymap="i386/qwerty/se" msgcat="se">
            <name>English (QWERTY)</name>
        </item>
    </list>
</language>

Attribute name of <language> element should be a unique identifier of the
language (the name of the language should be sufficient).  The value value
between <name>...</name> specifies an English name for the language.  The
difference is that attribute may only contain letters, digit and few
punctuation signs (like .), while the second value may have any possible
character.  'charset' attribute of <language> element specifies ISO character
set of .src file (please change it to appropriate character set!). 'font' and
'acm' attributes are those for `consolechars' program, these should allow a
user to see the contents of THIS file.  In this example, I am trying to make
use of a Unicode font that comes in console-data package.

The value between <hint>...</hint> should be in Swedish, the text should
encourage a user to press enter if this text is readable for her.

Now let's check the contents of <list> element.  The value between
<name>...</name> specifies a title (in Swedish!) that encourages our user to
choose between possible localized environments (these are going to be fully
supported in (I hope) near future).  Every <item></item> specifies such an
environment.  At the moment the only important things are:

    -- value of 'arch' attribute.  Here you should enumerate architectures which
       this item is valid for.  In my example, the only item is valid for i386
       and powerpc.
    -- value of 'keymap' attribute.  This is the name of the file that contains
       correct keymap.  The name should be relative to /usr/share/keymaps
       directory.  Please do not specify the extension.
    -- value of `msgcat' attribute.  This is the suffix (!) for two (this may
       change in future) files: the message catalogue for dbootstrap program and
       release_notes that comes on root disk.  (The latter is not implemented yet.)
    -- value between <name>...</name>.  This is a descriptive text that allows our
       user differentiate this `localized environment' among others.  There could
       be, at least, several keymaps available for a given language.

Please note that .src files are not even well-formed wrt XML specification, as
they are in a characters different from UTF-8.

2.  Add this file to CVS repository:

$ cvs add swedish.src
$ cvs commit -m "added Swedish localized environments" swedish.src

3.  Make appropriate modification to Makefile:

    -- add swedish.xml (!) to the line containing

generated_languages=...

    -- add a new rule (this will be automated a bit later, maybe even today!):

swedish.xml: swedish.src
	iconv -f iso-8859-1 -t utf-8 < $< > $@

Please note the first character(s) should be a tab, not a space!

4.  Check that your rule works:

$ make swedish.xml

If you have `expat' package, you may check that everything is correct:

$ xmlwf swedish.xml

(yes, you must check .xml file!)

Now commit your changes to Makefile:

$ cvs commit -m "added support for Swedish" Makefile

5.  Modify langs.xml:

    -- add a line (you will find appropriate place :)

    <!ENTITY swedish    SYSTEM "swedish.xml">

    -- add a line (you will find appropriate place :)

    &swedish;

Commit your changes:

$ cvs commit -m "added support for Swedish" langs.xml


Now everything should be OK.  Unfortunately, it's not ready for easy usage... :)
But your addition would be very appreciated.

Should you have any questions, do not hesitate to mail me! :)

Cheers,

--
Mike


Reply to: