Merith-TK / cc-restitched-unmaintained

CC: Tweaked ported for Fabric 1.16.x
Other
10 stars 11 forks source link

Fix getItemDetail() showing raw translation keys. #64

Closed toad-dev closed 3 years ago

toad-dev commented 3 years ago

The dedicated server always uses the default Language instance, as it's setter method is stripped from the server jar. So if we mixin to this instance's creation and load it with all present mods' en_us lang files, we will be able to "translate" text on the server. Translate in quotes as we're only loading en_us files, but mojang was the one who left out translations on the dedicated server we shouldn't feel too bad.

@Merith-TK since you run a heavily modded smp, could you run some tests on this build for me in that scenario?

SquidDev commented 3 years ago

There's a bit of me which feels this should go in Fabric API, on the basis that (one assumes) other mods would also benefit from it.

I'm actually curious now, what happens if you run /computercraft help from a dedicated server's console - that also shouldn't have language keys available.

Edit: Yep, it's broken. I think this is compelling enough that it's worth adding to Fabric proper, though obviously your call!

Running /computercraft help in a terminal shows translation keys rather than translated text.

toad-dev commented 3 years ago

I'll put it in a PR over there tomorrow and see what they say!

toad-dev commented 3 years ago

Screenshot 2021-06-16 013628 Here's it working with the commit, in case we're still having build troubles. (Featuring a sneaky translation key that's missing from the repo)

Merith-TK commented 3 years ago

this does appear to work, would you like this to be merged as is? or do you have plans for future updates on this

Merith-TK commented 3 years ago

Ya know waht. Imma just merge this for now until FabricAPI updates its shit to fix this