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

Centralize Translation Functions for Common and Error Keys #1998

Closed
pranshugupta54 opened this issue May 22, 2024 · 0 comments
Closed

Centralize Translation Functions for Common and Error Keys #1998

pranshugupta54 opened this issue May 22, 2024 · 0 comments
Assignees
Labels
dependencies Pull requests that update a dependency file feature request unapproved

Comments

@pranshugupta54
Copy link
Member

Note: This issue is part of my project for translations

Is your feature request related to a problem? Please describe.

Currently, translations for common keys are repeated across different screens in the frontend codebase. This leads to redundancy, makes maintenance difficult, and increases the risk of inconsistencies in translations.

Describe the solution you'd like

I propose creating separate functions for handling translations of common keys. These functions would be reused across different screens, ensuring consistency and reducing redundancy. This approach will centralize the translation logic, making it easier to update and manage.

Describe alternatives you've considered

  1. Continue with the current approach: This option was dismissed as it leads to repetitive code and makes updates more cumbersome.
  2. Use a third-party library: While this could standardize translations, it might introduce unnecessary complexity and dependencies.

Approach to be followed (optional)

  1. Identify common keys: Review the current codebase to identify frequently used translation keys.
  2. Create translation functions: Develop functions for these common keys and place them in a dedicated module.
  3. Refactor existing code: Replace repeated translation keys with calls to the new functions.

Additional context

Centralizing translations will not only improve code maintainability but also enhance the consistency of the user experience.
Folder structure:
image

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship PalisadoesFoundation/talawa#359

@pranshugupta54 pranshugupta54 self-assigned this May 22, 2024
@github-actions github-actions bot added dependencies Pull requests that update a dependency file unapproved labels May 22, 2024
@pranshugupta54 pranshugupta54 changed the title Centralize Translation Functions for Common Keys Centralize Translation Functions for Common and Error Keys May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file feature request unapproved
Projects
None yet
Development

No branches or pull requests

1 participant