Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Translate Multiple Fields #79

Open
Grunticus03 opened this issue Nov 20, 2018 · 2 comments
Open

Feature Request: Translate Multiple Fields #79

Grunticus03 opened this issue Nov 20, 2018 · 2 comments

Comments

@Grunticus03
Copy link

Grunticus03 commented Nov 20, 2018

Condensation of field and destination configuration options to a single configuration option as a hash, allowing multiple lookups and writes to separate fields where all other config options are the same.
Edit: This would not only reduce the complexity of the pipeline but also reduce the number of dictionary files that would need to be maintained by allowing merging of multiple smaller dictionary files with disparate terms.

For example, if I have three separate fields that contain the same value types to translate, I have to write out:

  translate {
    id => "Field1 Translate"
    dictionary_path => "/dictionaries/codes.yaml"
    field => "Field1"
    destination => "Field1Translate"
    refresh_behaviour => "replace"
  }
  translate {
    id => "Field2 Translate"
    dictionary_path => "/dictionaries/codes.yaml"
    field => "Field2"
    destination => "Field2Translate"
    refresh_behaviour => "replace"
  }
  translate {
    id => "Field3 Translate"
    dictionary_path => "/dictionaries/codes.yaml"
    field => "Field3"
    destination => "Field3Translate"
    refresh_behaviour => "replace"
  }

By converting the two options into a single hash type, it can be condensed down and would look like the following:

  translate {
    id => "Field Translate"
    dictionary_path => "/dictionaries/codes.yaml"
    translate => { 
      "Field1", "Field1Translate",
      "Field2", "Field2Translate",
      "Field3", "Field3Translate"
    }   
    refresh_behaviour => "replace"
  }
@schmandforke
Copy link

+1

1 similar comment
@chenyuheng
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants