(I know this is not really a bug report, but I don't know where else to ask questions - I'm happy to convert this into a wiki page as an example usage though)
Hello and thank you for maintaining this project. At Mozilla we are trying to use this for the following use case:
We have a product called Focus at https://github.com/mozilla-mobile/focus which currently is English only.
We localize the product by exporting an en.XLIFF file to our localization volunteers and we get back XLIFF files for other locales. To import these we run xcodebuild -importLocalizations -localizationPath l10n/nl.xliff for example. This spits out .strings files in the proper .lproj directories.
The problem is that xcodebuild only generates the files. It does not actually add them to the project.
This is where pbxproj comes in. I'd like to use it to find for example the PBXVariantGroup for Localizable.strings and then add a PBXFileReference reference for it.lproj/Localizable.strings to it.
However, we are lost in the complexity of both the Xcode projects and the pbxproj API.
My question to you is if we can get some help to find out how to do this. I'm happy to turn the end result in some reusable code that anyoen can use. Or a blog post or a wiki page.
🧀
(I know this is not really a bug report, but I don't know where else to ask questions - I'm happy to convert this into a wiki page as an example usage though)
Hello and thank you for maintaining this project. At Mozilla we are trying to use this for the following use case:
We have a product called Focus at https://github.com/mozilla-mobile/focus which currently is English only.
We localize the product by exporting an
en.XLIFFfile to our localization volunteers and we get back XLIFF files for other locales. To import these we runxcodebuild -importLocalizations -localizationPath l10n/nl.xlifffor example. This spits out .strings files in the proper .lproj directories.The problem is that
xcodebuildonly generates the files. It does not actually add them to the project.This is where
pbxprojcomes in. I'd like to use it to find for example thePBXVariantGroupforLocalizable.stringsand then add aPBXFileReferencereference forit.lproj/Localizable.stringsto it.However, we are lost in the complexity of both the Xcode projects and the pbxproj API.
My question to you is if we can get some help to find out how to do this. I'm happy to turn the end result in some reusable code that anyoen can use. Or a blog post or a wiki page.
🧀