BartyCrouch icon indicating copy to clipboard operation
BartyCrouch copied to clipboard

[Feat] Autogenerate `.strings` files

Open noah-nuebling opened this issue 1 year ago • 2 comments

Problem Statement

If a translator wants to add a new language, and does that through Xcode, all the translated UI strings in the .strings files will be automatically copied over from the Base localisation.

It might be nicer to start with a blank slate, where none of the UI strings for the new language are filled in automatically.

I've found no way to turn this off in Xcode. So I wish bartycrouch could do this.

Also Xcode doesn't autogenerate the Localizable.strings file for me. It can only autogenerate the .strings files for IB files.

Suggested Solution

Add a new command to bartycrouch bartycrouch add <language> that automatically generates the .strings files for the new language and fills them out according to your settings.

noah-nuebling avatar Aug 15 '22 10:08 noah-nuebling

@noah-nuebling That sounds like a useful feature if you have many Strings files in your project. But it involves integrating with the Xcode project file which adds to the complexity. I won't have time to implement this feature (I shifted my focus onto ReMafoX instead – feel free to request this feature there), but I'd review a PR adding this as long as it doesn't complicate things too much and keeps the Xcode project integration lean.

Note that for projects with just one or few Strings files, you can simply remove all contents of the Strings files manually and just run BartyCrouchs normalization, which will add all keys with no translation value in them thanks to the "harmonize with source" option.

Jeehut avatar Aug 15 '22 12:08 Jeehut

That's a pretty nice workaround I can live with that I think.

I have a little bit of experience trying to extract info from Xcode project files and I definitely understand your weariness of that.

Thanks!

noah-nuebling avatar Aug 15 '22 16:08 noah-nuebling

Closing this as "Out of Scope" as there's a workaround available.

Jeehut avatar Oct 13 '22 21:10 Jeehut