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

20955 add belarusian and russian languages to profile #990

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

alesiahil
Copy link
Contributor

@alesiahil alesiahil commented Feb 22, 2025

Summary by CodeRabbit

  • New Features

    • Introduced support for Belarusian and Russian, expanding the app’s language options.
    • Enhanced language selection in user settings to include the new translations.
    • Integrated additional localization resources for improved translation support.
    • Expanded localization strings to enhance user interface and consistency, including new error messages and prompts.
  • Bug Fixes

    • Removed outdated "about" section from localization files for clarity.

@alesiahil alesiahil self-assigned this Feb 22, 2025
Copy link
Contributor

coderabbitai bot commented Feb 22, 2025

Walkthrough

The changes add support for Belarusian and Russian languages across the localization system. In the translation service, new language resources are imported and mapped under the corresponding language codes. The English translations now list options for these languages. Additionally, gettext files for Belarusian and Russian have been created to support future content. The user profile settings have been updated to include these languages in the selectable list and translation logic, ensuring a consistent integration across the system.

Changes

File(s) Change Summary
src/core/localization/TranslationService.ts Imported be_common and ru_common, adding entries for 'be' and 'ru' in the languageResources object.
src/core/localization/translations/en/common.json Added language options "be": "Belarusian" and "ru": "Russian" under the "languageOption" key; removed the entire "about" section.
src/core/localization/gettext/be/common.po Created new PO file for Belarusian translations, containing various localization strings.
src/core/localization/gettext/ru/common.po Created new PO file for Russian translations, containing various localization strings.
src/features/user_profile/components/SettingsForm/constants.ts Updated LANGUAGES constant and modified getLocaleTranslations function to include new cases for the 'be' and 'ru' languages.
src/core/localization/gettext/template/common.pot Added new localization strings and modified existing ones for clarity and consistency.
src/core/localization/gettext/ar/common.po Added new entries and updated existing translations for Arabic, including fuzzy translations and context changes.
src/core/localization/gettext/de/common.po Updated German translations with new entries and modifications for clarity and consistency.
src/core/localization/gettext/es/common.po Updated Spanish translations with new entries and modifications for clarity and consistency.
src/core/localization/gettext/id/common.po Updated Indonesian translations with new entries and modifications for clarity and context.
src/core/localization/gettext/ko/common.po Updated Korean translations with new entries and modifications for clarity and context.
src/core/localization/gettext/uk/common.po Updated Ukrainian translations with new entries and modifications for clarity and context.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant SF as SettingsForm
    participant TS as TranslationService

    U->>SF: Select language ("be" or "ru")
    SF->>TS: getLocaleTranslations(selectedLanguage)
    TS-->>SF: Return localized strings (from new JSON resources)
    SF-->>U: Display updated localized interface
Loading

Poem

I'm hopping through the lines of code,
Adding languages down the road.
Belarusian and Russian join the crew,
With empty files and options anew.
CodeRabbit smiles as translations grow,
Fresh and vibrant—off we go!
🐇🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2bcaaa and f9558d9.

📒 Files selected for processing (3)
  • src/core/localization/TranslationService.ts (2 hunks)
  • src/core/localization/translations/be/common.json (1 hunks)
  • src/core/localization/translations/en/common.json (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: PR Preview
src/core/localization/TranslationService.ts

[error] 1-1: Build failed: Could not resolve './translations/ru/common.json' from 'src/core/localization/TranslationService.ts'.

🪛 GitHub Actions: Size Report
src/core/localization/TranslationService.ts

[error] 1-1: Build failed: Could not resolve './translations/ru/common.json' from 'src/core/localization/TranslationService.ts'.

🔇 Additional comments (2)
src/core/localization/translations/be/common.json (1)

1-447: Well-structured and comprehensive Belarusian translations.

The Belarusian translation file is well-organized and provides a complete set of translations for all UI elements, matching the structure of the English translations.

src/core/localization/translations/en/common.json (1)

464-465: LGTM! Language options added correctly.

The Belarusian and Russian language options are properly added to the English translations, maintaining alphabetical order.

Copy link

github-actions bot commented Feb 22, 2025

Bundle size diff

Old size New size Diff
5.19 MB 5.22 MB 29.38 KB (0.55%)

Copy link

Preview environments for this PR:

These previews are automatically updated with each commit.

Note: After a new deployment, it may take a few minutes for the changes to propagate and for caches to update. During this time, you might experience temporary loading issues or see an older version of the app. If the app fails to load, please wait a few minutes and try again.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 741d11b and a1bbc72.

📒 Files selected for processing (4)
  • src/core/localization/gettext/be/common.po (1 hunks)
  • src/core/localization/gettext/ru/common.po (1 hunks)
  • src/core/localization/gettext/template/common.pot (21 hunks)
  • src/core/localization/translations/en/common.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: deploy
🔇 Additional comments (4)
src/core/localization/translations/en/common.json (1)

449-450: New language options added correctly!

The Belarusian and Russian language options have been properly added to the languageOption object, following the existing pattern and using the standard ISO language codes ('be' for Belarusian and 'ru' for Russian).

src/core/localization/gettext/ru/common.po (1)

1-1535: Russian translation file looks complete and well-structured.

The new Russian translation file contains all necessary translations with proper formatting and seems to provide good coverage of the application's text. The translations maintain appropriate technical terminology and formatting.

src/core/localization/gettext/be/common.po (1)

1-1556: Belarusian translation file looks good overall.

The new Belarusian translation file provides comprehensive translations with proper formatting and good coverage of the application's text.

src/core/localization/gettext/template/common.pot (1)

1450-1457: Successful implementation of Belarusian and Russian language options.

The addition of the Belarusian and Russian language options follows the proper format and convention used for other languages in the template. This change aligns perfectly with the PR objective of adding these languages to the profile.

@alesiahil alesiahil marked this pull request as ready for review February 26, 2025 21:30
Copy link

github-actions bot commented Feb 27, 2025

Language To Recheck Fuzzy Untranslated Total
ar 3 196 821 1020
be 0 0 337 337
de 2 196 821 1019
es 3 196 821 1020
id 2 196 821 1019
ko 3 196 821 1020
ru 0 0 337 337
uk 0 0 805 805

@alesiahil alesiahil requested a review from a team February 27, 2025 12:48
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 14

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42b91c7 and b181145.

📒 Files selected for processing (8)
  • src/core/localization/gettext/ar/common.po (21 hunks)
  • src/core/localization/gettext/be/common.po (1 hunks)
  • src/core/localization/gettext/de/common.po (21 hunks)
  • src/core/localization/gettext/es/common.po (21 hunks)
  • src/core/localization/gettext/id/common.po (21 hunks)
  • src/core/localization/gettext/ko/common.po (21 hunks)
  • src/core/localization/gettext/ru/common.po (1 hunks)
  • src/core/localization/gettext/uk/common.po (21 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: deploy
  • GitHub Check: test
🔇 Additional comments (21)
src/core/localization/gettext/ru/common.po (1)

1-1650: Well-structured and comprehensive Russian localization file.

The Russian translation file is well-organized and follows standard gettext format. All strings have been properly translated with appropriate cultural and linguistic adaptations.

src/core/localization/gettext/be/common.po (7)

79-107: Consider terminology consistency.

There appears to be inconsistency in the translation of "layer" across the file. Here it's translated as "слаі", but a previous reviewer suggested "пласт" as a more appropriate term.

Note the suggestion from a previous review:

-msgstr "Стварыць слой"
+msgstr "Стварыць пласт"

This would help maintain consistency throughout the codebase.


235-235: Consider more idiomatic translation.

A previous reviewer suggested an alternative translation for "Overlays".

-msgstr "Оверлэі"
+msgstr "Накладныя пласты"

243-243: Maintain terminology consistency.

If you decide to use "пласты" instead of "слаі" for "layers", this line should be updated too.

-msgstr "Слаі ў вылучанай зоне"
+msgstr "Пласты ў вылучанай зоне"

399-403: Preposition usage in Belarusian.

The current translations use "з" (from), while a previous reviewer suggested "на" (to). Consider which preposition best conveys the intended meaning of reversing directions.

-msgstr "Перавярнуць з Добра → Дрэнна"
+msgstr "Перавярнуць на Добра → Дрэнна"

-msgstr "Перавярнуць з Дрэнна → Добра"
+msgstr "Перавярнуць на Дрэнна → Добра"

1251-1332: Welcome page translations are missing.

The welcome page content (about##title, about##intro, etc.) has empty translations. These should be translated to provide a complete localization experience.

Note that these strings appear to be the content of the welcome/about page and would benefit from translation.


1-7: Well-formatted gettext header.

The gettext header is correctly formatted with appropriate metadata for the Belarusian language, including proper plural forms definition.


1490-1500: Language options look good.

Appropriate translations for language options, including newly added Belarusian and Russian options.

src/core/localization/gettext/ko/common.po (4)

1537-1544: New language options added to profile settings.

The additions of Belarusian and Russian language options fulfill the primary objective of this PR.


28-30: Verify the "Log out" translation.

The string ID has changed from "Logout" to "Log out", but the translation "로그인" appears to mean "Login" rather than "Log out". This is marked as fuzzy, but should be reviewed for accuracy.


85-96: Several toolbar-related translations are missing.

New toolbar-related strings have been added, but some of them are missing translations. Please consider providing translations for "Measure distance" and "Toolbar" to maintain a consistent user experience in Korean.


97-99: Missing translation for "Download".

The "Download" string is missing a translation. Please consider adding one.

src/core/localization/gettext/ar/common.po (4)

1538-1544: New language options added to profile settings.

The additions of Belarusian and Russian language options fulfill the primary objective of this PR.


28-30: Verify the "Log out" translation.

The string ID has changed from "Logout" to "Log out", but the translation "تسجيل الدخول" appears to mean "Login" rather than "Log out". This is marked as fuzzy, but should be reviewed for accuracy.


85-96: Several toolbar-related translations are missing.

New toolbar-related strings have been added, but "Measure distance" and "Toolbar" are missing translations. Please consider providing these translations to maintain a consistent user experience in Arabic.


97-99: Missing translation for "Download".

The "Download" string is missing a translation. Please consider adding one.

src/core/localization/gettext/es/common.po (1)

1550-1556: Belarusian and Russian language options added correctly

The new language options have been properly added to the Spanish localization file. Empty translation strings are acceptable for initial implementation, as they will default to displaying "Belarusian" and "Russian" in the UI when Spanish is selected.

src/core/localization/gettext/id/common.po (1)

1545-1552: Belarusian and Russian language options added correctly

The new language options have been properly added to the Indonesian localization file. Empty translation strings are acceptable for initial implementation, as they will default to displaying "Belarusian" and "Russian" in the UI when Indonesian is selected.

src/core/localization/gettext/de/common.po (1)

1553-1560: Belarusian and Russian language options added correctly

The new language options have been properly added to the German localization file. Empty translation strings are acceptable for initial implementation, as they will default to displaying "Belarusian" and "Russian" in the UI when German is selected.

src/core/localization/gettext/uk/common.po (2)

1535-1542: Good addition of Belarusian and Russian language options.

Adding support for Belarusian and Russian languages will make the application more accessible to users who speak these languages.


1535-1542: Well-structured language option additions.

The Belarusian and Russian language options have been added correctly and the old redundant entries have been properly commented out at the end of the file. This shows good maintenance of the localization file.

Also applies to: 1689-1715

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b181145 and b1d9ac1.

📒 Files selected for processing (2)
  • src/core/localization/gettext/be/common.po (1 hunks)
  • src/core/localization/gettext/ru/common.po (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (12)
src/core/localization/gettext/ru/common.po (8)

1-8: Header structure follows gettext standards

The file header contains all the required metadata for a proper gettext translation file, including project version, MIME specifications, and plural forms definition.


9-24: Basic units and prepositions correctly translated

The basic units (km, m) and prepositions (to, or) are appropriately translated according to Russian language conventions.


25-44: Action buttons correctly translated

Common action buttons (Log out, Save, Cancel, OK, Create) are translated using the appropriate Russian infinitive form, which is the conventional way to present button texts in Russian interfaces.


1253-1333: Empty translations in the About section

The welcome messages and about section texts are left untranslated (empty msgstr). Consider providing Russian translations for these sections to ensure a complete localization experience.

Is this intentional? If these sections should remain in English only, that's fine, but if they need translation, they should be completed before release.


1491-1498: Newly added language options properly translated

The Belarusian and Russian language options are correctly added and translated, maintaining consistency with the other language entries.


193-200: Multi-line text properly formatted

Complex multi-line text is correctly formatted in the Russian translation, maintaining the semantic meaning while adapting to Russian grammar rules.


505-515: Technical terminology properly localized

The technical explanations for sentiment analysis maintain their meaning in Russian while being appropriately adapted to Russian syntax and terminology conventions.


1-1647: Overall quality assessment

The Russian translation file is comprehensive and professionally done, covering all UI elements with appropriate translations that respect Russian language conventions. Technical terms are handled consistently, either translated when appropriate or transliterated when they represent product names or widely accepted technical terminology.

src/core/localization/gettext/be/common.po (4)

79-79: Consider terminology consistency for "Layers" translation.

Based on previous reviewer comments, there was a discussion about using "пласт" instead of "слой" for consistency. Currently you've used "Слаі", but you might want to consider the standardized term for this concept throughout the application.


234-235: Review terminology for "Overlays" translation.

There was a previous discussion in review comments about changing "Оверлэі" to "Накладныя пласты" for better localization. Consider whether this suggestion should be applied based on the standard terminology to be used in the application.


1490-1496: ✅ Belarusian and Russian language options added correctly.

The language options for Belarusian and Russian have been properly added, which fulfills the main objective of the PR to add support for these languages.


1-8: ✅ File header is properly configured.

The PO file header is correctly set up with appropriate metadata including charset, MIME type, and plural forms definition.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (2)
src/core/localization/gettext/uk/common.po (2)

25-27: 🛠️ Refactor suggestion

Fix missing Ukrainian translation for "Log out".

The translation for "Log out" is missing. Based on your other translations and previous comments, this should be "Вийти".

#: logout
msgid "Log out"
-msgstr ""
+msgstr "Вийти"

21-23: 🧹 Nitpick (assertive)

Missing Ukrainian translation for a common UI element.

The word "or" is left untranslated in the Ukrainian localization file, which will create inconsistency in the UI when users select Ukrainian as their language.

#: or
msgid "or"
-msgstr ""
+msgstr "або"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1d9ac1 and e7a63ef.

📒 Files selected for processing (3)
  • src/core/localization/gettext/be/common.po (1 hunks)
  • src/core/localization/gettext/ru/common.po (1 hunks)
  • src/core/localization/gettext/uk/common.po (21 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: deploy
  • GitHub Check: test
🔇 Additional comments (12)
src/core/localization/gettext/ru/common.po (2)

1-1647: The Russian translations look well-structured and complete.

The file contains comprehensive translations for the application interface, including UI elements, error messages, analytics terminology, and user settings. The translations are contextually appropriate and maintain consistency in terminology throughout.


1252-1331: Consider removing unused "About" section.

This section contains empty translations and was previously identified as no longer being used. For consistency, this section should be removed from all language files.

src/core/localization/gettext/be/common.po (3)

1-1648: The Belarusian translations are well-implemented.

The translations are comprehensive and maintain consistent terminology throughout the file. The file properly covers all UI elements, system messages, and application features.


1250-1331: Remove unused "About" section.

As with the Russian translation file, this section contains empty translations and has been identified as no longer in use. It should be removed for consistency across all language files.


78-79: Note the discussion about terminology choice.

There was a previous discussion in the PR about using "пласт" instead of "слой" for "Layers". This translation uses "Слаі" - make sure this is the preferred term as discussed.

src/core/localization/gettext/uk/common.po (7)

53-55: Missing Ukrainian translation for disaster loading state.

The translation for "Loading disasters" has been removed or left untranslated. In a previous review comment, there was a discussion about the Ukrainian translation being incorrect. It should be "Завантаження катастроф".

#: loading_events
msgid "Loading disasters"
-msgstr ""
+msgstr "Завантаження катастроф"

762-764: Important error message missing translation.

This error message is critical for users to understand when data cannot be loaded. It should be translated to provide a good user experience.

#: analytics_panel##error_loading
msgid "Failed receiving data about selected area. It may be too large."
-msgstr ""
+msgstr "Не вдалося отримати дані про вибрану область. Можливо, вона занадто велика."

654-656: Translation needed for filter message.

The string "No disasters matching your filters" is missing a Ukrainian translation, which was previously identified in a past review but was apparently removed completely rather than updated with the suggested translation.

#: event_list##no_feed_disasters_matching_your_filters
msgid "No disasters matching your filters"
-msgstr ""
+msgstr "Немає катастроф, що відповідають вашим фільтрам"

794-796: Missing translation for "No analytics" message.

The message "No analytics for the selected area" is missing a Ukrainian translation. This is a user-facing message that should be translated.

#: advanced_analytics_empty##no_analytics
msgid "No analytics for the selected area"
-msgstr ""
+msgstr "Немає аналітики для обраної території"

798-825: Missing translations for AI insights section.

The entire AI insights section is missing Ukrainian translations. This was previously identified in a review comment, but hasn't been addressed.

A user has previously acknowledged these missing translations and indicated they will be addressed in the future. Consider prioritizing this section as it represents a key feature for Ukrainian-speaking users.


1095-1140: Important subscription-related content missing translations.

The entire subscription-related content section is missing Ukrainian translations. This includes Plans & Pricing, payment information, and success messages, which are critical for users trying to subscribe to the service.

The author has previously acknowledged these missing translations and indicated they will be addressed in a future update.


1347-1390: Missing translations for profile personalization features.

The profile personalization section lacks Ukrainian translations. This includes important prompts about current job, area of expertise, and challenges.

This issue was identified in a previous review comment. Consider translating these strings to provide a complete localization experience for Ukrainian users.


#: modes##user_guide
msgid "User guide"
msgstr "Кіраўніцтва карыстальніка"
Copy link

Choose a reason for hiding this comment

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

Дапаможнік?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9fc9c5 and dd8a553.

📒 Files selected for processing (2)
  • src/core/localization/gettext/be/common.po (1 hunks)
  • src/core/localization/gettext/ru/common.po (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: deploy
  • GitHub Check: test
🔇 Additional comments (2)
src/core/localization/gettext/ru/common.po (2)

1-1647: Overall translation quality is excellent

The Russian translations are professionally done, maintain consistent terminology, and correctly preserve variables/placeholders like {{parameter}}. The file covers a comprehensive set of UI elements, error messages, and function-specific translations.


471-472: Translation might be too specific

The translation for "No" as "Без нормализации" (Without normalization) is context-specific rather than a literal translation. While this might be correct for this specific context, confirm that this section only appears in the normalization UI to avoid confusion in other contexts where a simple "Нет" would be more appropriate.

Comment on lines +1 to +8
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"

Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Verify Russian plural rules

The plural forms rule is set to "nplurals=2; plural=(n != 1)" which is the rule for English, not Russian. Russian typically uses "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)".


🏁 Script executed:

#!/bin/bash
# Check if there are any strings in the file that use plurals
grep -n "%d\|%s" src/core/localization/gettext/ru/common.po
# Check the plural forms for other Russian PO files in the project
find src -name "*.po" -path "*/ru/*" -not -path "*/ru/common.po" -exec grep -l "Plural-Forms" {} \; | xargs grep "Plural-Forms"

Length of output: 190


Update Russian plural forms in ru/common.po

The header in src/core/localization/gettext/ru/common.po still uses the English plural rule (nplurals=2; plural=(n != 1)) instead of the appropriate Russian plural rule. Russian localization requires a header like:

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"

Please update the header accordingly to ensure correct pluralization for Russian translations.

  • Location: src/core/localization/gettext/ru/common.po (Lines 1–8)
  • Suggested change: Replace the current plural rule with the Russian rule as shown above.

Comment on lines +1 to +8
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Critical Issue: Incorrect Plural Forms in Header

The header currently specifies:

"Plural-Forms: nplurals=2; plural=(n != 1)\n"

Belarusian is a Slavonic language that typically requires three plural forms. Please update the plural‐forms header (for example, to something similar to:

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100 != 11 ? 0 : (n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2))\n"
```) to correctly reflect the grammatical rules of Belarusian.

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +315 to +317
msgstr "Фільтр па лічніку"

#: advanced_analytics_data_list##filter_denominator
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical Issue: Incorrect Translation for "Filter Denominator"

The message for "Filter Denominator" is currently rendered as:

msgid "Filter Denominator"
msgstr "Фільтр па назоўніку"

In a mathematical context, the Belarusian term for "denominator" should be "знаменнік" rather than "назоўніку" (which means "noun").
Please change the translation accordingly. For example, you can apply this diff:

- msgstr "Фільтр па назоўніку"
+ msgstr "Фільтр па знаменніку"

Committable suggestion skipped: line range outside the PR's diff.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (3)
src/core/localization/gettext/uk/common.po (3)

763-764: ⚠️ Potential issue

Missing translation for data loading error message.

This is a critical error message that users would encounter when data loading fails. Having it untranslated affects the user experience for Ukrainian users.

Suggested translation:

#: analytics_panel##error_loading
msgid "Failed receiving data about selected area. It may be too large."
-msgstr ""
+msgstr "Не вдалося отримати дані про вибрану область. Можливо, вона занадто велика."

654-656: 🧹 Nitpick (assertive)

Untranslated filter message.

The message "No disasters matching your filters" lacks a Ukrainian translation. This is an important user-facing message for the filtering functionality.

Suggested translation:

#: event_list##no_feed_disasters_matching_your_filters
msgid "No disasters matching your filters"
-msgstr ""
+msgstr "Немає катастроф, що відповідають вашим фільтрам"

794-796: 🧹 Nitpick (assertive)

Untranslated analytics message.

"No analytics for the selected area" is an important user-facing message that informs users about missing analytics data.

Suggested translation:

#: advanced_analytics_empty##no_analytics
msgid "No analytics for the selected area"
-msgstr ""
+msgstr "Немає аналітики для обраної території"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd8a553 and 06f8954.

📒 Files selected for processing (1)
  • src/core/localization/gettext/uk/common.po (21 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: deploy
  • GitHub Check: test
🔇 Additional comments (5)
src/core/localization/gettext/uk/common.po (5)

21-23: Multiple untranslated UI elements will affect the Ukrainian user experience.

There are numerous untranslated basic UI elements throughout the file, including "or" here and many others (OK, Measure distance, Toolbar, Download, etc.). While I understand from previous comments that these will be addressed in future updates, they still represent a gap in the Ukrainian localization.


321-323: MCDA section lacks Ukrainian translations.

The entire MCDA (Multi-criteria decision analysis) section is missing translations. This would make the feature difficult to use for Ukrainian speakers.


798-825: AI insights section lacks Ukrainian translations.

The entire AI insights section (lines 798-825) is missing Ukrainian translations. This feature would be inaccessible to Ukrainian-speaking users.


1353-1356: Missing translations for profile personalization features.

The profile personalization section lacks Ukrainian translations. This includes important prompts about current job, area of expertise, and challenges.


1481-1488: Belarusian and Russian language translations properly added.

The translations for Belarusian ("Білоруська") and Russian ("Російська") languages have been correctly added to the Ukrainian localization file. This properly implements the PR's objective of adding these languages to the profile.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (5)
src/core/localization/gettext/be/common.po (2)

315-319: ⚠️ Potential issue

Fix incorrect translation for "Filter Denominator".

The term "denominator" is translated as "назоўніку" (noun) rather than the mathematical term "знаменнік".

Apply this correction:

-msgstr "Фільтр па назоўніку"
+msgstr "Фільтр па знаменніку"

1-8: ⚠️ Potential issue

Incorrect Plural Forms definition for Belarusian.

The plural forms definition in the header does not match Belarusian language rules. Belarusian, like other Slavic languages, requires three plural forms rather than two.

Please update the header with the correct plural forms rule:

-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
src/core/localization/gettext/uk/common.po (3)

54-55: ⚠️ Potential issue

Empty translation for "Loading disasters".

This user-facing message was previously identified in a review as having an incorrect translation ("Ніяких катастроф") but now it's empty, which will create an inconsistent experience.

#: loading_events
msgid "Loading disasters"
-msgstr ""
+msgstr "Завантаження катастроф"

794-797: 🧹 Nitpick (assertive)

Missing translation for "No analytics" message.

The message "No analytics for the selected area" is missing a Ukrainian translation, which could cause confusion for Ukrainian users.

#: advanced_analytics_empty##no_analytics
msgid "No analytics for the selected area"
-msgstr ""
+msgstr "Немає аналітики для обраної території"

26-27: ⚠️ Potential issue

Empty translation for "Log out".

This is a critical UI element that previously had a translation. The current change has removed the translation, which will affect the user experience.

#: logout
msgid "Log out"
-msgstr ""
+msgstr "Вийти"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 06f8954 and 11d1c02.

📒 Files selected for processing (2)
  • src/core/localization/gettext/be/common.po (1 hunks)
  • src/core/localization/gettext/uk/common.po (21 hunks)
🔇 Additional comments (15)
src/core/localization/gettext/be/common.po (9)

39-39: LGTM! Cyrillic "ОК" is now used.

The translation now correctly uses Cyrillic "К" in "ОК" rather than the Latin "K", as suggested in previous review comments.


235-235: Consider using consistent terminology for "Overlays".

According to previous comments, there was a discussion about the translation of "Overlays" between team members, with a suggestion to use "Накладныя пласты" instead of "Оверлэй".

Confirm your team's preferred terminology for this term.


471-471: Appropriate translation change for "No" in normalization context.

Good choice replacing "Няма" with "Без нармалізацыі" for better context, as stated in your previous responses to reviewers.


607-607: LGTM for AI terminology.

The translation "Шукаць або спытацца ў AI" for "Search or ask AI" looks good and follows the recommendations from previous review comments.


829-829: Verify AI terminology consistency.

From previous comments, there was a question about whether "AI insights" should be translated as "Аналітыка AI" in Belarusian and "Аналитика ИИ" in Russian rather than "ИИ инстайты".

Confirm this terminology is consistent with what's being used in the Russian translation.


836-837: LGTM for Belarusian "AI Insights" phrase.

The translation correctly uses "Аналітыкі AI" as suggested in previous review comments.


860-860: Term "Polygon" translated appropriately.

"Polygon" is correctly translated as "Шматкутнік" as per previous reviewer suggestions.


1493-1496: Verify terminology for "Russian" language name.

The language name "Russian" is translated as "Руская", which was questioned in previous reviews. You confirmed it's acceptable for the language switcher, but double check that this matches conventions used in other Belarusian interfaces.


77-79:

❓ Verification inconclusive

Verify terminology consistency with team preferences.

According to previous review comments, there was a discussion about using "пласт" instead of "слой" for "layer". Confirm the preferred terminology with your team.


🌐 Web query:

What is the difference between "слой" and "пласт" in Belarusian?

💡 Result:

В белорусском языке слова слой и пласт часто используются как синонимы для обозначения слоя или пласта, но их употребление зависит от контекста и стилистических нюансов[1][3][6][9].

Основные различия:

  1. Семантические оттенки:

    • Слой — более общий термин, применяемый к любому типу слоёв (например, верхнія слаі глебы — верхние слои почвы)[3][9].
    • Пласт — чаще используется для обозначения структурно выделенного или значительного по толщине слоя (например, геологические пласты или культурные слои: гістарычны пласт — исторический пласт)[1][10].
  2. Контекстуальные предпочтения:

    • В метафорических выражениях (шырокія слаі насельніцтва — широкие слои населения) обычно выбирают слой[3].
    • В научных и технических текстах (геология, археология) чаще встречается пласт, подчеркивая чёткую структуру или стратификацию[1][10].
  3. Стилистика:

    • Пласт может звучать более книжно или специализированно[9].
    • Слой нейтрален и универсален в разговорной и письменной речи[3][6].

Примеры использования:

  • Верхнія слаі (пласты) глебы — верхние слои почвы[3].
  • Культурны пласт мовы — культурный пласт языка[1].
  • Шырокія слаі насельніцтва — широкие слои населения (идиоматическое выражение)[3].

Таким образом, выбор между словами зависит от конкретного контекста и степени формальности текста.

Citations:


Action Required: Confirm Translation Term Usage

The current translation for “Layers” in src/core/localization/gettext/be/common.po (lines 77–79) uses “Слаі” (derived from “слой”). Previous discussions suggested using “пласт” instead, which—according to our web query—is typically preferred in more technical or formally structured contexts.

Please verify with your team whether the preferred terminology for this context should be “Пласты” rather than “Слаі” to ensure consistency with your agreed-upon style.

  • File/Location: src/core/localization/gettext/be/common.po (lines 77–79)
  • Current Translation: “Слаі”
  • Consideration: “слой” is more general, while “пласт” often implies a specialized or formal use.
src/core/localization/gettext/uk/common.po (6)

254-255: Proper translation added for "OpenStreetMap inspector".

Good job on adding the Ukrainian translation for "OpenStreetMap inspector" as "Інспектор OpenStreetMap". This improves the user experience for Ukrainian users.


654-657: Missing translation for filter message.

The message "No disasters matching your filters" lacks a Ukrainian translation, which was highlighted in a previous review.

#: event_list##no_feed_disasters_matching_your_filters
msgid "No disasters matching your filters"
-msgstr ""
+msgstr "Немає катастроф, що відповідають вашим фільтрам"

763-764: Important error message without translation.

The error message for failed data loading doesn't have a Ukrainian translation, which was identified in a previous review comment.

#: analytics_panel##error_loading
msgid "Failed receiving data about selected area. It may be too large."
-msgstr ""
+msgstr "Не вдалося отримати дані про вибрану область. Можливо, вона занадто велика."

798-825: AI insights section missing translations.

The entire AI insights section lacks Ukrainian translations, which was highlighted in a previous review. This is a key feature that would be inaccessible to Ukrainian-speaking users.

Consider adding Ukrainian translations for at least the main headings in this section, such as:

#: llm_analytics##header
msgid "AI insights"
-msgstr ""
+msgstr "Аналітика ШІ"

1481-1488: Good job adding translations for the new language options.

Excellent work adding Ukrainian translations for "Belarusian" (Білоруська) and "Russian" (Російська). This aligns with the PR objective of adding these languages to the profile and ensures a consistent experience for Ukrainian users.


1493-1533: Reference area functionality requires translations.

The reference area functionality appears to be an important feature that allows users to save areas they're familiar with for comparison purposes. Leaving this untranslated makes the feature less accessible to Ukrainian users.

Consider adding Ukrainian translations for at least the most user-facing parts of this feature, such as:

#: profile##reference_area##freehand_geometry
msgid "Freehand geometry"
-msgstr ""
+msgstr "Довільна геометрія"

#: profile##reference_area##set_the_reference_area
msgid "Set area on map"
-msgstr ""
+msgstr "Встановити область на карті"

Comment on lines +1250 to +1331
#: about##title
msgid "Welcome to Disaster Ninja!"
msgstr ""

#: about##intro
msgid ""
"Do you want to be notified about ongoing disasters? Are you interested in "
"instant population data and other analytics for any region in the world? "
"Disaster Ninja showcases some of <2>Kontur</2>’s capabilities in addressing "
"these needs.<br/><br/>We initially designed it as a decision support tool "
"for humanitarian mappers. Now it has grown in functionality and use cases. "
"Whether you work in disaster management, build a smart city, or perform "
"research on climate change, Disaster Ninja can help you to:"
msgstr ""

#: about##l1
msgid "1. Stay up to date with the latest hazard events globally."
msgstr ""

#: about##p1
msgid ""
"The Disasters panel continually refreshes to inform you about ongoing "
"events. It consumes data from the <2>Kontur Event Feed</2>, which you can "
"also access via an API."
msgstr ""

#: about##l2
msgid "2. Focus on your area of interest."
msgstr ""

#: about##p2
msgid ""
"The Drawing Tools panel allows you to draw or upload your own geometry on "
"the map. You can also focus on a disaster-exposed area or an administrative "
"unit — a country, city, or region."
msgstr ""

#: about##l3
msgid "3. Get analytics for the focused area."
msgstr ""

#: about##p3
msgid ""
"The Analytics panel shows the number of people living in that area per "
"<2>Kontur Population</2> and estimated mapping gaps in OpenStreetMap. "
"Kontur’s customers have access to hundreds of other indicators through "
"Advanced Analytics."
msgstr ""

#: about##l4
msgid "4. Explore data on the map and make conclusions."
msgstr ""

#: about##p4
msgid ""
"The Layers panel gives you various options to display two indicators "
"simultaneously on a bivariate map, e.g., population density and distance to "
"the nearest fire station. Use the color legend to assess which areas require "
"attention. <br/>Hint: in general, green indicates low risk / few gaps, red — "
"high risk / many gaps."
msgstr ""

#: about##p5
msgid ""
"In addition, you can switch to Reports in the left panel to access data on "
"potential errors and inconsistencies in OpenStreetMap and help fix them by "
"mapping the respective area with the JOSM editor."
msgstr ""

#: about##goToMap
msgid "Go to the map now"
msgstr ""

#: about##p6
msgid ""
"We hope you find this tool valuable. Use the chatbox on Disaster Ninja for "
"any questions about the functionality, and we will be happy to guide you. "
"You can also contact us by email at <1>[email protected]</1> if you have "
"feedback or suggestions on improving the tool.<br/><br/>Disaster Ninja is an "
"open-source project. Find the code in <8>Kontur’s GitHub account</8>."
msgstr ""

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Remove unused "About" section.

This section contains empty translations and according to previous review comments, this "About" section is no longer used and should be removed from all language files for consistency.

Please remove the entire unused "About" section (lines 1250-1331) from this file and other language files.

Comment on lines +81 to +84
#: toolbar##map_ruler
msgid "Measure distance"
msgstr ""

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Multiple toolbar UI elements missing translations.

Several important toolbar elements lack Ukrainian translations, including "Measure distance", "Toolbar", "Download", "Select admin boundary", "Upload GeoJSON", "Draw or edit geometry", "Record sensors", "Tools", "Selected area", and "Upload MCDA". These are visible UI elements that should be translated for a consistent experience.

Consider adding Ukrainian translations for these UI elements, starting with the most frequently used ones:

#: toolbar##map_ruler
msgid "Measure distance"
-msgstr ""
+msgstr "Виміряти відстань"

#: toolbar##panel_title
msgid "Toolbar"
-msgstr ""
+msgstr "Панель інструментів"

#: toolbar##download layer_actions##tooltips##download
msgid "Download"
-msgstr ""
+msgstr "Завантажити"

#: toolbar##boundary_selector
msgid "Select admin boundary"
-msgstr ""
+msgstr "Вибрати адміністративний кордон"

Also applies to: 89-96, 101-104, 109-116, 121-136

Comment on lines +229 to +232
#: errors##error_try_again
msgid "Something went wrong. Please try again"
msgstr ""

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Missing translation for error message.

The error message "Something went wrong. Please try again" lacks a Ukrainian translation, which is important for error handling and user communication.

#: errors##error_try_again
msgid "Something went wrong. Please try again"
-msgstr ""
+msgstr "Щось пішло не так. Будь ласка, спробуйте знову"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#: errors##error_try_again
msgid "Something went wrong. Please try again"
msgstr ""
#: errors##error_try_again
msgid "Something went wrong. Please try again"
msgstr "Щось пішло не так. Будь ласка, спробуйте знову"

Comment on lines +137 to +152
#: layer_actions##tooltips##erase
msgid "Erase"
msgstr ""

#: layer_actions##tooltips##edit
msgid "Edit"
msgstr ""

#: layer_actions##tooltips##hide mcda##layer_editor##outliers_options##hide
msgid "Hide"
msgstr ""

#: layer_actions##tooltips##show
msgid "Show"
msgstr ""

Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Layer action tooltips missing translations.

Layer action tooltips like "Erase", "Edit", "Hide", and "Show" are missing Ukrainian translations. These are important for Ukrainian users to understand available actions.

Consider adding Ukrainian translations for these layer action tooltips:

#: layer_actions##tooltips##erase
msgid "Erase"
-msgstr ""
+msgstr "Стерти"

#: layer_actions##tooltips##edit
msgid "Edit"
-msgstr ""
+msgstr "Редагувати"

#: layer_actions##tooltips##hide mcda##layer_editor##outliers_options##hide
msgid "Hide"
-msgstr ""
+msgstr "Приховати"

#: layer_actions##tooltips##show
msgid "Show"
-msgstr ""
+msgstr "Показати"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#: layer_actions##tooltips##erase
msgid "Erase"
msgstr ""
#: layer_actions##tooltips##edit
msgid "Edit"
msgstr ""
#: layer_actions##tooltips##hide mcda##layer_editor##outliers_options##hide
msgid "Hide"
msgstr ""
#: layer_actions##tooltips##show
msgid "Show"
msgstr ""
#: layer_actions##tooltips##erase
msgid "Erase"
msgstr "Стерти"
#: layer_actions##tooltips##edit
msgid "Edit"
msgstr "Редагувати"
#: layer_actions##tooltips##hide mcda##layer_editor##outliers_options##hide
msgid "Hide"
msgstr "Приховати"
#: layer_actions##tooltips##show
msgid "Show"
msgstr "Показати"

Comment on lines +21 to +23
#: or
msgid "or"
msgstr ""
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Missing translation for the "or" conjunction.

The word "or" is a common UI element that should be translated for consistency.


🏁 Script executed:

#!/bin/bash
# Check if "or" is used in other language files
grep -r "msgid \"or\"" --include="*.po" src/core/localization/gettext/

Length of output: 502


Action Required: Add missing Ukrainian translation for "or"

  • File: src/core/localization/gettext/uk/common.po (Lines 21-23)
  • Issue: The entry for "or" has an empty translation (msgstr ""), while similar entries in other language files likely contain appropriate translations.
  • Recommendation: Update the "msgstr" to include the proper Ukrainian translation (e.g., "або") to ensure consistency across UI elements.

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.

3 participants