Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2528] Add categories to languages #2575

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

arbron
Copy link
Collaborator

@arbron arbron commented Nov 9, 2023

Groups languages into categories based on how they are defined in the SRD.

Language Selector Language Advancement

This change does modify the languages object in config, but it shouldn't be a breaking change for most cases because adding languages in the old fashion (CONFIG.DND5E.languages.test = "test";) will still work correctly (those languages will just appear at the top level.

Retrieving languages using Trait.keyLabel will also continue working. The only case that will lead to unexpected results is if code was retrieving languages directly (console.log(CONFIG.DND5E.languages.common), but that will just return empty.

@arbron arbron added this to the D&D5E 2.4.0 milestone Nov 9, 2023
@arbron arbron self-assigned this Nov 9, 2023
module/config.mjs Outdated Show resolved Hide resolved
@arbron arbron requested a review from Fyorl November 13, 2023 16:52
module/documents/actor/trait.mjs Outdated Show resolved Hide resolved

return key;
// Explicit categories (e.g. languages)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear to me how this differs from the above tool options where we search for an exact category match or a child match? Do we still need those, or are they covered by this new searchCategory?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For vehicle categories in tools, those are stored in separate configuration objects, while these are nested categories in a single object. The joys of years of legacy configuration data :).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks, that makes sense.

@arbron arbron requested a review from Fyorl November 13, 2023 21:41
@arbron arbron merged commit 41530c7 into foundryvtt:2.4.x Nov 13, 2023
@arbron arbron deleted the language-categories branch November 13, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants