Xcode 15 migration to string catalogs failed

I tried to migrate to the new localized string catalogs. But after this I can't build the app anymore. The error message stated something about an "old" .string file... but I checked all directories and there are no old .string files...

Anybody a hint how to go further?

And this is how the directories look after migration ...

Answered by DTS Engineer in 782515022

Your first screenshot shows the following errors:

Localizable.xcstrings cannot co-exist with other strings or .stringsdict tables with the same name.

LocalizableDic.xcstrings cannot co-exist with other strings or stringsdict tables with the same name.

InfoPlist.xcstrings cannot co-exist with other strings or stringsdict tables with the same name.

These errors are typically triggered because the .strings or .stringsdict files exist in the Base.lproj folder in your project.

Base.lproj is for something like a storyboard, which you have a base resource in Base.lproj and each locale (including English) has a .lproj folder with a .strings file that overlays the translations on top of the same base resource. It should not contain any .strings or .stringsdict files.

Xcode doesn't provide a good way to remove the files from Base.lproj, and so I'd consider fixing the issue with the following steps:

  1. Back up your project.

  2. Remove the .strings or .stringsdict files from your project. In this case, they are Localizable.strings, Localizable.stringsdict, and InfoPlist.strings, as mentioned in the error message. Note that you need to trash the files, and not just remove the reference from your project.

  3. Add the files back from your backup project. To do so, place your project and backup project side by side, and then drag and drop the files.

  4. Localize the files for the languages you support. To localize a file, select it in Xcode's Project Navigator, click the Localize button in Xcode's File Inspector, then pick the languages. In this process, Xcode creates a .lproj folder for each language (if not yet), and copy the file to the folder. Replace the file in each .lproj folder with the localized version from your backup. As a result, your project has the localized files in each .lproj folder, but not in Base.lproj.

Now that your project is correctly configured, right-click a .strings or .stringsdict file in Xcode's Project Navigator to show the contextual menu, then select Migrate to String Catalog… menu. Xcode should do the migration for you.

Can you also share how your file structure looked before the migration? I think it would be especially valuable to see what files were in your en.lproj folder.

Hello, thanks for the reply.. here is the situation shortly before the migration

Maybe also useful...

project file AFTER migration

plist file AFTER migration

And the same files, after a rollback of the migration...

... and the changes made by Xcode 15 during migration in the .xcodeproj

And this are the changes on file level .. the changes on the .plist files are just increased build numbers

Hi, one told me I have to get rid of the "base.*" files .. is there an easy way to eliminate them?

Accepted Answer

Your first screenshot shows the following errors:

Localizable.xcstrings cannot co-exist with other strings or .stringsdict tables with the same name.

LocalizableDic.xcstrings cannot co-exist with other strings or stringsdict tables with the same name.

InfoPlist.xcstrings cannot co-exist with other strings or stringsdict tables with the same name.

These errors are typically triggered because the .strings or .stringsdict files exist in the Base.lproj folder in your project.

Base.lproj is for something like a storyboard, which you have a base resource in Base.lproj and each locale (including English) has a .lproj folder with a .strings file that overlays the translations on top of the same base resource. It should not contain any .strings or .stringsdict files.

Xcode doesn't provide a good way to remove the files from Base.lproj, and so I'd consider fixing the issue with the following steps:

  1. Back up your project.

  2. Remove the .strings or .stringsdict files from your project. In this case, they are Localizable.strings, Localizable.stringsdict, and InfoPlist.strings, as mentioned in the error message. Note that you need to trash the files, and not just remove the reference from your project.

  3. Add the files back from your backup project. To do so, place your project and backup project side by side, and then drag and drop the files.

  4. Localize the files for the languages you support. To localize a file, select it in Xcode's Project Navigator, click the Localize button in Xcode's File Inspector, then pick the languages. In this process, Xcode creates a .lproj folder for each language (if not yet), and copy the file to the folder. Replace the file in each .lproj folder with the localized version from your backup. As a result, your project has the localized files in each .lproj folder, but not in Base.lproj.

Now that your project is correctly configured, right-click a .strings or .stringsdict file in Xcode's Project Navigator to show the contextual menu, then select Migrate to String Catalog… menu. Xcode should do the migration for you.

Xcode 15 migration to string catalogs failed
 
 
Q