Extract (transient) text notifications#20725
Conversation
2c9a72f to
1a28c7f
Compare
PunkPun
left a comment
There was a problem hiding this comment.
I'm thinking it would be much cleaner to just translate inside AddTransientLine and AddFeedbackLine. We should try to embed translation support wherever possible.
As for AddSystemLine, there's still a bunch of untranslated strings for it and it is accessible via lua unlike the aforementioned ones
|
I tried that at first, but those are static methods that need a lot of context for translation like |
|
See discussion in #20387 (comment). This is currently continuing the trend of unwanted duplication 😞 |
|
I agree. If you have a suggestion to make this easily feasible, then I am all ears. |
Perhaps it's wrong for |
|
Hmm, though that would allow maps to overwrite UI translations. It may be something we want, or may be something we want to avoid.
Incase we want these separate, then these static methods can be split. One instance would take |
Maps can define new actors / lobby options / other things that use strings that aren't defined in the base mod. They may also adjust balance in ways that need to be reflected in e.g. sidebar tooltips. IMO there is no choice here: Maps do need to be able to override translations. |
|
We have mod hard-coded and map defined (like these trait notifications). The new API is now less flexible and does not allow mixing them. I still fail to see the benefit so I kept it a separate commit we can easily revert later. |
|
Where is this new API described and why is it less flexible? |
This is a misunderstanding. The question is about, should only some translations be overwritable, or all? |
https://github.com/OpenRA/OpenRA/blob/bleed/OpenRA.Game/ModData.cs#L134-L144 Is where we pass map and mod state to the rest of the static objects. Do the same here. |
All. |
e2c865f to
677bdb6
Compare
PunkPun
left a comment
There was a problem hiding this comment.
LGTM, will just need the last commit squashed.
As for some of the structure inconsistencies, it will be easier to solve them in the followup PR which localises rest of system lines. We will also have to decide how we want to handle lua notifications
677bdb6 to
f010e44
Compare
db04127 to
13e8c24
Compare
7697433 to
34bc5fd
Compare
34bc5fd to
912e2ec
Compare
|
Needs a rebase |
9b8a687 to
5fffeea
Compare
|
What is the idea behind the |
|
In runtime there are null checks to prevent some logic from executing, but the linter is unaware of such checks. I suppose this flag is the method of conveying the info to the linter. |
|
So basically the same as |
c1a9b2f to
c645142
Compare
This prepares #19872 for localization including some hard-coded but mostly trait defined strings.