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

Renames .strings files into .xib and .storyboard for projects with Base localization #68

Open
lazarev opened this issue Feb 10, 2015 · 16 comments

Comments

@lazarev
Copy link

lazarev commented Feb 10, 2015

#63 fix does not supports base localization (by default from Xcode 5). This type of localization uses ".strings" files to collect localizable strings for .xib and .storyboard files.

If I have structure like this:
Base.lproj/myview.xib
en.lproj/myview.strings
ru.lproj/myview.strings

after synx I get:
Base.lproj/myview.xib
en.lproj/myview.xib
ru.lproj/myview.xib

Localization tables are just renamed. To fix this synx just shouldn't rename this files but keep their original names.

@erwald
Copy link

erwald commented Apr 24, 2015

I have the same issue, and am, surprisingly, having trouble repairing it manually. If I rename the files back to .strings, Xcode won't let me insert them to the correct place in the project, and, moreover, it won't let me remove any references to the deleted files.

How did you go about fixing this @lazarev? It took me some days before I noticed, so I would rather not return to a previous commit.

Edit: Bah, never mind – I figured it out.

@isair
Copy link

isair commented May 16, 2015

+1

@Mazyod
Copy link

Mazyod commented May 16, 2015

@erwald Just a thought: Did you check the encoding of the strings file? It may have changed in the process to something other than the required encoding UTF-16 (I think it's required to be that, at least).

@erwald
Copy link

erwald commented May 16, 2015

@Mazyod Do you mean in order to re-add them? I think it's UTF-8 now, but it also works now again. I don't remember exactly what I had to do, but I think it was just another half an hour of fiddling in Xcode that did it.

@Mazyod
Copy link

Mazyod commented May 16, 2015

@erwald Oh, got it. Yeah, I thought it was a requirement, but it seems to just be a best practice, it is not actually enforced. From Apple docs:

Note: It is recommended that you save strings files using the UTF-16 encoding, which is the default encoding for standard strings files.

lazarev added a commit to lazarev/synx that referenced this issue Jun 29, 2015
@radex
Copy link

radex commented Jul 30, 2015

Ah, same issue here. Does the fix in #77 work well?

@eugenpirogoff
Copy link

Same issue here.

@SpencerMichaels
Copy link

This is still a problem in the latest version; it makes synx totally unusable for apps with localization.

@beseder42
Copy link

Any progress possible on this? Still not useable on localized Projects!

@MrNickBarker
Copy link

MrNickBarker commented Jun 22, 2016

We fixed this in our project like this:

  1. Select the storyboard/xib
  2. Un-tick the languages in the localisation panel that have been converted from .strings to .storyboard/.xib. Make sure that the "Delete localized resources from disk" is not checked in the popup.
  3. In Finder open the language project folder (de.lproj, fr.lproj or whatever) and rename the .storyboard/.xib files back to .strings
  4. Back in Xcode select the storyboard/xib and add re-add the localisations. Make sure to select the option to use the existing file in the popup.

@pschneider
Copy link

@MrNickBarker 's solution worked for us, too. Thanks!

@tylermilner
Copy link

This issue is still present in the current version. Unfortunately, I didn't know about this before an app update went live and it broke localization in my app for thousands of our Spanish and French users. While it's nice that there is a work around to get things working again, Synx shouldn't be doing this in the first place.

@NikKovIos
Copy link

MrNickBarker's answer works, but it's poor that the issue still presents.

@numen31337
Copy link

Same issue here, noticed it too late and already done a lot of changes in the project to just reverse a commit. This was the last time for us when we were using this utility. This is unacceptable for the apps that are in production.

@eugenpirogoff
Copy link

@numen31337

a friendly advice: cool down, its an FOSS project. take it or leave it. no need for harsh words here. and yes I ran into the same issue.

@seasox
Copy link

seasox commented Dec 21, 2017

I ran into the same issue, was able to fix it using the diff of my app's project.pbxproj. Would be great to see a fix in an upcoming release.

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

Successfully merging a pull request may close this issue.