Closed c0dedbear closed 2 weeks ago
Thanks for raising this, i'll take a look! Is your .xcstrings catalog in a Swift Package target, or an Xcode project target?
(I use plugin in swift packages inside Xcode project)
Oh I see, thanks for confirming.. You might be able to benefit here from disabling the automatic extraction via build settings:
But it's strange that it started happening in 0.2.0 and not before, probably because I changed the way that the code was generated and Xcode now sees the defaultValue
that I pass into the struct initailiser.
I have an idea how to work around this though that I will look into.
I think that I have a better fix for this in #67... If you can test using the ln/compute-default-value-args
branch, that would be helpful 👍
@liamnichols thank you for a really quick response! 👏
I switched to ln/compute-default-value-args branch and checked it out. There are no duplicates now, but every Localizable.xcstrings file are modifying by adding one empty string.
It seems your fix definitely solves duplicating 🔥, but probably needs a little polishing 😊
p.s. These settings in my main target/project set as recommended: LOCALIZATION_PREFERS_STRING_CATALOGS): YES LOCALIZED_STRING_SWIFTUI_SUPPORT): NO SWIFT_EMIT_LOC_STRINGS: NO
Thanks for sharing! I'll look into this more tonight and try to replicate it myself 👍
Hi again @c0dedbear, I've found a way to avoid this and pushed a new commit to ln/compute-default-value-args
.
I think I verified it in the demo app, but if you want to double check that it fixes the issue then please do! Thanks
@liamnichols Confirm, everything is good in my project now, thanks!
When do you plan the next release?
Great, thanks for confirming!
I'll delete that branch now, so please switch to main
in the meantime. I'll release a new version either tonight or tomorrow.
Thanks again!
Released in 0.3.0 🚀
Hi!
After updating to 0.2.0 of xcstrings-tool-plugin (I use plugin in swift packages inside Xcode project), I've noticed that after build my Localizable.xcstrings were modified by additional strings which duplicates Default Localization values.
I should mention that code base does not have those strings. Catalogs are the source of truth with manual management and used by .localizable.someKey syntax
I found out the exact commit with broken changes https://github.com/liamnichols/xcstrings-tool/commit/15acd617654bc5d903f1a34fd4567b9c90c5787f
So far I fixed the previous commit revision in my project and there is no such issue.
My Xcode version 15.3 and // swift-tools-version: 5.10 in SPM packages.