Add south_korea alias, korea tags for North Korea - #346
Open
Harshcombo50548 wants to merge 1 commit into
Open
Conversation
`Emoji.find_by_alias("south_korea")` returned nil, so the South Korea flag
had no alias containing either word of its name: searching "south" matched
south_africa, south_sudan and south_georgia_south_sandwich_islands, while
"korea" matched the north_korea alias. South Korea carried "korea" as a
tag, but alias lookup never sees tags and pickers that do search them rank
tag hits below alias hits, so the flag was effectively reachable only by
typing `kr`.
Added `south_korea` as a second alias, following the existing
eu/european_union shape of a short canonical name plus the full country
name. North Korea had no tags at all, so it was not findable by tag search
either; added korea/north there to close the same gap from the other side.
The existing aliases stay in first position, so `Character#name` still
returns "kr" and "north_korea" and the `:kr:` / `:north_korea:` references
are unchanged. `db/dump.rb` copies existing aliases and tags verbatim when
rebuilding from the Unicode data, so these additions survive regeneration.
Co-Authored-By: X-DAEM0N <307583041+X-DAEM0N@users.noreply.github.com>
Author
|
@mislav This repo Pull requests seem stale? Is it still being maintained? Side Note: The south_korea alias is the only thing that actually matters here. |
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.
Add
south_koreaalias,koreatags for North KoreaThe 🇰🇷 flag has no alias containing either word of its name, so in practice it's reachable
only by typing
krexactly.Current data:
Emoji.find_by_alias("south_korea")returnsnil, and alias-substring search misses it fromboth directions:
southsouth_africa,south_sudan,south_georgia_south_sandwich_islands,french_southern_territorieskoreanorth_koreaSouth Korea does carry
koreaas a tag, so a tag-aware consumer can find it — but alias lookupnever sees tags, and pickers that do search tags rank those hits below alias matches, so 🇰🇵 wins
the "korea" query. 🇰🇵, meanwhile, has no tags at all, so it isn't findable by tag search either.
Change
Appending the full country name after a short canonical alias follows the existing
eu/european_unionshape. North Korea getskorea/northtags to close the same gap fromthe tag side, without touching its aliases.
After the change, an alias search for
southreturns 5 flags including South Korea, andkoreareturns both Koreas.Notes
Character#nameisaliases.first, sofind_by_unicode("🇰🇷").namestill returns"kr"and:kr:/:north_korea:areunaffected. Nothing is renamed or removed, and North Korea's alias list is untouched.
south_koreawas unused across all 1870 entries, so the "emojis havevalid names" duplicate assertion still holds. (For anyone considering the same treatment for
the other ISO-2 flags:
japanis already taken by 🗾 andturkeyby 🦃.)db/dump.rbcopiesexisting_emoji.aliasesandexisting_emoji.tagsverbatim, sorake db:dumpwon't clobber these. Both flag sequencesmatch on the first
find_by_unicodelookup and appear exactly once invendor/unicode-emoji-test.txt, so theseen_existingde-dup path can't regenerate a freshalias for them.
db/emoji.json, hand-edited to match the file's generatedleading-comma formatting.