CheckTranslationReference lint pass learns additional checks#21389
Conversation
b8ce51e to
24035d3
Compare
There was a problem hiding this comment.
this is quite wordy 😅
OpenRA.Utility(1,1): Warning: Missing attribute description of key dropdown-map-creeps in en language in mod translation files required by Actor world trait MapCreeps.CheckboxDescription
it also seems that there's a wording missmatch
Testing map: Atreides 01a
OpenRA.Utility(1,1): Warning: Missing key dropdown-map-creeps.description in en language in map translation files required by Actor world trait MapCreeps.CheckboxDescription
When I tried to overwrite a key in fort lonestar I got spammed with errors. There should be just 3

- Increase space of some elements to fit their text. - Remove editor text that aren't translation keys. The text will be set in code anyway. - Remove some unused elements. - Provide a translation key for the port separator, to avoid log warnings.
This avoids needing to access the global Game.Renderer.
- Use error.Message to reports errors, as error.ToString isn't overridden. - Ensure multiple translation languages are handled correctly, we need to use a list to maintain English being the first one.
- Test all translation languages, not just English. - Report any fields marked with TranslationReferenceAttribute that the lint pass lacked the knowledge to check. - Improve context provided by lint messages. Restructure code for readability.
24035d3 to
1e1492c
Compare
Open to wording suggestions, I wanted to ensure the message provided plenty of detail so naturally it's not a short message.
Unified to "Missing key " for both cases.
Fixed. Thanks for the review, this certainly tidies up a few rough edges. |
Additionally:
Assists with #10475. Split from #21293