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

Files output with nonsense text #1

Closed
kanetik opened this issue Jan 18, 2016 · 3 comments
Closed

Files output with nonsense text #1

kanetik opened this issue Jan 18, 2016 · 3 comments

Comments

@kanetik
Copy link

kanetik commented Jan 18, 2016

I ran the task and got a lot of text that looks like this:

??????
???????
??????????????????????????????
???
??
??????????????
???

I had previously tried Android Localizationer, and that had pretty much the same issue: westlinkin/AndroidLocalizationer#17 - it was an encoding issue.

@ayvazj
Copy link
Owner

ayvazj commented Jan 18, 2016

Can you provide a simple strings.xml that reproduces the issue and include the androlate block from your build.gradle file.

@kanetik
Copy link
Author

kanetik commented Jan 19, 2016

Didn't even notice it had stripped out the tags from around the ???... Here's the English:

<resources>
    <string name="deactivate">Deactivate</string>
    <string name="bulb_description">Wakey Toggle</string>
    <string name="premium_upgrade_success">Thank you for upgrading to premium!</string>
    <string name="help">Help</string>
    <string name="add">Add</string>
    <string name="upgrade_to_premium">Upgrade to Premium!</string>
    <string name="why">Why?</string>
</resources>

and the Japanese:

<resources>
    <string name="deactivate">??????</string>
    <string name="bulb_description">???????</string>
    <string name="premium_upgrade_success">??????????????????????????????</string>
    <string name="help">???</string>
    <string name="add">??</string>
    <string name="upgrade_to_premium">??????????????</string>
    <string name="why">???</string>
</resources>

And finally, the Androlate block (minus the API Key andproject name):

androlate {
    appName '{project name was here, but not gonna include that here}'
    apiKey '{key was here, but not gonna include that here}'
    defaultLanguage 'en'
    targetLanguages = ['ja']
}

@ayvazj
Copy link
Owner

ayvazj commented Jan 19, 2016

I wasn't able to reproduce the issue on OS X or Windows 10 but I'm assuming your default encoding is not UTF-8. I published version 0.2 that explicitly sets the encoding of the output file to UTF-8 if you would like to try it.

classpath('com.github.ayvazj.gradle.plugins.androlate:androlate:0.2')

@ayvazj ayvazj closed this as completed Jun 11, 2016
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