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

Fix/optimize CoC ID filters #1418

Conversation

Technus
Copy link
Contributor

@Technus Technus commented Oct 16, 2023

Description.

Using localized resources is nearly impossible due to improper CoC ID filtering.

Motivation and Context.

Allows to translate compendiums in a working way.

Some resources are being removed from index by: CoCID.filterAllCoCID (documents, langFallback)
which causes the game to be partially localized.

ex. Credit rating - In my world/module there is a valid translation + valid skill with higher priority, yet it is not used.

  • CoCID.filterBestCoCID(documents)
    • Added defaults for priority parsing
    • Added local caching of current document
    • Moved check if document is already present to top, and if not to add it without any preference checks
  • CoCID.filterAllCoCID (documents, langFallback)
    • Added defaults for priority parsing
    • Added local caching of current document
    • Added sorting of eras before creating 'eras used identifier'
    • Moved check if document is already present to top, and if not to add it without any preference checks
    • Now correctly supports Priority system

Screenshots.

image

Types of Changes.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

@snap01
Copy link
Collaborator

snap01 commented Nov 12, 2023

There were additional issues in the original implementation of the CoC ID language and era filtering. These has been resolved with #1435

Thank you for the pull request bringing these issues to light.

@snap01 snap01 closed this Nov 12, 2023
@Technus Technus deleted the bug/ImproperIdSelection branch November 18, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants