Repository navigation
Conversation
Route GUI counts through the shared library formatter and add plural-rule metadata to existing catalogs without changing translation text.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Croatian legacy mapping regresses audio and text summaries for counts of five or more.
1 open finding
What changed in this PR
Adds locale-aware plural formatting for GUI stream and file counts through the companion MediaInfoLib formatter.
Changes:
- Routes VCL, Qt, and shared Easy summaries through
Core::FormatCount. - Adds plural metadata and documentation for 38 catalogs.
- Adds portable count-formatting regression tests.
| File | Description |
|---|---|
Project/CMake/CLI/CMakeLists.txt |
Adds optional count tests. |
Source/Common/Core.cpp |
Implements formatter bridge and fallback. |
Source/Common/Core.h |
Declares FormatCount. |
Source/GUI/Common/GUI_Main_Easy_Box_Core.cpp |
Localizes shared Easy summaries. |
Source/GUI/Qt/easyviewwidget.cpp |
Localizes Qt Easy summaries. |
Source/GUI/VCL/GUI_Main.cpp |
Localizes VCL counts and refreshes them. |
Source/Resource/Language.csv |
Adds plural metadata matrix. |
Source/Resource/Plugin/Language/README.md |
Documents count localization. |
Source/Resource/Plugin/Language/ar.csv |
Adds Arabic plural metadata. |
Source/Resource/Plugin/Language/be.csv |
Adds Belarusian plural metadata. |
Source/Resource/Plugin/Language/bg.csv |
Adds Bulgarian plural metadata. |
Source/Resource/Plugin/Language/ca.csv |
Adds Catalan plural metadata. |
Source/Resource/Plugin/Language/cs.csv |
Adds Czech plural metadata. |
Source/Resource/Plugin/Language/da.csv |
Adds Danish plural metadata. |
Source/Resource/Plugin/Language/de.csv |
Adds German plural metadata. |
Source/Resource/Plugin/Language/en.csv |
Adds English plural metadata. |
Source/Resource/Plugin/Language/es.csv |
Adds Spanish plural metadata. |
Source/Resource/Plugin/Language/eu.csv |
Adds Basque plural metadata. |
Source/Resource/Plugin/Language/fa.csv |
Adds Persian plural metadata. |
Source/Resource/Plugin/Language/fr.csv |
Adds French plural metadata. |
Source/Resource/Plugin/Language/gl.csv |
Adds Galician plural metadata. |
Source/Resource/Plugin/Language/gr.csv |
Adds Greek plural metadata. |
Source/Resource/Plugin/Language/hr.csv |
Adds Croatian plural metadata. |
Source/Resource/Plugin/Language/hu.csv |
Adds Hungarian plural metadata. |
Source/Resource/Plugin/Language/hy.csv |
Adds Armenian plural metadata. |
Source/Resource/Plugin/Language/id.csv |
Adds Indonesian plural metadata. |
Source/Resource/Plugin/Language/it.csv |
Adds Italian plural metadata. |
Source/Resource/Plugin/Language/ja.csv |
Adds Japanese plural metadata. |
Source/Resource/Plugin/Language/ka.csv |
Adds Georgian plural metadata. |
Source/Resource/Plugin/Language/ko.csv |
Adds Korean plural metadata. |
Source/Resource/Plugin/Language/lt.csv |
Adds Lithuanian plural metadata. |
Source/Resource/Plugin/Language/nl.csv |
Adds Dutch plural metadata. |
Source/Resource/Plugin/Language/pl.csv |
Adds Polish plural metadata. |
Source/Resource/Plugin/Language/pt.csv |
Adds Portuguese plural metadata. |
Source/Resource/Plugin/Language/pt-BR.csv |
Adds Brazilian Portuguese metadata. |
Source/Resource/Plugin/Language/ro.csv |
Adds Romanian plural metadata. |
Source/Resource/Plugin/Language/ru.csv |
Adds Russian plural metadata. |
Source/Resource/Plugin/Language/sk.csv |
Adds Slovak plural metadata. |
Source/Resource/Plugin/Language/sq.csv |
Adds Albanian plural metadata. |
Source/Resource/Plugin/Language/sv.csv |
Adds Swedish plural metadata. |
Source/Resource/Plugin/Language/th.csv |
Adds Thai plural metadata. |
Source/Resource/Plugin/Language/tr.csv |
Adds Turkish plural metadata. |
Source/Resource/Plugin/Language/uk.csv |
Adds Ukrainian plural metadata. |
Source/Resource/Plugin/Language/zh-CN.csv |
Adds Simplified Chinese metadata. |
Source/Resource/Plugin/Language/zh-HK.csv |
Adds Hong Kong Chinese metadata. |
Source/Resource/Plugin/Language/zh-TW.csv |
Adds Traditional Chinese metadata. |
Source/Tests/CountFormat.cpp |
Tests plural formatting and GUI summaries. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Config_Text_PluralRule.two; | ||
| Config_Text_PluralRule.few;(v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) || (v != 0 && f % 10 >= 2 && f % 10 <= 4 && (f % 100 < 12 || f % 100 > 14)) | ||
| Config_Text_PluralRule.many; | ||
| Config_Text_PluralLegacy;one=1,few=2,other=3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stream and file counts do not consistently follow the selected language's plural rules. For example, VCL Easy uses Polish
6 strumienie audioinstead of6 strumieni audio, despite the correct form already being present in the catalog.This change:
Core::FormatCount.Source/Resource/Language.csvand all 38 language catalogs, preserving every existing translation.The formatter supports existing numbered forms and optional whole-message patterns. No translated message patterns are added by this PR.
Validated with MSVC 2022 on Windows x64: 99 production shared-GUI checks passed. A local Qt 6.10.2 build also passed 21 widget checks and a MainWindow smoke test. Native VCL/C++Builder validation remains outstanding because the toolchain was unavailable.