-
Notifications
You must be signed in to change notification settings - Fork 274
[Feature]: Improve translation context available to translators. #5952
Copy link
Copy link
Open
Labels
featureAdding functionality that adds valueAdding functionality that adds value
Description
Describe the Problem
- MapTool constructs translated text using MessageFormat which is limited to ordinal substitution, i.e.
{0} has a big {1} - Translators need context in order to correctly provide the text in their language.
- They do not edit a document where they can view surrounding lines and work it out on their own. Ordinarily the only context they have is the key and the string. Consider the following where each sentence could be construed a multitude of ways, and each line is delivered separately and not necessarily after the similar prior line:
compliment.player = {0} has a big {1} description.character = {0} has a big {1} insult.player = {0} has a big {1} - The addition of comments can help to clarify things.
#{0} = player name, {1} = facial feature compliment.player = {0} has a big {1}
6. Comments are only delivered to the translator for the string immediately following the comment. This means that - to be useful - the example becomes:
```
#{0} = player name, {1} = facial feature
compliment.player = {0} has a big {1}
#{0} = character name, {1} = vehicle/conveyance
description.character = {0} has a big {1}
#{0} = player name, {1} = facial feature
insult.player = {0} has a big {1}
```
It also means that most of the comments in the code are pointless and need to be endlessly duplicated. Thus,
```
# Initiative menu on the token popup.
initiative.menu = Initiative
initiative.menu.add = Add
initiative.menu.addToInitiative = Add To Initiative
initiative.menu.clearState = Clear Initiative
initiative.menu.enterState = Set the initiative for selected tokens:
initiative.menu.hold = Hold
initiative.menu.remove = Remove
initiative.menu.resume = Resume
initiative.menu.setState = Set Initiative...
```
should really be something like
```
# Token pop-up menu > sub-menu Initiative > Menu label
initiative.menu = Initiative
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.add = Add
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.addToInitiative = Add To Initiative
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.clearState = Clear Initiative
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.enterState = Set the initiative for selected tokens:
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.hold = Hold
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.remove = Remove
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.resume = Resume
# Token pop-up menu > sub-menu Initiative > Menu entry
initiative.menu.setState = Set Initiative...
```
7. This makes for a much larger properties document, which is harder to maintain, harder to find things in, and generally illegible.
8. Additional context can be provided on CrowdIn by providing screen-shots and linking them to the relative keys. This is not fun, and UI changes render them obsolete every time you turn around. This only works for UI elements which reduces the options for things like badly labelled keys, or error messages that don't mean things to non-coders.
### The Solution you'd like
1. Better key names that make sense to people with English as a second language and avoid abbreviations.
2. Named substitution values that (caveat: properly named) provide context in and of themselves.
e.g. `insult.player = {playerName} has a big {facialFeature}`
### Alternatives that you've considered.
_No response_
### Additional Context
_No response_
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureAdding functionality that adds valueAdding functionality that adds value