Localize Debug Settings comments (PT-BR) with English fallback#5956
Open
vedned wants to merge 2 commits into
Open
Localize Debug Settings comments (PT-BR) with English fallback#5956vedned wants to merge 2 commits into
vedned wants to merge 2 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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
The Debug Settings panel (Advanced → Show Debug Settings) shows a help comment for each setting. Until now these comments were always displayed in English, regardless of the language selected in the viewer, because they are read directly from
app_settings/settings.xmlat runtime. This made advanced configuration harder for non-English speakers.This PR introduces localized Debug Settings comments: when a translation file exists for the active language, the viewer displays the setting descriptions in that language. When it does not, the previous behavior (English) is fully preserved. It also ships a complete PT-BR translation as the first implementation.
What changes
After the session language is initialized, the viewer loads
skins/default/xui/{locale}/settings_comments.xmland overrides the comments of the existing controls at runtime, for both the Global and PerAccount settings groups.Implementation
LLAppViewer::loadLocalizedSettingsComments()and a helperapply_localized_comments()inindra/newview/llappviewer.cpp.indra/newview/llappviewer.h.LLUI::getLanguage()is already valid and the default English comments have already been loaded.gDirUtilp->findSkinnedFilename(LLDir::XUI, "settings_comments.xml", LLDir::CURRENT_SKIN), which returns the most-localized existing path, or an empty string when none exists.LLSDSerialize::fromXMLinto a simple LLSD map (SettingName -> "translated comment"), and each entry overrides the comment of the matching control viaLLControlVariable::setComment().Why it is safe
getControl()returns anLLControlVariablePtr(smart pointer); the helper checksnotNull()before writing.initConfiguration()vialoadSettingsFromDirectory("Default", set_defaults=true), before this call.set_defaults=false, which does not callsetComment(), so translated comments are not overwritten later.llsdserialize.handllviewercontrol.halready included).Fallback behavior
PT-BR content
indra/newview/skins/default/xui/pt/settings_comments.xmlcovering 1,507 settings (1,466 fromsettings.xml+ 41 fromsettings_per_account.xml), validated as well-formed XML, with consistent terminology across families of settings.indra/newview/skins/default/xui/pt/floater_settings_debug.xml.Files changed
indra/newview/llappviewer.hindra/newview/llappviewer.cppindra/newview/skins/default/xui/pt/settings_comments.xml(new)indra/newview/skins/default/xui/pt/floater_settings_debug.xmlRelated Issues
Issue Link: relates to #5955
Checklist
Additional Notes
Debug Settings Português:
2026-06-25.16-05-15.mp4
How to test
settings_comments.xmland confirm comments fall back to English.