-\begin_layout Subsubsection
-Ambigous messages
-\end_layout
-
-\begin_layout Standard
-Sometimes it turns out that one English message needs to be translated into
- different messages in the target language.
- One example is the message
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-To
-\end_layout
-
-\end_inset
-
- which has the German translation
-\lang german
-Nach
-\lang english
- or
-\lang german
-Bis
-\lang english
-, depending upon exactly what the English
-\begin_inset Quotes eld
-\end_inset
-
-to
-\begin_inset Quotes erd
-\end_inset
-
- means.
- GNU
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-gettext
-\end_layout
-
-\end_inset
-
- does not handle such ambigous translations.
- Therefore you have to add some context information to the message: Instead
- of
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-To
-\end_layout
-
-\end_inset
-
- it becomes
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-To[[as in 'From format x to format y']]
-\end_layout
-
-\end_inset
-
- and
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-To[[as in 'From page x to page y']].
-\end_layout
-
-\end_inset
-
- Now the two occurences of
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-To
-\end_layout
-
-\end_inset
-
- are different for
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-gettext
-\end_layout
-
-\end_inset
-
- and can be translated correctly to
-\lang german
-Nach
-\lang english
- and
-\lang german
-Bis
-\lang english
-, respectively.
-\end_layout
-
-\begin_layout Standard
-Of course the context information needs to be stripped off the original
- message when no translation is used.
- Therefore you have to put it in double square brackets at the end of the
- message (see the example above).
- The translation mechanism of LyX ensures that everything in double square
- brackets at the end of messages is removed before displaying the message.
-\end_layout
-
-\begin_layout Subsection
-Translating the documentation.
-\end_layout
-
-\begin_layout Standard
-The online documentation (in the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-
-\bar under
-H
-\bar default
-elp
-\end_layout
-
-\end_inset
-
--menu) can (and should!) be translated.
- If there are translated versions of the documentation available
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-As of March 2008, at least some of the documents have been translated into
- fourteen languages, with the Tutorial available in a few more.
-\end_layout
-
-\end_inset
-
- and the locale is set accordingly, these will be used automagically by
- LyX.
- LyX looks for translated versions as
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-LyXDir/doc/xx_DocName.lyx
-\end_layout
-
-\end_inset
-
-, where
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-xx
-\end_layout
-
-\end_inset
-
- is the code for the language currently in use.
- If there are no translated documents, the default English versions will
- be displayed.
- Note that the translated versions must have the same filenames (
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-DocName
-\end_layout
-
-\end_inset
-
- above) as the original.
- If you feel up to translating the documentation (an excellent way to proof-read
- the original documentation by the way!), there are a few things you should
- do right away:
-\end_layout
-
-\begin_layout Itemize
-Read
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-DocStyle.lyx
-\end_layout
-
-\end_inset
-
-, the guide to writing LyX documentation.
- Pay special attention to the translator's section.
-\end_layout
-
-\begin_layout Itemize
-Check out the documentation translation web page at
-\begin_inset CommandInset href
-LatexCommand href
-name "http://www.devel.lyx.org"
-target "http://www.devel.lyx.org"
-
-\end_inset
-
-.
- That way, you can find out which (if any) documents have already been translate
-d into your language.
- You can also find out who (if anyone) is organizing the effort to translate
- the documentation into your language.
- If no one is organizing the effort, please let us know that you're interested.
-\end_layout
-
-\begin_layout Standard
-Once you get to actually translating, here's a few hints for you that may
- save you trouble:
-\end_layout
-
-\begin_layout Itemize
-Join the documentation team! There is information on how to do that in
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-Intro.lyx
-\end_layout
-
-\end_inset
-
- (
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-
-\bar under
-H
-\bar default
-elp\SpecialChar \menuseparator
-
-\bar under
-I
-\bar default
-ntroduction
-\end_layout
-
-\end_inset
-
-), which by the way is the first document you should translate.
-\end_layout
-
-\begin_layout Itemize
-Learn the typographic conventions for the language you are translating to.
- Typography is an ancient art and over the centuries, a great variety of
- conventions have developed throughout different parts of the world.
- Also study the professional terminology amongst typographers in your country.
- Inventing your own terminology will only confuse the users.
-
-\emph on
-(Warning! Typography is addictive!)
-\end_layout
-
-\begin_layout Itemize
-Make a copy of the document.
- This will be your working copy.
- You can use this as your personal translated help-file by placing it in
- your
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-UserDir/doc/
-\end_layout
-
-\end_inset
-
- directory.
-\end_layout
-
-\begin_layout Itemize
-Sometimes the original document (from the LyX-team) will be updated.
- Use the source viewer at
-\begin_inset CommandInset href
-LatexCommand href
-name "http://www.lyx.org/trac/timeline"
-target "http://www.lyx.org/trac/timeline"
-
-\end_inset
-
- to see what has been changed.
- That way you can easily see which parts of the translated document need
- to be updated.
-\end_layout
-
-\begin_layout Standard
-If you ever find an error in the original document, fix it and notify the
- rest of the documentation team of the changes! (You didn't forget to join
- the documentation team, did you?)
-\end_layout
-
-\begin_layout Standard
-\begin_inset Branch OutDated
-status collapsed
-
-\begin_layout Section
-International Keyboard Support
-\end_layout
-
-\begin_layout Standard
-
-\emph on
-[Editor's Note: The following section is by
-\emph default
-
-\shape smallcaps
-\emph on
-Ivan Schreter
-\shape default
-.
- It needs to be fixed to conform to the new Documentation Style sheet and
- to make use of the new v1.0 features.
- The whole thing also needs to be merged with the section following it.-jw
- It may also be badly out of date.-rh (2008)]
-\end_layout
-
-\begin_layout Subsection
-Defining Own Keymaps: Keymap File Format
-\end_layout
-
-\begin_layout Standard
-Let's look at a keyboard definition file a little closer.
- It is a plain text file defining
-\end_layout
-
-\begin_layout Itemize
-key-to-key or key-to-string translations
-\end_layout
-
-\begin_layout Itemize
-dead keys
-\end_layout
-
-\begin_layout Itemize
-dead keys exceptions
-\end_layout
-
-\begin_layout Standard
-To define key-to-key or key-to-string translation, use this command:
-\end_layout
-
-\begin_layout Quotation
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-kmap
-\end_layout
-
-\end_inset
-
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-key
-\end_layout
-
-\end_inset
-
- outstring
-\end_layout
-
-\begin_layout Standard
-where
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-key
-\end_layout
-
-\end_inset
-
- is the key to be translated and
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-outstring
-\end_layout
-
-\end_inset
-
- is the string to be inserted into the document.
- To define dead keys, use:
-\end_layout
-
-\begin_layout Quotation
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-kmod
-\end_layout
-
-\end_inset
-
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-key
-\end_layout
-
-\end_inset
-
- deadkey
-\end_layout
-
-\begin_layout Standard
-where
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-key
-\end_layout
-
-\end_inset
-
- is a keyboard key and
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-deadkey
-\end_layout
-
-\end_inset
-
- is dead key name.
- The following dead keys are supported (shortcut name is in parentheses):
-\end_layout
-
-\begin_layout Quotation
-
-\emph on
-Name
-\begin_inset space \hfill{}
-\end_inset
-
-Example
-\end_layout
-
-\begin_layout Quotation
-acute (acu)
-\begin_inset space \hfill{}
-\end_inset
-
-áéíóú
-\end_layout
-
-\begin_layout Quotation
-grave (gra)
-\begin_inset space \hfill{}
-\end_inset
-
-àèìòù
-\end_layout
-
-\begin_layout Quotation
-macron (mac)
-\begin_inset space \hfill{}
-\end_inset
-
- ō
-\end_layout
-
-\begin_layout Quotation
-tilde (til)
-\begin_inset space \hfill{}
-\end_inset
-
-ñÑ
-\end_layout
-
-\begin_layout Quotation
-underbar (underb)
-\begin_inset space \hfill{}
-\end_inset
-
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-b o
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Quotation
-cedilla (ced)
-\begin_inset space \hfill{}
-\end_inset
-
-çÇ
-\end_layout
-
-\begin_layout Quotation
-underdot (underd)
-\begin_inset space \hfill{}
-\end_inset
-
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-d o
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Quotation
-circumflex (circu)
-\begin_inset space \hfill{}
-\end_inset
-
-âêîôû
-\end_layout
-
-\begin_layout Quotation
-circle (circl)
-\begin_inset space \hfill{}
-\end_inset
-
-ÅůŮ
-\end_layout
-
-\begin_layout Quotation
-tie (tie)
-\begin_inset space \hfill{}
-\end_inset
-
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-t o
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Quotation
-breve (bre)
-\begin_inset space \hfill{}
-\end_inset
-
-ă
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-u o
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Quotation
-caron (car)
-\begin_inset space \hfill{}
-\end_inset
-
-čšž
-\end_layout
-
-\begin_layout Quotation
-hungarian umlaut (hug)
-\begin_inset space \hfill{}
-\end_inset
-
-őű
-\end_layout
-
-\begin_layout Quotation
-umlaut (uml)
-\begin_inset space \hfill{}
-\end_inset
-
-äöü
-\end_layout
-
-\begin_layout Quotation
-dot (dot)
-\begin_inset space \hfill{}
-\end_inset
-
-ż
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-.s
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Since in many international keyboards there are exceptions to what some
- dead keys should do, you can define them using
-\end_layout
-
-\begin_layout Quotation
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-kxmod
-\end_layout
-
-\end_inset
-
- deadkey key outstring
-\end_layout
-
-\begin_layout Standard
-For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
-, so you put in
-\end_layout
-
-\begin_layout Quotation
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-kxmod
-\end_layout
-
-\end_inset
-
- caron o "
-\backslash
-^o"
-\end_layout
-
-\begin_layout Standard
-to make it work correctly.
- Also, you have to define as exceptions dead keys over i and j, to remove
- the dot from them before inserting an accent mark.
- I will change this when the time comes, but so far I haven't had time.
-\end_layout
-
-\begin_layout Standard
-Oh, and about characters: backslash is escaped, so to enter it, you'll need
- double backslash.
- Also, quotes and
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-#
-\end_layout
-
-\end_inset
-
- have different meaning.
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-#
-\end_layout
-
-\end_inset
-
- marks comments, quotes start and end LaTeX-style commands.
- To enter quote, you'll need to use
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-"
-\end_layout
-
-\end_inset
-
-, to enter
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-#
-\end_layout
-
-\end_inset
-
-, use
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-#
-\end_layout
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-If you make a keyboard description file that works for your language, please
- mail it to me, so I can include it in the next keymap distribution.
-\end_layout
-
-\begin_layout Standard
-More keywords will be supported in keymap configuration file in future,
- like
-\end_layout
-
-\begin_layout Itemize
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-kinclude filename
-\end_layout
-
-\end_inset
-
-
-\emph on
-
-\begin_inset space \hfill{}
-\end_inset
-
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-include
-\end_layout
-
-\end_inset
-
- another file
-\end_layout
-
-\begin_layout Itemize
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-kprog program
-\end_layout
-
-\end_inset
-
-
-\emph on
-
-\begin_inset space \hfill{}
-\end_inset
-
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-define
-\end_layout
-
-\end_inset
-
- an external keymap translation program
-\end_layout
-
-\begin_layout Standard
-Also, it should look into
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-lyxrc
-\end_layout
-
-\end_inset
-
- file for defaults, too (for example, a
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-kinclude
-\end_layout
-
-\end_inset
-
- option to include default keyboard).
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:keymap"
-
-\end_inset
-
-International Keymap Stuff
-\end_layout
-
-\begin_layout Standard
-\begin_inset Note Note
-status open
-
-\begin_layout Plain Layout
-In doing the revisions on this document in March 2008, I did not look over
- this stuff, as I do not understand it.
- It would be good if someone else could do so.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The next two sections describe the
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\shape up
-.kmap
-\end_layout
-
-\end_inset
-
- and
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\shape up
-.cdef
-\end_layout
-
-\end_inset
-
- file syntax in detail.
- These sections should help you design your own key map if the ones provided
- do not meet your needs.
-\end_layout
-
-\begin_layout Subsection
-The .kmap File
-\end_layout
-
-\begin_layout Standard
-A
-\shape up
-.
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-kmap
-\end_layout
-
-\end_inset
-
- file maps keystrokes to characters or strings.
- As the name suggests, it sets a keyboard mapping.
- The
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-.kmap
-\end_layout
-
-\end_inset
-
-
-\shape default
- file keywords
-\shape up
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\shape up
-kmap
-\end_layout
-
-\end_inset
-
-
-\shape default
-,
-\shape up
-
-\shape default
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\shape up
-kmod
-\end_layout
-
-\end_inset
-
-,
-\shape up
-
-\shape default
-
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\shape up
-ksmod
-\end_layout
-
-\end_inset
-
-, and
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\shape up
-kcomb
-\end_layout
-
-\end_inset
-
- are described in this section.
-\end_layout
-
-\begin_layout List
-\labelwidthstring 00.00.0000
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\shape up
-kmap
-\end_layout
-
-\end_inset
-
- Map a character to a string
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-kmap
-\family roman
-\emph on
-char
-\family default
-\emph default
-
-\family roman
-\emph on
-string