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

Allow _resolvePlural to search _fallbackTranslation values when trying to resolve a plural key #559

Merged
merged 7 commits into from
Sep 5, 2023

Conversation

shrdnar
Copy link
Contributor

@shrdnar shrdnar commented Feb 21, 2023

Not sure of the logic/reasoning behind line 181, where the call to _resolve is forcing fallback param to always be false.
That means if you are using fallback translations (_fallbackTranslations is not null and has values) _resolvePlural should respect that and attempt to resolve any plural keys that exist in the fallback translations map.

Copy link
Collaborator

@bw-flagship bw-flagship left a comment

Choose a reason for hiding this comment

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

This change seems to make sense, thanks for the PR! However, a test would be good to avoid breaking it in the future

lib/src/localization.dart Show resolved Hide resolved
pubspec.yaml Outdated Show resolved Hide resolved
@bw-flagship bw-flagship merged commit 27b81cd into aissat:develop Sep 5, 2023
2 checks passed
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