fix(esx_property): match the notification keys the code actually asks for - #133
Open
seltonmt012 wants to merge 1 commit into
Open
fix(esx_property): match the notification keys the code actually asks for#133seltonmt012 wants to merge 1 commit into
seltonmt012 wants to merge 1 commit into
Conversation
… for Three notifications resolved to "Translation [xx][key] does not exist". furniture.lua asks for delete_confirm and delete_error. Only es and fr ship those names, the other six locales carry the same two strings as deleted_confirm and deleted_error, which nothing reads. Deleting a piece of furniture on an English server therefore printed the error text as a green success message. Renamed the dead keys in the six files rather than changing the call site, because es and fr are the only locales that work today and renaming data nothing reads cannot break a running server. server/main.lua asks for forced_save while every locale ships force_save, so the forced save in the ForceSaveProperties export logged the error text instead of naming the resource that triggered it. Fixed at the call site, since forced_save exists in no locale at all. Verified by driving the real Translate against the shipped locale files: all eight locales answer both delete keys now, and force_save resolves to "Force Save (Requested By esx_property)".
seltonmt012
force-pushed
the
fix/property-locale-keys
branch
from
August 8, 2026 18:25
dbc68a8 to
1f960cf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Three notifications in
esx_propertyresolve toTranslation [xx][key] does not exist. The strings exist, they are just filed under a different name than the code asks for.Motivation
Furniture deletion.
client/furniture.lua:313,316asks fordelete_confirmanddelete_error. Onlyesandfrship those names. The other six locales carry the same two strings asdeleted_confirmanddeleted_error, which nothing reads. On an English server, deleting a piece of furniture shows the error text as a green success message, and failing to delete shows it in red. English is the default fromGetConvar('esx:locale', 'en'), so this is the majority case.Forced save.
server/main.lua:1206asks forforced_save. Every locale shipsforce_save. TheForceSavePropertiesexport exists to record which resource triggered the save, and that record is the error string instead of the resource name.Implementation Details
The two halves are fixed from opposite ends, on purpose.
For the delete keys I renamed the data in the six locale files instead of changing the call site.
esandfrare the only locales that work today, and changing the call site todeleted_*would break them. In the six other filesdeleted_*is unread data, so renaming it cannot break a server that works right now.For
forced_saveI changed the call site, because that name exists in no locale at all whileforce_saveexists in all eight. One line, no data touched.Only the key names change. Every translated string is left exactly as it was.
Verified by running the real
Translatefromes_extended/locale.luaagainst the shipped locale files:delete_confirm(furniture.lua:313)Translation [en][delete_confirm] does not existDeleting ~b~Chair~s~!delete_error(furniture.lua:316)Translation [en][delete_error] does not existCannot Delete ~b~Chair~s~!force_save(main.lua:1206)Translation [en][forced_save] does not existForce Save (Requested By esx_property)All eight locales answer both delete keys now; before, two did.
Usage Example
PR Checklist
One thing worth flagging: a server running a customised locale file will still miss the renamed keys until it merges this change. That is true of any key rename, and the alternative direction would have broken
esandfr, which work today.