I'm trying to convert the keys of Localizable.strings from snake case to camel case on a Mac. I can use gsed since it supports \U for uppercase.
My files looks like this:
/* Title */
"home.title" = "Welcome";
/* Email */
"home.signup_email" = "Email";
/* recover_email */
"home.signup_email_recover" = "Recover Email";
/* password */
"home.password" = "Enter your __Password__:";
I'm expecting to modify this file to obtain this:
/* Title */
"home.title" = "Welcome";
/* Email */
"home.signupEmail" = "Email";
/* recover_email */
"home.signupEmailRecover" = "Recover Email";
/* password */
"home.password" = "Enter your __Password__:";
I tried using gsed with something like this but unfortunately, I'm not able to stop at after the = character.
find . -name "*.strings" | xargs gsed -i -e '/=/! s/_\([a-z]\)/\U\1/gi'
Any idea on how to stop replacing _ after =?
Thanks!