FlineDev / BartyCrouch

Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files.
MIT License
1.37k stars 121 forks source link

[Feat] Make the `override` option available for `code`? #286

Closed mshibanami closed 1 month ago

mshibanami commented 1 month ago

Problem Statement

Currently, code doesn't have an override option, and it's always specified as false in CommandLineActor.actOnCode() as seen here:

https://github.com/FlineDev/BartyCrouch/blob/aabff74ecce1d4f893b2fccd5028d866e2100ebd/Sources/BartyCrouchKit/TaskHandlers/CodeTaskHandler.swift#L16

I wonder if this option is legacy code and if it could be removed in the future. However, I believe it would be useful when I want to mass-update translations generated by machine translation engines.

Technically, I can already remove the existing translations and run code to update them, but I have to manually modify the strings file first. It becomes more complicated if I only want to update translations for specific languages.

Suggested Solution

Would it make sense for BartyCrouch to allow us to specify this override option in [update.code] within .bartycrouch.toml? In other words, adding an override property to CodeOptions.

Additional Considerations

I'm happy to send a pull request for this.

Thank a lot for maintaining this awesome tool. 🙂

Jeehut commented 1 month ago

@mshibanami Thank you for your kind words.

Please note that I am no longer actively maintaining BartyCrouch anymore. It was built in different times and was mostly sherlocked/deprecated by Xcode 15 which already automatically extracts translations into a String Catalog file. I wrote an FAQ summarizing all my learnings from my initial investigation, check it out to learn more: https://www.fline.dev/the-missing-string-catalogs-faq-for-xcode-15/

I'm also an Indie developer now and if you like BartyCrouch, consider migrating to String Catalogs and using my new app TranslateKit instead. It's basically the successor to BartyCrouch because it has the same goal: To make localization as simple as possible. Xcode 15 simplified a lot and changed the source of truth, which made BartyCrouch imcompatible. So I created TranslateKit and I'm actively working on it. I'm happy to add any features you need in there. It's already a very useful tool and my roadmap is still full of awesome features such as AI proofreading (coming soon), community-based reviews, and much more.

mshibanami commented 1 month ago

Thanks a lot for clarifying, @Jeehut.

I see. In that case, I'm wondering if you could find someone (not saying it has to be me) to maintain BartyCrouch, but that's up to you.

Wishing your tools great success! And thank you for your dedication to BartyCrouch up until now!

Jeehut commented 1 month ago

@mshibanami Thank you. If you know someone trustworthy and willing to take this project over, let me know.