Repository navigation
Conversation
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.
Summary
This Pull Request improves the Tormenta20 language provider integration with Polyglot, fixing issues related to language configuration, customization, and character language recognition.
The existing Tormenta20 provider already supports the system's default languages, but some language management functionality relies on generic configuration paths that do not match Tormenta20's data structure.
These changes improve compatibility while preserving the existing provider and its language definitions.
Problems Addressed
1. Incorrect Language Configuration Path
Polyglot's generic language configuration methods expect languages to be stored under a standard system configuration path.
However, Tormenta20 defines its languages in:
CONFIG.T20.idiomasAs a result, language additions and removals performed through the provider may not be correctly reflected in the system configuration.
2. Language Name Customization
The existing
getLanguages()implementation primarily uses the language names defined by Tormenta20.This can prevent customized language labels configured through Polyglot from being properly reflected in the resulting language list.
3. Custom Character Languages
Tormenta20 stores character languages in two fields:
system.tracos.idiomas.valuesystem.tracos.idiomas.customThe existing provider only reads the predefined language list, ignoring languages entered in the custom field.
This can cause Polyglot to fail to recognize languages that a character should understand.
Changes Made
Updated
getLanguages()CONFIG.T20.idiomas.Implemented
addToConfig()andremoveFromConfig()CONFIG.T20.idiomasconfiguration object.Updated
getUserLanguages()system.tracos.idiomas.custom.Testing
The updated Tormenta20 language provider has been manually tested on Foundry VTT V14, and the reported integration issue is resolved in the test environment.
Additional regression testing across different language configurations and module combinations may still be useful.
Compatibility and Scope
Additional Notes
This PR focuses on improving the existing Tormenta20 provider rather than introducing a separate implementation.
The goal is to maintain compatibility with the system's language data structure while supporting Polyglot's customization features.