larryaasen / upgrader

A Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
MIT License
547 stars 268 forks source link

Message not compatible with flutter 3.7 l10N #264

Closed EArminjon closed 5 months ago

EArminjon commented 1 year ago

UpgraderMessage.body

"upgrader_message_body": "En ny version av '{{appName}}' app! Version {{currentAppStoreVersion}} finns tillgänglig - du har version {{currentInstalledVersion}}.",

ICU Syntax Error: Expected "identifier" but found "{".

Management of Double "{" or "}" seems to not be anymore correct.

larryaasen commented 1 year ago

I could not find that in the upgrader code. Can you provide more details?

EArminjon commented 1 year ago

With flutter 3.7.1 / 3.7.0, the usage of the double '{' seems to not work. {{appName}} is used here for example : https://github.com/larryaasen/upgrader/blob/master/lib/src/upgrade_messages.dart

Maybe 3.7.2 fix that, need to test

larryaasen commented 1 year ago

Seems to work here on 3.7.0: https://github.com/larryaasen/upgrader/actions/runs/4015075928/jobs/6896372252

larryaasen commented 1 year ago

Can you provide specific details on the errors you are seeing?

omarfaroke commented 1 year ago

To avoid the localization problem with Flutter 3.7, you can use Escaping syntax. Like this:

flutter-localization-use-escaping

See this for more information: Escaping syntax

EArminjon commented 1 year ago

Wondering if this package should warn developer about it or not ? You can close @larryaasen ;)

larryaasen commented 1 year ago

@EArminjon You seem to be showing specific issues with your own code. Do you have any examples of specific issues with the upgrader code?

EArminjon commented 1 year ago

@larryaasen The omarfaroke's answer is correct.

When I opened this issue his suggestion was not working but it was in reality because of an other issue that flutter have fixed. So i think it was related to this package but hopefully no :) !

I suggest to add in the package readme a line to use use-escaping: true if developer plan to override your translation using l10N.