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

Centralized Emoji Keyword Functionality call for All Languages #397

Conversation

KesharwaniArpita
Copy link
Contributor

@KesharwaniArpita KesharwaniArpita commented Oct 17, 2024

Contributor checklist


Description

This PR introduces a centralized function for generating emoji keywords across multiple languages. The shared functionality has been moved to a generalized function generate_emoji_keyword() in the scribe_data/unicode/generate_emoji_keyword.py file by #379 , and individual language scripts have been refactored by me to call this centralized function. This allows for easier future updates and maintenance while still allowing language-specific customizations if needed.

  1. Refactored Language Scripts:

    • Updated individual language scripts (e.g., generate_emoji_keywords_en.py, generate_emoji_keywords_fr.py, etc.) to call the centralized function, passing the relevant parameters like language, file path, gender, and region.
    • Removed redundant logic from each language script, ensuring all core functionality is centralized.
  2. Flexible for Future Updates:

    • The new structure allows for easy updates in emoji keyword generation logic, as changes only need to be made in one centralized place.

Languages Updated in This PR:

  • English
  • French
  • Spanish
  • German
  • Italian
  • Japanese
  • Russian
  • Chinese
  • Arabic
  • Portuguese
  • All other single languages except Hindustani, Norwegian, and Punjabi.

Remaining Work:

  • Grouped Languages (Hindustani, Norwegian, Punjabi):
    • The refactor for these grouped languages (which include sub-languages like Hindi, Urdu, Bokmål, Nynorsk, etc.) will be completed by 12 noon IST.

Review and feedback on the initial refactor is appreciated.

Related issue

@andrewtavis
Copy link
Member

Hey @KesharwaniArpita 👋 Just a quick note as I'll get back to this later: Please include a bit more code in commits than what you're doing now. You don't need to commit every single file change as this really makes the PR messy to look at.

@KesharwaniArpita
Copy link
Contributor Author

Sure! I'll take care of that.

@KesharwaniArpita
Copy link
Contributor Author

Hi @andrewtavis I have removed all the generate_emoji_keywords.py files from each language directory

@andrewtavis
Copy link
Member

Can you also remove all emoji directories entirely, @KesharwaniArpita? So really get rid of all of the emoji files in each language directory :)

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Thanks for this, @KesharwaniArpita! I made these changes in another PR, but happy to squash this in :)

@andrewtavis andrewtavis merged commit 6239aa4 into scribe-org:main Oct 24, 2024
6 checks passed
@KesharwaniArpita KesharwaniArpita deleted the AK-Contributions-Emoji-Functionality branch October 26, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted as a part of Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants