android-studio-plugin icon indicating copy to clipboard operation
android-studio-plugin copied to clipboard

New import options for translations upload

Open andrii-bodnar opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

Currently, the "Upload Translations" option is not configurable and doesn't allow applying additional import options to the uploaded translations.

The Upload Translations API supports the following request parameters:

  • importEqSuggestions - Defines whether to add translation if it's the same as the source string
  • autoApproveImported - Mark uploaded translations as approved
  • translateHidden - Allow translations upload to hidden source strings

Describe the solution you'd like

  1. Add a new configuration options to the crowdin.properties configuration file:
# Applies to the default behavior and all filegroups that do not have such a configuration
import-eq-suggestions=true/false
auto-approve-imported=true/false
translate-hidden=true/false

# Ability to configure for specific file groups
# higher priority
files.1.import-eq-suggestions=true/false
files.1.auto-approve-imported=true/false
files.1.translate-hidden=true/false

files.2.import-eq-suggestions=true/false
...
  1. Pass new values from the config to the UploadTranslationsAction > RequestBuilder.uploadTranslation
  2. Describe new configurations in the Readme.

andrii-bodnar avatar Oct 04 '22 07:10 andrii-bodnar

@andrii-bodnar Can I try taking this up?

jivjen avatar Oct 06 '22 11:10 jivjen

@jivjen sure, thank you!

andrii-bodnar avatar Oct 06 '22 11:10 andrii-bodnar

@andrii-bodnar Created the below PR. Could you please help review it? https://github.com/crowdin/android-studio-plugin/pull/81

jivjen avatar Oct 06 '22 12:10 jivjen