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

Add Ukrainian (uk) language support #3526

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

buiiz
Copy link
Contributor

@buiiz buiiz commented Sep 28, 2024

Summary

This pull request adds support for the Ukrainian language (uk) to the application. It includes adding the language to the list of supported languages, updating various language-related configurations, and adding the Ukrainian translation file.

Files Changed

  1. project.inlang/settings.json: Added "uk" to the languageTags array.
  2. src/app/app.constants.ts: Added Ukrainian language support to various language-related enums and imports.
  3. src/app/features/config/form-cfgs/language-selection-form.const.ts: Added Ukrainian language option to the language selection form.
  4. src/app/t.const.ts: Added Ukrainian language constant.
  5. src/assets/i18n/en.json: Added Ukrainian language name to the English translations.
  6. src/assets/i18n/uk.json: Added new file containing Ukrainian translations.

Code Changes

project.inlang/settings.json

"languageTags": [
  // ...
  "tr",
  "uk",  // Added Ukrainian language code
  "zh",
  // ...
]

src/app/app.constants.ts

import '@angular/common/locales/global/uk';  // Added import for Ukrainian locale

export enum LanguageCode {
  // ...
  uk = 'uk',  // Added Ukrainian language code
  // ...
}

export enum LanguageCodeMomentMap {
  // ...
  uk = 'uk',  // Added Ukrainian language code mapping
  // ...
}

src/app/features/config/form-cfgs/language-selection-form.const.ts

{ label: T.GCF.LANG.UK, value: LanguageCode.uk },  // Added Ukrainian language option

src/app/t.const.ts

UK: 'GCF.LANG.UK',  // Added Ukrainian language constant

src/assets/i18n/en.json

"UK": "Українська",  // Added Ukrainian language name in English

src/assets/i18n/uk.json

A new file was added containing the complete Ukrainian translation for the application. This file includes translations for all UI elements, messages, and settings.

Reason for Changes

These changes were made to add support for the Ukrainian language in the application. This will allow Ukrainian-speaking users to use the application in their native language, improving accessibility and user experience for this demographic.

Impact of Changes

  1. Ukrainian-speaking users will now be able to select Ukrainian as their preferred language in the application.
  2. All UI elements, messages, and settings will be displayed in Ukrainian when the language is selected.
  3. The application's language selection options will now include Ukrainian.
  4. The change is backwards compatible and does not affect existing language selections or functionality.

Test Plan

  1. Verify that Ukrainian appears as an option in the language selection settings.
  2. Select Ukrainian as the application language and confirm that all UI elements, messages, and settings are correctly translated.
  3. Ensure that switching between Ukrainian and other languages works as expected.
  4. Test the application's functionality with Ukrainian selected to ensure no issues arise from the new translations.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello there buiiz! 👋

Thank you and congrats 🎉 for opening your first PR on this project! ✨ 💖

We will try to review it soon!

@johannesjo
Copy link
Owner

Thank you very much! This is a very welcome addition!

@johannesjo johannesjo merged commit 96dd72c into johannesjo:master Oct 9, 2024
6 checks passed
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