Skip to content

Commit

Permalink
describe msgid more clearly and reformulate syntactical comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gkurzbach committed Feb 10, 2022
1 parent e78573b commit 35fdfa8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions RationaleMCP/0035/SpecificationText.md
Expand Up @@ -47,12 +47,12 @@ At first there can be an optional comment describing the location (file name and

Then, the `<context identifier>` behind the keyword `msgctxt` is the full name of the Modelica class (e.g. `Modelica.Blocks.Math.Sin` ) where the text appears in. Short class definitions do not appear here. Texts in such classes belong to the enclosing full class definition.

After the `msgid` keyword the text string which shall be translated follows. [*Please regard that if a `msgid` string is given more than once in the same context, all occurrences are translated with the same (last) translation!*]
After the `msgid` keyword the text string which shall be translated follows. It should exactly contain the same characters as the original string from the Modelica text representation, i.e. all spaces, control characters and sequences are kept. [*Please regard that if a `msgid` string is given more than once in the same context, all occurrences are translated with the same (last) translation!*]

The keyword `msgstr` is followed by the translation of `msgid`. In the template file this string is empty by definition. If this is empty in a language specific file the contents of `msgid` may be used instead.

The texts in following Modelica constructs should be translated:
* syntactical comments
* description strings of component declarations and classes
* strings in following annotations:
* Text.string, Text.textString
* missingInnerMessage, obsolete, unassignedMessage
Expand All @@ -61,5 +61,7 @@ The texts in following Modelica constructs should be translated:
* Documentation.[info|revisions]
* Figure.title, Plot.title, Curve.legend

C-style and line comments are not translated.

[*To support the translation of that strings a number of free and commercial tools exist in context of GNU gettext.
A Modelica tool should provide a function to create the initial template file from an existing Modelica library.*]
A Modelica tool should provide a function to create the initial template file from an existing Modelica library.*]

0 comments on commit 35fdfa8

Please sign in to comment.