Posts

Post not yet marked as solved
1 Replies
378 Views
Hello, I migrated a project to use String Catalogs (Localizable.xcstrings) instead of Localized.strings and Localized.stringsdict files. So far so good, but since I use a lot localized strings in my project, there are quite some localizations used more than once in different contexts and thus with different comments. For example: Source file 1: String(localized: "Something", comment: "Button title for context1") Source file 2: String(localized: "Something", comment: "Column title for context2") This results to a Localized.xcstrings file with this content: { "sourceLanguage" : "en", "strings" : { "Something" : { "comment" : "Column title for context2\nButton title for context1" } }, "version" : "1.0" } The main problem with this is, that the order of the concatenated comment changes randomly during each build. After the next Xcode build (without any code changes), the same Localized.xcstrings file might look like this: { "sourceLanguage" : "en", "strings" : { "Something" : { "comment" : "Button title for context1\nColumn title for context2" } }, "version" : "1.0" } This leads to false positives when trying to commit changes to a git repository, which is quite annoying. Am I the only one, having issues with comments in String Catalogs and git?
Posted
by ERenschHG.
Last updated
.