SwiftGen / SwiftGen

The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Addition of .string file changes all previous strings usage

jalone87 opened this issue · comments

Hello, i have succesfully integrated SwiftGen for string localization with structured-swift5 template (the same happens with flat-swift5).
So far i only had one Localizable.strings file, which with the default template generates items usable in the form L10n.stringKey.

Now tho, i have added an additional InfoPlist.strings file, and ALL the project's strings get moved under L10n.Localizable.stringKey and L10n.InfoPlist.stringKey for the new ones, understandably to distinguish the file source and avoid conflicts. This tho means i have to change hundreds of lines on code on as many files. Some are dynamic and not as easy to change with find/replace. Beside i dont want to re-run all test batteries.

Is there a way to default to have L10n as default for Localizable (and the rest using su contianers/structs)? WHat is the best approach to follow? Is there some parameter i can change or i have to create a custom template/generator?

I would suggest also, to remove this shortcut or make the L10n.Localizable.stringKey form default, since this is bound to happen for most projects i would guess, but i couldn't find a warning.

Thank you