Skip to content

Commit

Permalink
Merge pull request modelica#3126 from HansOlsson/feedback
Browse files Browse the repository at this point in the history
Make multiple lines non-normative.
  • Loading branch information
HansOlsson committed Mar 1, 2022
2 parents dc2a9b4 + 6810d2b commit 47486fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion RationaleMCP/0035/SpecificationText.md
Expand Up @@ -50,7 +50,9 @@ Then, the `<context identifier>` behind the keyword `msgctxt` is the full name o
After the `msgid` keyword the text string which shall be translated follows. It should contain the original string from the Modelica text representation.
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, Modelica strings must be split into consecutive strings at the line breaks, and the line breaks must be encoded with a "\n" at the end of each string, e.g.
Therefore, line breaks in Modelica must be encoded with "\n".

In order to avoid long lines Modelica strings may be split into consecutive strings at the line breaks, and the line breaks encoded with a "\n" at the end of each string, e.g.
```
"A
B"
Expand Down
6 changes: 4 additions & 2 deletions chapters/packages.tex
Expand Up @@ -396,7 +396,10 @@ \section{Multilingual Descriptions}\label{multilingual-descriptions}
It should contain the original string from the Modelica text representation.
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, Modelica strings must be split into consecutive strings at the line breaks, and the line breaks must be encoded with a \lstinline!"\n"! at the end of each string, e.g.
Therefore, line breaks in Modelica must be encoded with \lstinline!"\n"!.

\begin{nonnormative}
In order to avoid long lines, strings may be split into smaller parts given on consecutive lines, e.g.
\begin{lstlisting}
"A
B"
Expand All @@ -407,7 +410,6 @@ \section{Multilingual Descriptions}\label{multilingual-descriptions}
"B"
\end{lstlisting}
These strings are concatenated when read.
\begin{nonnormative}
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}

Expand Down

0 comments on commit 47486fc

Please sign in to comment.