简体   繁体   中英

Settings.bundle Localization Broken

A few weeks ago, I added a Settings bundle to my app and localized its entries following the awesome tutorial by Use Your Loaf . Back then, it was working without problem.

Now I came back to my project after a few weeks, same Xcode version (9.3), and found these issues:

  • I can't see the strings files in the Project Navigator: The language folders are missing the expected disclosure controls:

在此处输入图片说明

  • If I delete the Settings bundle and start over, I get:

    • Settings.bundle
    • en.lproj
    • Root.plist

...but the English language folder is still missing the disclosure indicator.

  • When I install my app in the device or Simulator and go to the Settings page, the localization keys are displayed (as if the string files for all languages were missing).

  • However, if I go to the Products folder (from the Xcode Project Navigator, "Show in Finder...") and inspect the contents of my app bundle, and the settings bundle within it, the language directories are there with their respective strings files inside.

What am I missing?


Update

I tried creating a new, bare project and adding a settings bundle to that, but I get the same result. I went back to Xcode 9.2 (which I also have installed), and the issue does not occur . Either there's a bug on 9.3 (unlikely, since it was working when I first added the bundle) or my installation is broken.

I just checked and noticed there's an update available for Xcode 9.3 (9.3.1), so I'll download that and try again...

As I suspected, my installation of Xcode was broken.

After reinstalling Xcode by updating to 9.3. 1 , adding a settings bundle results in the expecyed behaviour:

在此处输入图片说明

Not the most common scenario, I know, but I hope this answer helps someone in the same situation someday.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM