long1eu / flutter_i18n

This plugin create a binding between your translations from .arb files and your Flutter app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not extracting Strings

dpedrinha opened this issue · comments

Hi.
Since latest updates the extract feature isn't updating the .arb files anymore.
How to reproduce: Create new Flutter project. Alt+Enter a String -> extract. It doesn't change the .arb files.

Android Studio 3.5.1
Build #AI-191.8026.42.35.5900203, built on September 25, 2019
JRE: 1.8.0_202-release-1483-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Thanks @dpedrinha for reporting this. However, I still don't understand how to reproduce or what is the problem?

What version of the plugin are you using? Make sure you're using 1.1.4 (latest) as it fixes a couple of issues with previous versions.

@noordawod Thank you for your response. I was using 1.1.2 which was released to fix my last complain about not generating the i18n.dart file (remember me now? :).
Just got the new 1.1.4 update and the problem persists.
The problem is that prior to the 1.1.1 update I could Alt + Enter on a string in my code, click "Extract the string resource" and it would be added to my .arb files automatically.
It's not working anymore. When I click on "Extract the string resource", it shows the pop up asking about the .arb files to add the string to, but when I click OK, it closes and nothing happens. The .arb files are not updated. The string is not added to them.

And I it doesn't even work on a brand new Flutter project.

I can upload a test project here but I don't think it's necessary. You can create a new project and test it without changing a single line of code. Create a Flutter project, open /lib/screens/home_page.dart, ALT + Enter on any String and Extract. Check .arb file, it's empty when it should have the extracted string.

Thanks for the detailed description! 👍

Any chance you could upload a couple of screenshots showing this behavior?

I'll see to it

Perfect, now I understand what's going on!
Are you sure this feature used to work in previous versions of the plugin? I believe you mentioned 1.0.6, is that correct? Can you please verify?

I don't know how to verify this. If you can walk me through I'd gladly do it.

But I remember I updated the plugin to 1.1.1 and the i18n.dart wasn't being generated. Then it got fixed with 1.1.2 and this feature didn't work anymore (I don't know if this feature was working when on 1.1.1). I truly don't remember which version I was using before.

But this is a feature of this plugin...

I am also facing this problem.

Yea, me too. Alt+enter -> extract the string resource shortcut not working after the update. For now, I do insert manually by putting new string into .arb files. Hope this fix will land very soon.
Anyway, thanks for this plugin 👍

I'm having the same problem.

A few weeks ago, I created all my .arb files (17), got them translated and the i18n.dart file successfully generated. All good.

Then yesterday I decided to include some new strings that I had to add to my app. Pressing alt-enter on the string and selecting 'Extract the string resource' brings up the arb file dialogue as expected. I select all my arb files (or just the en one) and select Ok. I get the message "Create string value resource 'no_internet_access'" on the status bar and the string in my code file changes to 'S.of(context).no_internet_access' but nothing else happens - no error message, no updated arb files and hence no new i18n.dart. Just a sad red line under my new variable name. Hope you have some idea of what the problem is....don't wanna go back to manual i18n. Your great plugin has spoilt me.

Versions:
Win 10 Build 18999 (insiders skip ahead)
Android Studio 3.5.1
Flutter_i18n plugin v1.1.4-191 (says version 192 is incompatible)

Just realised I have the exact same issue.

Plugin version: 1.1.4-191
Environment: MacOS Catalina, Android Studio 3.5.1 (Stable channel)

When extracting strings they won't automatically be added to the .arb files. I have to do that manually.

commented

I have the same issue too. Everything is exactly as @dpedrinha described.

Same for me

UPDATE: Last working version is 1.0.6

Same here, any update on this?

Been busy lately so not had time to look into this, sorry guys...

No worries, it is worth waiting for. Also, really looking forward to it working in VSCode...my much preferred IDE (people call it an editor but it is way more). 👍

Hi @noordawod , I am having the same issue (no strings added to .arb file even though the string is replaced with key in the .dart file)

I have tried with

  • plugin version Flutter_i18n-1.1.4-192 on IntelliJ Ultimate IntelliJ IDEA 2019.2.3 (Ultimate Edition) Build #IU-192.6817.14

  • plugin version Flutter_i18n-1.1.4-191 on *Android Studio 3.5.1 Build #AI-191.8026.42.35.5900203

Both have the same issue

TIA

Problem still here :'(

EDIT : FIX

My ide was with multiple project, so i open only once and the plugin works well.

DialogWrapper has a bug , submit a PR to fix

Hi Noor,
Is there a date when the PR will be approved and merged?

Same for me

Any updates?

Compiled plugin with @paul1992li PR fix:
https://github.com/xBioDreadx/flutter_i18n/releases
Cant wait for owner release so made it myself...

192 - for idea 2019.2
191 - idea 2019.1 or Android Studio 3.5.2
and so on...
Install manually in idea:
image

@paul1992li @xBioDreadx Thank you very much !! It works perfectly. I really appreciate it..

@xBioDreadx Thanks a lot. works well on IntelliJ 2019.2

@xBioDreadx Works perfectly on Android Studio 3.5.2. Thanks very much for stepping up here...needed to be fixed.

@xBioDreadx Thank you very much!

@paul1992li Sorry, forgot to thank you also for the original fix.

@xBioDreadx Thank you very much. Works on Android Studio 3.5.2

@xBioDreadx Thank you very much. Works on Android Studio 3.5.2