Closed amin79 closed 11 months ago
Thank you @amin79. The ARB format for variables changed since this package was written, and an update is needed to handle certain scenarios. I am working on the fix now. Stay tuned.
@amin79 Please update the auto_translator
dependency in pubspec.yaml
to the following:
auto_translator:
git:
url: https://github.com/theLee3/flutter_auto_translator.git
This will pull the 2.0.0 release candidate that I just pushed to Github. I have to update the docs and example before publishing. I would love to know if it resolves your issue.
Hello. Thank you for your work. But I got following error:
Unhandled exception: type '_Map<String, dynamic>' is not a subtype of type 'String'
Thank you for the feedback @amin79.
Please run flutter clean
then flutter pub get
and try again.
You should see auto_translator v2.0.0
on the command when it runs to confirm that it is the latest build.
@theLee3 I did it but still was V1. Then I deleted the .pub-cache folder and now I get this error:
Could not find a file named "pubspec.yaml" in https://github.com/theLee3/flutter_auto_translator.git
I tried once more and was able to get it run finally. Now get this error:
Translating from en to ru...Unhandled exception: RangeError (index): Invalid value: Not in inclusive range 0..34: -1
BTW. it seems that the problem I had for translation is solved in this version.
Well at least there's that! 🥳
I think I tracked down the last issue. One edge case unaccounted for.
Please run flutter pub upgrade
and try again.
Hopefully this will be the last time🤞
Ensure that the version printed to the console is 2.0.0+1
.
Hi. I tested it. Everything works :) Thank you for your support
This is the text in english:
"cancelationDay": "{count, select, 1{Free cancelation {count} day before} other{Free cancelation {count} days before}}",
and this is what I get when it's translated to German:
"cancelationDay": "{count, select, 1{Kostenlose Stornierung{count} Tage vorher} other{Kostenlose Stornierung count} Tage vorher}}",
as you see in the translated text in "other", "count" shall be inside {} but its not. It's the same for all other languages. it shall be {count} but it's count} Also it does not respect the spaces. cancelation {count} and in translated it's Stornierung{count}
auto_translator: ^1.1.0