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

CardDb: add normalized Names #4376

Merged
merged 9 commits into from
Dec 19, 2023
Merged

CardDb: add normalized Names #4376

merged 9 commits into from
Dec 19, 2023

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Dec 14, 2023

closes #4365

  • Added Normalized Names to DB
  • Deck Import recognize Normalized Names
  • Deck Import recognize Non Normalized Names
  • Deck Search Supports both Normalized and Non Normalized Names

The Deck import currently still can't understand the OG "û", i need to debug why

@Hanmac Hanmac requested a review from kevlahnota December 14, 2023 06:19
@Hanmac Hanmac self-assigned this Dec 14, 2023
@Hanmac
Copy link
Contributor Author

Hanmac commented Dec 14, 2023

@tehdiplomat what should i do with:

     public static final String REX_CARD_NAME = String.format("(\\[)?(?<%s>[a-zA-Z0-9&',\\.:!\\+\\\"\\/\\-\\s]+)(\\])?", REGRP_CARD);

?

@Hanmac Hanmac requested a review from tehdiplomat December 14, 2023 08:38
@Hanmac
Copy link
Contributor Author

Hanmac commented Dec 14, 2023

@tehdiplomat @kevlahnota the Pattern in DeckRecognizer should probably be updated for Unicode

@Hanmac
Copy link
Contributor Author

Hanmac commented Dec 15, 2023

The Font for Mobile doesn't need to be touched, because û is already in their Default Characters

@Hanmac
Copy link
Contributor Author

Hanmac commented Dec 15, 2023

@tehdiplomat @kevlahnota i did some funky with the CardRulesPredicates

when searching Cards in the Deck Editor, it now searches for all the faces.

this helps when searching for cards like with Adventure

and for Card names, it even support the normalized names. so when you search for "Lim-Dul" you get "Lim-Dûl" too

@Hanmac Hanmac marked this pull request as ready for review December 17, 2023 12:03
tehdiplomat
tehdiplomat previously approved these changes Dec 19, 2023
Copy link
Contributor

@tehdiplomat tehdiplomat left a comment

Choose a reason for hiding this comment

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

As long as deck/quest loading can still handle normalized names I'm fine with the general idea of these changes. The next time they save they'll have the UTF names I guess?

forge-core/src/main/java/forge/card/CardDb.java Outdated Show resolved Hide resolved
forge-gui/res/draft/rankings.txt Outdated Show resolved Hide resolved
@Hanmac Hanmac merged commit ce9ca39 into master Dec 19, 2023
4 checks passed
@Hanmac Hanmac deleted the normalizedNames branch December 19, 2023 17:39
tehdiplomat added a commit that referenced this pull request Dec 19, 2023
tehdiplomat added a commit that referenced this pull request Dec 19, 2023
Hanmac added a commit that referenced this pull request Dec 19, 2023
Hanmac added a commit that referenced this pull request Dec 26, 2023
Hanmac added a commit that referenced this pull request Dec 28, 2023
tehdiplomat pushed a commit that referenced this pull request Dec 29, 2023
Northmoc pushed a commit to Northmoc/forge that referenced this pull request Jan 8, 2024
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.

Forge doesn't recognise cards that have the letters á, É, é, í, ó, ú, û in their names
3 participants