diff --git a/chapters/packages.tex b/chapters/packages.tex index 87e8ebbb4..11caf47a1 100644 --- a/chapters/packages.tex +++ b/chapters/packages.tex @@ -388,20 +388,24 @@ \section{Multilingual Descriptions}\label{multilingual-descriptions} \end{nonnormative} Only the keywords \lstinline!msgctxt!, \lstinline!msgid! and \lstinline!msgstr! are used. +\begin{nonnormative} At first there can be an optional comment describing the location (file name and line number) of the text to translate. Multiple occurences of the same string can be listed here, separated by space. +\end{nonnormative} The \lstinline!! following the keyword \lstinline!msgctxt! shall be the full name of the Modelica class (e.g., \lstinline!Modelica.Blocks.Math.Sin!) where the text appears. Short class definitions do not appear here. Texts in such classes belong to the enclosing full class definition. +\begin{nonnormative} After the \lstinline!msgid! keyword the text string which shall be translated follows. +\end{nonnormative} It should contain the original string from the Modelica text representation. +\begin{nonnormative} Since in Modelica control sequences also start with a backslash and another backslash is used to use sequences literally or to hide double quotes, no change is required here. But Modelica allows strings to go over more than one line, gettext does not. Therefore, line breaks in Modelica must be encoded with \lstinline!"\n"! for gettext. -\begin{nonnormative} In order to avoid long lines in the translated strings (following \lstinline!msgid! or \lstinline!msgstr!), strings may be split into smaller parts given on consecutive lines, e.g. \begin{lstlisting} "A @@ -414,12 +418,12 @@ \section{Multilingual Descriptions}\label{multilingual-descriptions} \end{lstlisting} These strings are concatenated when read. Please regard that if a \lstinline!msgid! string is given more than once in the same context, all occurrences are translated with the same (last) translation! -\end{nonnormative} The keyword \lstinline!msgstr! is followed by the translation of \lstinline!msgid!. With regard to control characters and line breaks, the same rules apply as for \lstinline!msgid!. In the template file this string is empty by definition. If this is empty in a language specific file the contents of \lstinline!msgid! may be used instead. +\end{nonnormative} The texts in following Modelica constructs should be translated: \begin{itemize}