Open WarTech9 opened 7 years ago
Adding localization variant groups always adds groups with comment "undefined". For example, I end up with a PBXBuildFile section entry like this:
PBXBuildFile
4815039DEE524DBD9A7F16E8 /* Localizable.strings in undefined */ = {isa = PBXBuildFile; fileRef = E651D27D6DE74EDFB6FCD625 /* Localizable.strings */; };
Looks like the cause of this is pbxProject.addLocalizationVariantGroup: line 1864
Here, the variant group object is created without a group. This object is then passed in to this.addToPbxBuildFileSection(localizationVariantGroup). This then passes the group into pbxBuildFileComment(file), which in turn calls longComment(file), which sets the comment for this entry. longComment returns f("%s in %s", file.basename, file.group) as file comment. Thus, not setting the group property when the variant group is created results in all variant groups being created with this method having undefined comment.
this.addToPbxBuildFileSection(localizationVariantGroup)
pbxBuildFileComment(file)
longComment(file)
longComment
f("%s in %s", file.basename, file.group)
undefined
The group property in this case refers to the build phase. Since localized resources are always added to the 'Resources' build phase, setting that when the variant group is being created should fix this issue.
@innovative1 Could you send a pull request for this?
Adding localization variant groups always adds groups with comment "undefined". For example, I end up with a
PBXBuildFile
section entry like this:Looks like the cause of this is pbxProject.addLocalizationVariantGroup: line 1864
Here, the variant group object is created without a group. This object is then passed in to
this.addToPbxBuildFileSection(localizationVariantGroup)
. This then passes the group intopbxBuildFileComment(file)
, which in turn callslongComment(file)
, which sets the comment for this entry.longComment
returnsf("%s in %s", file.basename, file.group)
as file comment. Thus, not setting the group property when the variant group is created results in all variant groups being created with this method havingundefined
comment.The group property in this case refers to the build phase. Since localized resources are always added to the 'Resources' build phase, setting that when the variant group is being created should fix this issue.