Skip to content

Add Ukrainian language#106

Merged
prem-k-r merged 6 commits into
prem-k-r:mainfrom
lozik4:feature/add-uk-language
Dec 21, 2025
Merged

Add Ukrainian language#106
prem-k-r merged 6 commits into
prem-k-r:mainfrom
lozik4:feature/add-uk-language

Conversation

@lozik4

@lozik4 lozik4 commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

📌 Description

Add Support for the Ukrainian language

🎨 Visual Changes (Screenshots / Videos)

Screenshot 2025-12-20 at 00 14 27

✅ Checklist

  • I have read and followed the Contributing Guidelines.
  • My code follows the project's coding style and conventions.
  • I have tested my changes thoroughly to ensure expected behavior.
  • I have verified compatibility across Chrome and Firefox (additional browsers if applicable).
  • I have attached relevant visual evidence (screenshots/videos) if applicable.
  • I have updated the CHANGELOG.md under the appropriate categories with all my changes in this PR.

Summary by CodeRabbit

  • New Features

    • Ukrainian language added: full UI translations, selectable in language dropdowns, localized date/time displays and regional number formatting.
  • Documentation

    • Changelog updated to list Ukrainian under Unreleased; README updated to reflect the new language count and table entry; language analysis tool docs updated to include Ukrainian.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 19, 2025

Copy link
Copy Markdown

Walkthrough

Adds Ukrainian localization across the project: new locales/uk.js, integration in HTML and tools, date and number formatting updates for Ukrainian, and README/CHANGELOG documentation entries registering the language.

Changes

Cohort / File(s) Summary
Locale file
locales/uk.js
New exported uk locale object providing comprehensive Ukrainian translations (menus, dialogs, days/months, greetings, errors, placeholders, HTML snippets, etc.).
Language configuration & formatting
scripts/languages.js, scripts/clock.js
scripts/languages.js: adds uk to translations, menuWidths, and specialDecimalLanguages (comma decimal). scripts/clock.js: adds Ukrainian date formats for analog and digital clocks.
UI & tools integration
index.html, tools/languagesAnalysis.html
Load locales/uk.js and add Ukrainian (value="uk") to language selection(s) and the language-analysis loader.
Docs / Changelog
README.md, CHANGELOG.md
README.md: update supported languages count and insert Ukrainian row in languages table. CHANGELOG.md: add "Unreleased → Added" entry for Ukrainian.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Check completeness and placeholder consistency in locales/uk.js.
  • Verify scripts/languages.js additions (menu width, numeral settings) follow existing patterns.
  • Confirm index.html and tools/languagesAnalysis.html correctly load and expose the new locale.
  • Run lint/format checks on new/modified JS and HTML.

Poem

🐇 Я в нірці рядки шию, мову несу у кишені,
Годинник і меню шепочуть: "новий голос вже в дверях".
Переклад тихо заграв, мов струна на раннім полі,
Хоп — стрибок, рядок, морквинка — і світ став трішки більший.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'Add Ukrainian language' clearly and concisely describes the main change—adding Ukrainian language support—matching the comprehensive file modifications across locale, UI, and documentation files.
Description check ✅ Passed The PR description follows the template structure with Description, Visual Changes (screenshot included), and Checklist sections. All checklist items are marked complete, indicating thorough preparation and adherence to project guidelines.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
CHANGELOG.md (1)

24-26: Changelog entry format is inconsistent with established patterns.

Looking at the v3.2 and v3.3 sections (e.g., lines 159-168), new language additions follow the format "- Added support for [Language] ([@contributor]...)". The current format with a nested "- Added" subsection differs from this convention.

Suggested format to match existing conventions
 ### Localized

 - Translation updated for:
   - Japanese ([@kons10](https://github.com/kons10))
   - Arabic ([@heshamoomar](https://github.com/heshamoomar))

-- Added
-  - Ukrainian language ([@lozik4](https://github.com/lozik4))
-
+- Added support for Ukrainian ([@lozik4](https://github.com/lozik4))
scripts/clock.js (1)

183-183: Remove commented-out code.

Line 183 contains an alternative Ukrainian date format that's been commented out. Since line 184 contains the active implementation, this commented line should be removed to keep the code clean.

🔎 Proposed fix
-                // uk: `${dayName.substring(0, 2)}, ${dayOfMonth} ${monthName.substring(0, 4)}.`,
                 uk: `${dayName}, ${localizedDayOfMonth} ${monthName.substring(0, 4)}.`,
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a3ee0a and 0a695d8.

📒 Files selected for processing (7)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • index.html (2 hunks)
  • locales/uk.js (1 hunks)
  • scripts/clock.js (2 hunks)
  • scripts/languages.js (3 hunks)
  • tools/languagesAnalysis.html (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
scripts/languages.js (1)
locales/uk.js (1)
  • uk (2-203)
🪛 markdownlint-cli2 (0.18.1)
README.md

226-226: Images should have alternate text (alt text)

(MD045, no-alt-text)


227-227: Images should have alternate text (alt text)

(MD045, no-alt-text)


228-228: Images should have alternate text (alt text)

(MD045, no-alt-text)


229-229: Images should have alternate text (alt text)

(MD045, no-alt-text)


230-230: Images should have alternate text (alt text)

(MD045, no-alt-text)


231-231: Images should have alternate text (alt text)

(MD045, no-alt-text)


232-232: Images should have alternate text (alt text)

(MD045, no-alt-text)


233-233: Images should have alternate text (alt text)

(MD045, no-alt-text)


234-234: Images should have alternate text (alt text)

(MD045, no-alt-text)


235-235: Images should have alternate text (alt text)

(MD045, no-alt-text)


236-236: Images should have alternate text (alt text)

(MD045, no-alt-text)


237-237: Images should have alternate text (alt text)

(MD045, no-alt-text)


238-238: Images should have alternate text (alt text)

(MD045, no-alt-text)


239-239: Images should have alternate text (alt text)

(MD045, no-alt-text)


240-240: Images should have alternate text (alt text)

(MD045, no-alt-text)


241-241: Images should have alternate text (alt text)

(MD045, no-alt-text)


242-242: Images should have alternate text (alt text)

(MD045, no-alt-text)


243-243: Images should have alternate text (alt text)

(MD045, no-alt-text)


244-244: Images should have alternate text (alt text)

(MD045, no-alt-text)


245-245: Images should have alternate text (alt text)

(MD045, no-alt-text)


246-246: Images should have alternate text (alt text)

(MD045, no-alt-text)


247-247: Images should have alternate text (alt text)

(MD045, no-alt-text)


248-248: Images should have alternate text (alt text)

(MD045, no-alt-text)


249-249: Images should have alternate text (alt text)

(MD045, no-alt-text)


250-250: Images should have alternate text (alt text)

(MD045, no-alt-text)


251-251: Images should have alternate text (alt text)

(MD045, no-alt-text)


252-252: Images should have alternate text (alt text)

(MD045, no-alt-text)


253-253: Images should have alternate text (alt text)

(MD045, no-alt-text)


254-254: Images should have alternate text (alt text)

(MD045, no-alt-text)


255-255: Images should have alternate text (alt text)

(MD045, no-alt-text)


256-256: Images should have alternate text (alt text)

(MD045, no-alt-text)

🔇 Additional comments (8)
scripts/languages.js (3)

41-41: LGTM!

The Ukrainian translation entry is correctly added to the translations object, following the established pattern.


71-71: LGTM!

The menu width of 455px for Ukrainian is consistent with similar languages (Polish, Greek, Thai all use 455px).


91-91: LGTM!

Ukrainian correctly uses comma as the decimal separator, so adding uk to specialDecimalLanguages is appropriate.

locales/uk.js (1)

88-122: LGTM!

The calendar days, months, and greeting translations are properly structured and complete.

index.html (2)

77-77: LGTM!

The Ukrainian locale script is correctly added to the language scripts section.


1608-1608: LGTM!

The Ukrainian language option is correctly added to the language selector, maintaining alphabetical order and following the established format.

README.md (1)

224-256: LGTM! Ukrainian language entry properly added.

The language table has been reformatted consistently, and the Ukrainian entry follows the established pattern with correct ISO code (uk), flag, native name, and translator credit. The table count correctly reflects 30 supported languages.

Note: The static analysis tool flags missing alt text for flag images. While this is technically an accessibility concern, the flags are decorative since language names are provided as text. This could be addressed in a future accessibility improvement pass if desired.

scripts/clock.js (1)

184-184: Ukrainian date formats look good.

The Ukrainian date display formats are properly implemented:

  • Analog clock (line 184): Uses full day name with localized day of month and truncated month name, consistent with the Russian format pattern
  • Digital clock (line 315): Uses a simpler format with day number and day name

Both formats integrate correctly with the existing date display logic.

Also applies to: 315-315

Comment thread locales/uk.js Outdated
Comment thread locales/uk.js Outdated
Comment thread tools/languagesAnalysis.html

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a695d8 and 51b9b70.

📒 Files selected for processing (2)
  • locales/uk.js (1 hunks)
  • tools/languagesAnalysis.html (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tools/languagesAnalysis.html
🔇 Additional comments (2)
locales/uk.js (2)

1-1: Previous issues resolved.

The header comment now correctly identifies this as the Ukrainian locale, and the typo in "yesText" has been fixed to "Так".

Also applies to: 186-186


2-203: Translation structure looks good.

The locale file follows proper formatting with:

  • Correctly structured arrays for days and months
  • Properly nested greeting object
  • Appropriate template placeholders (e.g., {title})
  • Helpful inline comments for context

Comment thread locales/uk.js Outdated
@prem-k-r prem-k-r added the i18n/l10n Related to Internationalization or Localization label Dec 20, 2025
@prem-k-r prem-k-r force-pushed the feature/add-uk-language branch from 875d3d0 to 4019dd4 Compare December 21, 2025 16:49

@prem-k-r prem-k-r left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you! Great work 😊

@prem-k-r prem-k-r merged commit 9331ea3 into prem-k-r:main Dec 21, 2025
1 check was pending

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
README.md (1)

31-31: Ukrainian language successfully added to documentation!

The changes correctly update the language count from 30 to 31 and add the Ukrainian language entry to the supported languages table. The new entry follows the established format and includes proper attribution.

Optional accessibility improvement: The flag image on line 249 (and all flag images in the table) could benefit from alt text for better accessibility. While this follows the existing pattern throughout the table, consider adding descriptive alt text in a future enhancement:

-| <img src='https://flagcdn.com/ua.svg' width=20> &nbsp; **Ukrainian** - Українська | uk | [Serhii Lozytskyi](https://github.com/lozik4) |
+| <img src='https://flagcdn.com/ua.svg' width=20 alt='Ukrainian flag'> &nbsp; **Ukrainian** - Українська | uk | [Serhii Lozytskyi](https://github.com/lozik4) |

Note: This suggestion applies to the entire languages table, not just this entry. Since it's a minor accessibility improvement and would affect many lines, it could be addressed in a separate, dedicated PR.

Also applies to: 218-218, 249-249

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd4e8d2 and 4019dd4.

📒 Files selected for processing (4)
  • CHANGELOG.md (1 hunks)
  • README.md (3 hunks)
  • locales/uk.js (1 hunks)
  • scripts/clock.js (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • CHANGELOG.md
  • scripts/clock.js
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

249-249: Images should have alternate text (alt text)

(MD045, no-alt-text)

🔇 Additional comments (1)
locales/uk.js (1)

1-203: Excellent Ukrainian localization implementation!

The Ukrainian locale file is comprehensive and well-structured. All previous issues have been properly addressed:

  • File header correctly identifies the locale
  • Translations are complete across all UI sections
  • External links include proper security attributes (rel="noopener noreferrer")
  • Proper data structures for arrays (days, months) and nested objects (greeting)

The implementation follows the established pattern of other locale files and includes all necessary translation keys for the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n/l10n Related to Internationalization or Localization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants