Skip to content

Sync localization#27

Open
dturovskiy wants to merge 6 commits into
Leorev01:mainfrom
dturovskiy:sync_localization
Open

Sync localization#27
dturovskiy wants to merge 6 commits into
Leorev01:mainfrom
dturovskiy:sync_localization

Conversation

@dturovskiy

Copy link
Copy Markdown
Collaborator

Implemented in sync_localization.

This issue has been resolved with a slightly different approach than originally proposed.

Instead of automatically inserting missing keys into every localization file, the localization flow was improved at the language-discovery level:

  • Resources/Languages.json now acts as a catalog of known language codes and display names
  • available languages are detected by checking which files actually exist in Resources/Localizations
  • the app only shows languages that exist in both places
  • the language menu and localization audit now stay in sync with the real localization files
  • localization documentation was updated to reflect the new workflow

This turned out to be a more practical improvement for the current project, because adding a new supported language is now much simpler and less error-prone.

The original idea of automatic key synchronization / placeholder generation (TODO_TRANSLATE:) is still valuable, but it should be tracked as a separate issue.

Closing this as completed.

Replaced hardcoded menu logic with a new MenuItem class and dynamic menu generation in Program.cs. Menu items are now localized, numbered at runtime, and support dynamic suffixes (e.g., theme icon, calendar sync status). Updated en.json to remove menu numbering, add new keys, and improve clarity. Improved input handling and code maintainability throughout.
Added LocalizationAuditService to check for missing or empty translation keys in localization files compared to English. Introduced LocalizationAuditResult to encapsulate audit results. Updated language selection UI to display a warning for languages needing updates.
Improved LanguageService to validate available localizations, use case-insensitive dictionaries, and log warnings for missing or mismatched files. Added GetWarnings() method. Updated Languages.json to support many more languages.
Expanded and improved translations for fr, it, ru, and uk.
Menu options are now descriptive instead of numbered.
Added prompts for language selection, confirmations, errors,
and Google Calendar sync. Translations now cover more app
features and user interactions for consistency.
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.

1 participant