본문 바로가기
반응형

Lokalise git action upload skip?

Lokalise에 다국어 key들을 git action을 통해서 upload를 하는 과정에서 value 수정된 값이 기존 단어들이 skip이 되어 value 값들이 바뀌지 않고 그대로 유지되는 상황을 마지하게 되었다. 

 

이를 해결해보고자 Lokalise CLI 문서를 참고해 보았다. 

아래 코드를 보면 다양한 설정들이 있는데, 우리에게 필요한 내용은 '--replace-modified'이었던 것이다. 

이 명령어를 추가하면 수정된 value에 대한 key들도 인식하고 수정되어 업로드할 수 있다 :)

      --apply-tm                                   Enable to automatically apply 100% translation memory matches.
      --cleanup-mode                               Enable to delete all keys with all language translations that are not present in the uploaded file. You may want to make a snapshot of the project before importing new file, just in case.
      --convert-placeholders                       Enable to automatically convert placeholders to the Lokalise universal placeholders. (default true)
      --custom-translation-status-ids int64Slice   Custom translation status IDs to be added to translations. By default statuses are applied to created and updated translations. (default [])
      --custom-translation-status-inserted-keys    Add specified custom translation statuses to inserted keys (default true). Use --custom-translation-status-inserted-keys=false to disable. (default true)
      --custom-translation-status-skipped-keys     Add specified custom translation statuses to skipped keys.
      --custom-translation-status-updated-keys     Add specified custom translation statuses to updated keys (default true). Use --custom-translation-status-updated-keys=false to disable. (default true)
      --detect-icu-plurals                         Enable to automatically detect and parse ICU formatted plurals in your translations.
      --distinguish-by-file                        Enable to allow keys with similar names to coexist, in case they are assigned to different filenames.
      --file string                                Path to local file (required).
  -h, --help                                       help for upload
      --hidden-from-contributors                   Enable to automatically set newly created keys as 'Hidden from contributors'
      --include-path                               Include relative directory name in the filename when uploading.
      --keys-to-values                             Enable to automatically replace values with key names.
      --lang-iso string                            Language code of the translations in the file you are importing (required).
      --poll                                       Enable to wait until background file upload finishes with result
      --poll-timeout duration                      Specify custom file upload polling maximum duration. Default: 30s (default 30s)
      --replace-modified                           Enable to replace translations, that have been modified (in the file being uploaded).
      --skip-detect-lang-iso                       Skip automatic language detection by filename. Default: false
      --slashn-to-linebreak                        Enable to replace \n with a line break (default true). Use --slashn-to-linebreak=false to disable. (default true)
      --tag-inserted-keys                          Add specified tags to inserted keys (default true). Use --tag-inserted-keys=false to disable (default true)
      --tag-skipped-keys                           Add specified tags to skipped keys.
      --tag-updated-keys                           Add specified tags to updated keys (default true). Use tag-updated-keys=false to disable (default true)
      --tags strings                               Tag keys with the specified tags. By default tags are applied to created and updated keys.
      --use-automations                            Whether to run automations for this upload. (default true)

 

728x90
반응형