Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Intl] Generate all emoji short name returned by slack api #49147

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

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

adnen-chouibi
Copy link
Contributor

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets no
License MIT
Doc PR NA

I have been utilizing the slack-emoji helper to convert country codes to flag emojis. I propose to standardize all flags by using the format :flag-countryCode: for all flags, or maybe create another helper especially for flags. Additionally, I suggest incorporating all emojis returned in the 'short_names' array, rather than relying solely on the 'short_name' value. I have improved the file naming process by generating the file name in the builder, rather than in the 'saveRules' method.

@nicolas-grekas
Copy link
Member

Thanks, can you update the generated files in the same PR please?

src/Symfony/Component/Intl/Resources/emoji/build.php Outdated Show resolved Hide resolved
src/Symfony/Component/Intl/Resources/emoji/build.php Outdated Show resolved Hide resolved
src/Symfony/Component/Intl/Resources/emoji/build.php Outdated Show resolved Hide resolved
src/Symfony/Component/Intl/Resources/emoji/build.php Outdated Show resolved Hide resolved
@adnen-chouibi
Copy link
Contributor Author

I suggest building a new file flag-emoji.php, to convert country codes to flags. This new feature could enhance the Intl component by adding a convenient method, such as Countries::getFlag('GB'), which would return 🇬🇧.

@stof
Copy link
Member

stof commented Jan 30, 2023

@adnen-chouibi that feature does not depend on building a map. See https://github.com/thekelvinliu/country-code-emoji for the JS implementation of such a feature, which relies only on the knowledge of how emoji flags are encoded.
This is not even a work for the symfony/intl component IMO.

@adnen-chouibi adnen-chouibi requested a review from stof February 3, 2023 10:34
@carsonbot carsonbot changed the title Generate all emoji short name returned by slack api [Intl] Generate all emoji short name returned by slack api Feb 6, 2023
@nicolas-grekas
Copy link
Member

Thank you @adnen-chouibi.

@nicolas-grekas nicolas-grekas merged commit bd4c57f into symfony:6.2 Feb 6, 2023
@fabpot fabpot mentioned this pull request Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.