-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
Comments
I think we can just add them. There's nothing checking against space in keywords. |
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.
I am in favour of making the first keyword the country's name. |
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.
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)?
The text was updated successfully, but these errors were encountered: