LiewJunTung / Android-strings-xml-csv-converter

Convert Android translatable strings.xml into csv and back
MIT License
124 stars 32 forks source link

It doesn't work #15

Open SevenHoo opened 6 years ago

SevenHoo commented 6 years ago

Hi. My Android Studio version is 2.3.3, and I searched the plugin in the Settings --> Plugins of AS. I installed the plugin successfully, but when I ran it, I found it didn't work. The .csv file had been generated , but the file only had a "name" on the first blank and nothing else. Please tell me how to solve the problem, ths a ot.

LiewJunTung commented 6 years ago

Do send me a copy or a snippet of the csv file. I can take a look at it.

asinel commented 6 years ago

Same problem

jschnall commented 6 years ago

Hi LiewJunTung,

I've used your converter in the past and it's worked great, but now I'm also having issues. The green text comes up saying it succeeded, but the xml files aren't actually generated. I ran our CSV through csvlint.io, and it seems fine. You can download a copy from the link below if you'd like to test it.

https://csvlint.io/validation/5a208ea036d25c00040000a4

Thanks in advance,

Joel

michpohl commented 6 years ago

I'm having the same problem on Android Studio 3.0.1. All I can get it to generate is a file with a single "name" in it. Any idea what to do about it?

jschnall commented 6 years ago

Not sure this is being supported anymore, and the other existing solution I tried didn't work either, so I wrote my own python script. Maybe it'll be of use to you.

https://github.com/jschnall/AndroidStringHelper

Note, my script currently only works one direction, CSV -> Android. Hopefully I can find some free time to add the ability to export Android Strings -> CSV sometime soon.

LiewJunTung commented 6 years ago

Sorry guys. Right now I'm not dealing with translating strings in my workplace so I haven't got the time to do updates or fixes.

I (all of us) will be grateful if there are people who can do a pull requests to make improvements to the plugin!

Tharkius commented 6 years ago

I found out this happens because you have to set the source folder as the "res" folder of your android project. The plugin will then scan for eligible resource sub-folders, and parse their contents.

EDIT: I was mistaken. This seems to be true for the standalone groovy app, but not for the plugin, which is strange, since they both use the same lib. I've been trying to compile the plugin to figure out the problem, but haven't succeeded yet...