FlineDev/BartyCrouch

Would you like to add optional parameters for transform?

PB-1996 opened this issue · 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: