remove_locale() { # this is nonfatal sed, so '|| die' unneeded here sed -i -e "/TRANSLATIONS/s/translations\/${PN}_${1}.ts//" src/src.pro } sed can only fail if src/src.pro doesn't exist. Also, you shouldn't call this on locales that don't exist.
Thanks, fixed, but I don't know what you mean by "you shouldn't call this on locales that don't exist".