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

Some countries don't use their name. #131

Closed
samkelleher opened this issue Jul 11, 2017 · 2 comments
Closed

Some countries don't use their name. #131

samkelleher opened this issue Jul 11, 2017 · 2 comments

Comments

@samkelleher
Copy link

Almost all of the country flags use their name as the key in the emojis object. However, a small handful of 'major' countries, just use a two character code, like Japan, United States, United Kingdom etc. Because of this, theres no way to give the US emoji the full name. It does have "united", "states" as two separate key words (amongst others). Japan is another example that doesn't include the full name at all.

What system should be put in place, for example, if the emoji is a flag, the first keyword is always the full country name (even if it includes spaces)?

"jp": {
--
  | "keywords": ["japanese", "nation", "flag", "country", "banner"],
  | "char": "🇯🇵",
  | "fitzpatrick_scale": false,
  | "category": "flags"
  | },

@muan
Copy link
Owner

muan commented Jul 17, 2017

What system should be put in place, for example, if the emoji is a flag, the first keyword is always the full country name (even if it includes spaces)?

I think we can just add them. There's nothing checking against space in keywords.

chadoh added a commit to chadoh/emoji-mart that referenced this issue Aug 6, 2017
Always perform the capitalization-correction for country names. If we
did this naïvely, using the same regex as before, it would change things
like "Falkland Islands" to "Falkland ISLANDS". The new regex checks on
word boundary, `\b`, instead of space, `\s`, which means even single
words like `Eu` are found. It then checks for exactly two letters, where
the first is uppercase and the second lowercase.

Here's exactly what it affects:

* All "Regional Indicator Symbol Letters AC"-type names that don't
have data in emojiLib
* There are some flags in emojiLib for which it uses two-character
abbreviations instead of full country names (see muan/emojilib#131).
These countries are: CN, EU, FR, DE, IT, JP, RU, KR, ES, TR, UK, US
This new regex corrects these from Cn, Eu, Fr, etc.
@jaller94
Copy link

I am in favour of making the first keyword the country's name.
Furthermore, I think that languages of a similar name (e.g. "Japanese", "English", "German") should not be part of the keywords. The languages exceed the geographical regions the flags represent.

@muan muan mentioned this issue Oct 13, 2019
2 tasks
@muan muan closed this as completed Jan 14, 2021
meticulousfan pushed a commit to meticulousfan/vue-emoji-mart that referenced this issue Aug 17, 2022
Always perform the capitalization-correction for country names. If we
did this naïvely, using the same regex as before, it would change things
like "Falkland Islands" to "Falkland ISLANDS". The new regex checks on
word boundary, `\b`, instead of space, `\s`, which means even single
words like `Eu` are found. It then checks for exactly two letters, where
the first is uppercase and the second lowercase.

Here's exactly what it affects:

* All "Regional Indicator Symbol Letters AC"-type names that don't
have data in emojiLib
* There are some flags in emojiLib for which it uses two-character
abbreviations instead of full country names (see muan/emojilib#131).
These countries are: CN, EU, FR, DE, IT, JP, RU, KR, ES, TR, UK, US
This new regex corrects these from Cn, Eu, Fr, etc.
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

No branches or pull requests

3 participants