Closed qeude closed 2 months ago
Because it's an allowed character in variable names in Swift. R.swift tries to just take over your original asset name as the variable name used, only characters that aren't allowed to be used are cleaned up. When we need to do cleanup we do some formatting of the variable name to make sure things are still readable/logical.
I can see how homePageTitle
reads nicer in code, but I think it having a setting for it would be a bit overkill. I feel the maintenance load such settings bring to the codebase don't outweigh the benefit. I would advise to rename the localisable string key instead if possible.
👋 Hi!
I was just wondering why
_
was explicitly removed fromdisallowedCharacters
.I'm asking because it creates weird variables and methods names such as this: key
home_page.title
would becomeR.string.localizable.home_pageTitle
while it would be more elegant and Swifty to haveR.string.localizable.homePageTitle
.It could be great to at least have a configuration (like proposed here) to allow that if we don't want that behavior as a default one.
Thanks!