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

feat(locale): add Hungarian language #3129

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

nandordudas
Copy link

magyar πŸ‡­πŸ‡Ί

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@nandordudas
Copy link
Author

I'd like to propose implementing linked messages for commonly reused text across our localization files. This approach would help us maintain consistency and reduce duplication in our translations.

For example, instead of repeating the same close translation across different components, we could define it once in a common section and reference it using Vue i18n's linking syntax:

import { defineLocale } from '../composables/defineLocale'

export default defineLocale({
  name: '...',
  code: '...',
  messages: {
    common: {
      actions: {
        close: '...', // Define the translation once
      },
    },
    toast: {
      close: '@:common.actions.close', // Reference the common translation
    },
  }
})

This pattern would make our localization more maintainable since we'd only need to update common phrases in one place. It would also help ensure consistent terminology throughout the interface.

What are your thoughts on adopting this approach?

Copy link

pkg-pr-new bot commented Jan 17, 2025

npm i https://pkg.pr.new/@nuxt/ui@3129

commit: 037e9ed

@nandordudas
Copy link
Author

I noticed that Hungarian, like many languages, has multiple ICU locale definitions - both a general language code (hu) and a region-specific variant (hu-HU). Each of these has slightly different formatting rules for things like dates, numbers, and currency.

For example, looking at the ICU data:

  • hu: General Hungarian language settings
  • hu-HU: Hungary-specific formatting rules

Should we consider supporting these regional variants in our localization system? While starting with the base language code (hu) covers most cases, we might miss some region-specific formatting nuances. Would implementing just the base language locale be sufficient for our needs, or should we plan to support regional variants as well?

References:

@benjamincanac benjamincanac changed the title feat(i18n): add Hungarian language support feat(locale): add Hungarian language Jan 17, 2025
@nandordudas nandordudas force-pushed the feat-add-language-support-hungarian branch from 3f539c3 to 0714305 Compare January 19, 2025 06:31
@benjamincanac benjamincanac added the v3 #1289 label Jan 20, 2025
@nandordudas nandordudas force-pushed the feat-add-language-support-hungarian branch from 0714305 to c3ea8a5 Compare January 21, 2025 08:15
magyar πŸ‡­πŸ‡Ί
@nandordudas nandordudas force-pushed the feat-add-language-support-hungarian branch from c3ea8a5 to 037e9ed Compare January 21, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants