Jesway / flutter_translate

Flutter Translate is a fully featured localization / internationalization (i18n) library for Flutter.
MIT License
403 stars 118 forks source link

Pluralization feature not working for static keys #92

Closed oysteinhodne closed 2 years ago

oysteinhodne commented 2 years ago

It seems like the generation of plural keys is not working correctly at the moment. The generated keys file in the static_keys example does not generate the key "Plural.demo", only the children of it (Plural.demo.zero etc.). Which in turn gives a compilation error when I try to use the key in my widget, as the key does not exist.

I thought originally i was doing something wrong, but the generated files in the example also does this.

image

Am i correct in assuming that the example will not work either? Or am i doing something wrong when i get the compilation error when running:

translatePlural(Keys.Plural_Demo, _counter)

bratan commented 2 years ago

I think the generation of plural keys needs to be updated in flutter_translate_gen in order for pluralization to work correctly after the latest changes in flutter_translate.

I don't have time currently to update the generator.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

faustodc commented 2 years ago

This issue shouldn't be closed if it's not resolved, it's still a problem.

bratan commented 2 years ago

This issue is related to Flutter-Translate-Gen which is discontinued and is not going to be updated any longer.

faustodc commented 2 years ago

Sorry for not realizing that, then perhaps the readme and wiki should be updated to reflect that.