txAdmin
txAdmin copied to clipboard
[BUG] Warn localization not working if menu is disabled
txAdmin/FXServer versions: 4.13.3/5429
Describe the bug Localization is not working for Warns when menu is disabled in TxAdmin config
To Reproduce Steps to reproduce the behavior:
- Set Langage to French in Settings->Global
- Enable the Menu in Settings->Menu
- Restart Server
- Warn a player => NUI Warn menu is in French
- Disable the Menu in Settings->Menu
- Restart Server
- Warn a player => NUI Warn menu is in English
Expected behavior Warns to be in the correct langage with Menu Disabled
Confirmed.
Related to #608.
The bug can most likely be attributed to improper ServerCtx event listener logic for clients when the menu is disabled. During local testing with the menu disabled, clients never receive the "setServerCtx" event upon update of web settings. ServerCtx is updated within GlobalState but the event is never properly dispatched to clients, as we never populate the TX_ADMINS table when the menu is disabled.
Here is where its blowing up
In fact, after glancing over some of the code, does localization even work in NUI for servers that don't enable OneSync?
Confirmed that this is still a thing in v5, even though #608 was fixed some time ago :(
Issue finally fixed.
Will be available on the next update.