Skip to content

Conversation

@ups216
Copy link
Member

@ups216 ups216 commented Apr 14, 2025

This pull request introduces a new CategoriesDropdown component to the application, integrates it into the header for both mobile and desktop views, and adds category translations to the language context and locale files.

New Component and Integration:

Language Context and Translations:

  • client/src/contexts/LanguageContext.tsx: Updated the language context to include category translations for supported languages. [1] [2]
  • Added category translations for each supported language:
    • client/src/locale/category-en.json
    • client/src/locale/category-zh-hans.json
    • client/src/locale/category-zh-hant.json
    • client/src/locale/category-ja.json
    • client/src/locale/category-es.json
    • client/src/locale/category-de.json

Minor Locale Updates:

  • Updated locale files to include the translation for "Categories":
    • client/src/locale/en.json
    • client/src/locale/zh-hans.json
    • client/src/locale/zh-hant.json
    • client/src/locale/ja.json
    • client/src/locale/es.json
    • client/src/locale/de.json

@ups216
Copy link
Member Author

ups216 commented Apr 14, 2025

#46

@ups216 ups216 requested a review from Copilot April 14, 2025 15:29
@ups216 ups216 self-assigned this Apr 14, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 18 changed files in this pull request and generated no comments.

Files not reviewed (12)
  • client/src/locale/category-de.json: Language not supported
  • client/src/locale/category-en.json: Language not supported
  • client/src/locale/category-es.json: Language not supported
  • client/src/locale/category-ja.json: Language not supported
  • client/src/locale/category-zh-hans.json: Language not supported
  • client/src/locale/category-zh-hant.json: Language not supported
  • client/src/locale/de.json: Language not supported
  • client/src/locale/en.json: Language not supported
  • client/src/locale/es.json: Language not supported
  • client/src/locale/ja.json: Language not supported
  • client/src/locale/zh-hans.json: Language not supported
  • client/src/locale/zh-hant.json: Language not supported
Comments suppressed due to low confidence (2)

client/src/components/CategoriesDropdown.tsx:163

  • [nitpick] Consider using the category key itself (e.g., key) for the React 'key' prop instead of the index for better stability and to avoid potential rendering issues.
  categoryKeys.map((key, index) => (

client/src/components/CategoriesDropdown.tsx:228

  • [nitpick] Consider using the unique category identifier (key) as the React 'key' prop rather than the index in the desktop dropdown to ensure stable and predictable list rendering.
              categoryKeys.map((key, index) => (

@ups216 ups216 merged commit 96dbff2 into main Apr 14, 2025
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

Successfully merging this pull request may close these issues.

2 participants