Open guidev opened 1 year ago
@guidev Thank you for reporting this.
I am aware of this downside of BartyCrouch and actually, it's a downside of an Apple tool that ships with Xcode which BartyCrouch uses internally to extract Strings from Swift files. Also, I wouldn't call it a "bug" as BartyCrouch never intended to extract localization Strings for SwiftUI, where Apple changed things significantly.
I have no plans to write a manual parser to find all localizable Strings to BartyCrouch, in fact BartyCrouch is more of a community project now. So if someone provided support for this, I'd be happy to review. But my focus is on the successor of BartyCrouch now where the workflow is a bit different, but it fully supports SwiftUI: RemafoX
See also this thread where a similar discussion happened: https://github.com/FlineDev/BartyCrouch/issues/194
Steps to Reproduce:
In SwiftUI Text() and Button() are automatically localisable.
For instance using
Text("Title")
, automatically looks for localisations with the key"Title"
Unfortunately when running bartycrouch, if there's a "Title" entry in the localizable.strings it gets deleted.
Expected Behavior:
Bartycrouch should treat
Text("Title")
orButton("Title")
the same ways it does withNSLocalizedString("Title")
Current Behavior:
Doesn't recognise that it's a localisable string.
Environment
Show environment details