Skip to content

Added proper pluralization support for localized strings#125

Merged
d2dyno1 merged 5 commits into
masterfrom
f_pluralization
May 7, 2026
Merged

Added proper pluralization support for localized strings#125
d2dyno1 merged 5 commits into
masterfrom
f_pluralization

Conversation

@d2dyno1
Copy link
Copy Markdown
Member

@d2dyno1 d2dyno1 commented May 6, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces SmartFormat-based localization formatting to support proper pluralization in UI strings (e.g., “1 item” vs “2 items”), and adjusts several view models/pages to use the new plural-aware resource keys.

Changes:

  • Added SmartFormat to the SDK and switched ToLocalized(..., interpolate) formatting to use Smart.Format(...).
  • Updated many UI call sites (C#/XAML) and en-US resources to use new *Plural resource keys and SmartFormat plural/choose expressions.
  • Extended transfer progress state (TotalProgress.State) and adjusted transfer reporting to include richer interpolation data.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tests/SecureFolderFS.Tests/ServiceImplementation/MockLocalizationService.cs Updates mocked date resource keys to the new *Plural variants.
src/Sdk/SecureFolderFS.Sdk/ViewModels/Views/Vault/VaultHealthViewModel.cs Uses new pluralized resource key for collected-item subtitle.
src/Sdk/SecureFolderFS.Sdk/ViewModels/Views/Vault/BrowserViewModel.cs Adds an IsPickingFolder flag and toggles it during folder-pick navigation.
src/Sdk/SecureFolderFS.Sdk/ViewModels/Controls/Transfer/TransferViewModel.cs Switches transfer titles to new SmartFormat pluralized keys and passes structured interpolation.
src/Sdk/SecureFolderFS.Sdk/ViewModels/Controls/Storage/Browser/FolderViewModel.cs Changes folder-picking detection to BrowserViewModel.IsPickingFolder.
src/Sdk/SecureFolderFS.Sdk/ViewModels/Controls/Storage/Browser/BrowserItemViewModel.cs Updates delete dialogs to new pluralized resource keys.
src/Sdk/SecureFolderFS.Sdk/SecureFolderFS.Sdk.csproj Adds SmartFormat package dependency.
src/Sdk/SecureFolderFS.Sdk/Extensions/TransferExtensions.cs Adjusts transfer progress reporting to include State and supports custom item-name selection.
src/Sdk/SecureFolderFS.Sdk/Extensions/LocalizationServiceExtensions.cs Updates relative-date localization to use new plural keys.
src/Sdk/SecureFolderFS.Sdk/Extensions/LocalizationExtensions.cs Switches interpolation formatting from string.Format to Smart.Format.
src/Sdk/SecureFolderFS.Sdk/AppModels/TotalProgress.cs Extends progress model to include optional State.
src/Platforms/SecureFolderFS.Uno/Views/Vault/VaultHealthPage.xaml Updates count-to-string key to pluralized variant.
src/Platforms/SecureFolderFS.UI/ViewModels/Health/HealthFileDataIssueViewModel.cs Uses pluralized corrupted-chunks resource key.
src/Platforms/SecureFolderFS.UI/ValueConverters/BaseDateTimeToStringConverter.cs Makes LOCALIZE parameter handling case-insensitive.
src/Platforms/SecureFolderFS.UI/Strings/en-US/Resources.resx Adds SmartFormat plural/choose strings and introduces many new *Plural keys.
src/Platforms/SecureFolderFS.UI/Assets/Licenses/SmartFormat LICENSE Adds SmartFormat license text.
src/Platforms/SecureFolderFS.Maui/Views/Vault/BrowserPage.xaml Updates selection/count strings to pluralized keys.
src/Platforms/SecureFolderFS.Maui/UserControls/Browser/TransferControl.xaml Adds tail truncation for long transfer titles.
src/Platforms/SecureFolderFS.Maui/UserControls/Browser/BrowserControl.DragDrop.xaml.cs Updates transfer call to pass item-name selector overload.
src/Platforms/SecureFolderFS.Maui/Platforms/Android/ServiceImplementation/VaultForegroundService.cs Updates notification title to pluralized key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Sdk/SecureFolderFS.Sdk/Extensions/TransferExtensions.cs
Comment thread src/Platforms/SecureFolderFS.Maui/Views/Vault/BrowserPage.xaml
Comment thread src/Platforms/SecureFolderFS.Uno/Views/Vault/VaultHealthPage.xaml
Comment thread src/Platforms/SecureFolderFS.UI/Assets/Licenses/SmartFormat LICENSE
@d2dyno1 d2dyno1 added the approved The pull request has been reviewed and approved label May 7, 2026
@d2dyno1 d2dyno1 merged commit 161ae62 into master May 7, 2026
59 checks passed
@d2dyno1 d2dyno1 deleted the f_pluralization branch May 7, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved The pull request has been reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants