Config file: translation_replace

I tried to use the translation_replace parameter, but it didn’t work:

#
# Choose file structure in Crowdin
# e.g. true or false
#
"preserve_hierarchy": true

#
# Files configuration
#
files:
  [
    {
      "source": "/jinja2/*_pt-BR.html",
      "translation": "/jinja2/%original_file_name%_%locale%.%file_extension%",
      "translation_replace": { "_pt-BR": "" }
    },
  ]

And the output for crowdin upload --dryrun:

$ yarn crowdin upload --dryrun
[OK] Fetching project info 
[OK] File 'jinja2\paymentLink_pt-BR.html'

But, if I am right, it was supposed to rename from jinja2\paymentLink_pt-BR.html to jinja2\paymentLink.html

1 Like

Hi, no, it works in another way. It should be renamed, but only at the export, when you export translations files. This feature doesn’t work when you uploading sources.

For sources, probably dest could help. At least I use it to make filenames more user friendly.