During the implementation of Strings Catalog support for SwiftGen @jandrewmoore raised an issue with the output generation for localization keys that contain only placeholders, such as %@ %@.
In this case, SwiftGen generates the following code:
/// %1$@ %2$@
internal static func (_ p1: Any, _ p2: Any) -> String {
return L10n.tr("Localizable", "%@ %@", String(describing: p1), String(describing: p2), fallback: "%1$@ %2$@")
}
This output causes a compilation error.
Would it make sense to add a validation step to check if the identifier is not empty in such cases here?
During the implementation of Strings Catalog support for SwiftGen @jandrewmoore raised an issue with the output generation for localization keys that contain only placeholders, such as
%@ %@.In this case, SwiftGen generates the following code:
This output causes a compilation error.
Would it make sense to add a validation step to check if the identifier is not empty in such cases here?