NamelessMC / Nameless

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.
https://namelessmc.com/
MIT License
612 stars 311 forks source link

Hardcoded language terms #3421

Open DominikSLK opened 1 year ago

DominikSLK commented 1 year ago

Describe the issue

https://github.com/NamelessMC/Nameless/blob/0396359337122b8ee271ebab9b877c00aa53b288/modules/Core/classes/Group_Sync/NamelessMCGroupSyncInjector.php#L17

https://github.com/NamelessMC/Nameless/blob/0396359337122b8ee271ebab9b877c00aa53b288/modules/Core/classes/Group_Sync/MinecraftGroupSyncInjector.php#L17

https://github.com/NamelessMC/Nameless/blob/0396359337122b8ee271ebab9b877c00aa53b288/modules/Discord%20Integration/classes/DiscordGroupSyncInjector.php#L17

NamelessMC Version

2.1.0

To Reproduce

No response

Expected Behaviour

No response

Screenshots

No response

Additional Information

No response

Derkades commented 1 year ago

Is this shown anywhere in StaffCP?

DominikSLK commented 1 year ago

yes it is on the page where you select groups for group sync

samerton commented 1 year ago

Not sure how to fix this with how it works at the moment.

Let's say we pass a Language instance into the getName method to allow for translations. Currently we have no context as to which Language instance to use - imagine there is a custom module which adds injectors (even in the case of Discord Integration) - the code would not know which Language instance to pass in.