BartyCrouch icon indicating copy to clipboard operation
BartyCrouch copied to clipboard

Would you like to add optional parameters for transform?

Open PB-1996 opened this issue 3 years ago • 0 comments

Problem Statement

I want to make custom name for SwiftGen enum instead of L10n. SwiftGen supports custom type name for generation, but BartyCrouch transform method can use only L10n name for "swiftgenStructured" transform.

Suggested Solution

Add optional parameters dictionary. For example: transformerParameters You could describe supported parameters for each transform method. So for "swiftgenStructured" you could define type parameter key.

Example Usage

This way setup would look like:

[update.transform] codePaths = ["."] localizablePaths = ["."] transformer = "swiftgenStructured" supportedLanguageEnumPath = "." typeName = "BartyCrouch" translateMethodName = "translate"

[update.transform.transformerParameters] type = "Localization"

Possible Involvement

  • I could help with implementation:
  • I could help with testing:

PB-1996 avatar Nov 21 '20 10:11 PB-1996