You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I make Dialogue Manager which uses an EditorTranslationParserPlugin to export translatable lines of dialogue into the POT file.
Describe the problem or limitation you are having in your project
I'm in the process of supporting doc-style comments on lines of dialogue that can be included when exporting translations. This is (mostly) already possible with the CSV option but not possible if using POT files.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose adding an optional fourth item to the msgids_context_plural array in EditorTranslationParserPlugin::parse_file that can be used to provide comments.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Anyone implementing an EditorTranslationParserPlugin would be able to add a fourth item to the msgids_context_plural array to provide a comment. That comment (if provided) would then be added to the generated POT file
extendsEditorTranslationParserPluginfunc_parse_file(path: String, msgids: Array, msgids_context_plural: Array) ->void:
# ...load some file, for example a dialogue file...fordialogue_line: Dictionaryindialogue_lines:
# Here the line's comment would be passed as the optional fourth item in the array.msgids_context_plural.append([line.text, line.context, "", line.comment])
# This is the provided comment. It might be used to provide a hint
# like "the chicken question is the set up to a really basic joke".
#: examples/dialogue.dialogue
msgid "Hi, I'm Nathan. Why did the chicken cross the road?"
msgstr ""
If this enhancement will not be used often, can it be worked around with a few lines of script?
It might be used by any addon that wants to provide extra help for translators with user generated strings.
As far as I'm aware a workaround isn't currently possible.
Is there a reason why this should be core and not an add-on in the asset library?
As far as I'm aware it's not currently possible to do with an addon.
The text was updated successfully, but these errors were encountered:
Should similiar functionality also be included in tr() etc.?
tr() already has an optional second parameter for a context, but I agree it could have an optional third parameter that would be read as a comment. In this case, you'd use an empty string for the context if you don't want to use a specific context.
Describe the project you are working on
I make Dialogue Manager which uses an
EditorTranslationParserPlugin
to export translatable lines of dialogue into the POT file.Describe the problem or limitation you are having in your project
I'm in the process of supporting doc-style comments on lines of dialogue that can be included when exporting translations. This is (mostly) already possible with the CSV option but not possible if using POT files.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose adding an optional fourth item to the
msgids_context_plural
array inEditorTranslationParserPlugin::parse_file
that can be used to provide comments.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Anyone implementing an
EditorTranslationParserPlugin
would be able to add a fourth item to themsgids_context_plural
array to provide a comment. That comment (if provided) would then be added to the generated POT fileIf this enhancement will not be used often, can it be worked around with a few lines of script?
It might be used by any addon that wants to provide extra help for translators with user generated strings.
As far as I'm aware a workaround isn't currently possible.
Is there a reason why this should be core and not an add-on in the asset library?
As far as I'm aware it's not currently possible to do with an addon.
The text was updated successfully, but these errors were encountered: