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

Not extracting Strings #109

Open
dpedrinha opened this issue Oct 4, 2019 · 31 comments
Open

Not extracting Strings #109

dpedrinha opened this issue Oct 4, 2019 · 31 comments
Assignees
Labels

Comments

@dpedrinha
Copy link

dpedrinha commented Oct 4, 2019

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

@noordawod
Copy link
Contributor

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.

@dpedrinha
Copy link
Author

dpedrinha commented Oct 4, 2019

@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.

@noordawod
Copy link
Contributor

noordawod commented Oct 4, 2019

Thanks for the detailed description! 👍

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

@dpedrinha
Copy link
Author

I'll see to it

@dpedrinha
Copy link
Author

dpedrinha commented Oct 4, 2019

Brand new Flutter project main.dart open

ALT+ENTER on a String -> click on first option

Pop-up shows up. Select the .arb files and click OK

.dart file is updated as if the String exists but it can't find it

.arb file is empty

Sorry but I don't know how to make the images show here automatically. I shared the links with OneDrive.

@noordawod
Copy link
Contributor

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?

@dpedrinha
Copy link
Author

dpedrinha commented Oct 5, 2019

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...

@TheVinhLuong
Copy link

I am also facing this problem.

@samuelg123
Copy link

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 👍

@GrahamDi
Copy link

GrahamDi commented Oct 10, 2019

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)

@PerLycke
Copy link

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.

@nikitattt
Copy link

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

@r0ck3r
Copy link

r0ck3r commented Oct 17, 2019

Same for me

UPDATE: Last working version is 1.0.6

@sydneyagcaoili
Copy link

Same here, any update on this?

@noordawod
Copy link
Contributor

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

@GrahamDi
Copy link

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). 👍

@sumeet-toptal
Copy link

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

@EArminjon
Copy link

EArminjon commented Nov 7, 2019

Problem still here :'(

EDIT : FIX

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

@paul1992li
Copy link

DialogWrapper has a bug , submit a PR to fix

@GrahamDi
Copy link

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

@kirimi
Copy link

kirimi commented Nov 15, 2019

Same for me

@Deishelon
Copy link

Any updates?

@xBioDreadx
Copy link

xBioDreadx commented Nov 20, 2019

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

@samuelg123
Copy link

samuelg123 commented Nov 21, 2019

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

@sumeet-toptal
Copy link

@xBioDreadx Thanks a lot. works well on IntelliJ 2019.2

@GrahamDi
Copy link

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

@kirimi
Copy link

kirimi commented Nov 21, 2019

@xBioDreadx Thank you very much!

@r0ck3r
Copy link

r0ck3r commented Nov 21, 2019

@xBioDreadx, thank you!

@GrahamDi
Copy link

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

@donghua-wang
Copy link

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

@Bernix01
Copy link

Bernix01 commented Dec 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests