-
Notifications
You must be signed in to change notification settings - Fork 123
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
iOS .strings file incorrectly assumes UTF16-LE encoding #903
Comments
Did you import the originals or just a translation set? |
The originals, i.e. source strings that I want to translate in other languages. |
Yes, but have you imported the originals in to the project, aka Project->Project actions->Import Originals? After that you have to create a translation set for each language you want to translate to, Project->Project actions->New Translation Set. |
I've done those things but in the list there are no strings to translate. It seems the "import originals" does not work, the table wp_gp_originals is empty. The file I've tried to import is localizable.strings and contains: "STR_Success" = "Success!"; I'm trying in my mac using the following configuration:
|
Can you check to make sure your string file is UTF16-LE encoded before you import it? |
It's a normal txt file. If you want to try, here is the file: |
That's the problem, not sure why but the .strings format assumes the file is in UTF16-LE format and then converts it to UTF8. If it's already in UTF8 it will garble the file and no strings will be imported. This seems to be a hold over from the standalone code and not the current recommendation from Apple. I'm going to mark this as a bug and will create a PR for it, but in the mean time save the file as UTF16-LE and then it should import correctly. |
Thanks, converting the file works. Waiting for the PR. Regards |
We'll just leave the issue open and let the PR close it automatically so we can keep track of it. |
I reached out to the WP mobile folks on Slack to get some feedback on UTF8 vs UTF16LE and updated the PR to continue to support UTF16LE for imports (UTF8 is also now supported) as some of the Apple tools output it by default. https://wordpress.slack.com/archives/C02RQC4LY/p1526569592000356 |
I've installed the plugin, created the project and then imported a .strings file.
Translation list is empty.
Someone can help me to solve this problem ?
The text was updated successfully, but these errors were encountered: