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

Emoji not working with NetworkFileTranslationLoader but works with FileTranslationLoader #190

Closed
chamartt opened this issue Mar 16, 2022 · 5 comments

Comments

@chamartt
Copy link

Hello,

In my json file, I have some Emojis as 🤝.
When I use FileTranslationLoader, emojis are correclty displayed on my app, but when I use NetworkFileTranslationLoader (with same source json files), emojis are converted as specials caracters.

I tried to add decodeStrategies: [JsonDecodeStrategy(), YamlDecodeStrategy(), XmlDecodeStrategy(), TomlDecodeStrategy()] in parameter of my NetworkFileTranslationLoader but nothing changed.

This is the (good) result with FileTranslationLoader:
SmartSelect_20220316-124411

This is the (wrong) result with NetworkFileTranslationLoader:
SmartSelect_20220316-124033

I'm using flutter_i18n 0.32.1, Flutter sdk 2.10.3 and Dart 2.16.1

Thank you for your work and your time to answer.

@ilteoood
Copy link
Owner

Hi, do you have a direct link where I can try it?

@chamartt
Copy link
Author

Hello,

This is my code implementation :

NetworkFileTranslationLoader(
           useCountryCode: false,
           fallbackFile: 'en',
           baseUri: Uri.https("l-algo-de-paulo-8fb41.appspot.com.storage.googleapis.com", "translations"),
         )

I have one en.json and fr.json in the translations folder.

Thank you!

@chamartt
Copy link
Author

Hi @ilteoood,

Do you need additionnals informations to reproduce ?
We are waiting this point to upgrade our application.

Let me know if you need something else !

Thank you for your work and your time.

ilteoood added a commit that referenced this issue Mar 30, 2022
ilteoood added a commit that referenced this issue Mar 30, 2022
@ilteoood
Copy link
Owner

This should be fixed with the release 0.32.2

One suggestion: use the decodeStrategies parameter in order to avoid useless network calls.

P.S. this is an open source project, instead of ping me for a solution, you can contribute 😄

@chamartt
Copy link
Author

Hi,

Thank you for the MPR !

Unfortunatly I don't know as you how your plugin works and I had lot of work to look what was the problem, maybe was just one configuration in my call but I'm "happy" to see that was worst !

Thank you also for the suggestion, I tried with all to look results but I will restrict only JSON files !

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

No branches or pull requests

2 participants