Task #3583


No longer possible to overwrite translated strings using wlc

Added by Sophie Gautier about 2 years ago. Updated over 1 year ago.

Target version:
Team - Q2/2022
Start date:
Due date:
% Done:




Reported by Mikhel, I open a ticket to better track the issue:
Overwriting existing translations still fails for me, both with wlc and
curl. Example commands:

wlc --key "<my API key from Weblate>" --url "" upload --input
"master/libo_ui/svl/messages.po" --overwrite --method translate

curl -s -X POST -F method=translate -F overwrite=true -F
conflict=replace-translated -F file=@"master/libo_ui/svl/messages.po" -
H "authorization: Token <my API key>"


Previously untranslated or fuzzy strings get updated as expected.
Archive of the mail

Christian Lohmaier: could you have a look at what could go wrong?

Actions #1

Updated by Christian Lohmaier about 2 years ago

  • Target version set to Q2/2022

The old wlc bug was diagnoes to be a change in the API way back
→ the "conflict" (resolution strategy) flag needs to be set to "replace-translated"
That has been an API change way back for version 4.2 already.

The curl example uses the new flag, but also uses the no longer used overwrite parameter, not sure whether that causes some trouble. Sample file would have been nice...

response includes "skipped" with all strings - need to do some own testing...

Actions #2

Updated by Mihkel Tõnnov about 2 years ago

Thank you for looking into this, Christian.

For curl, the "overwrite" parameter doesn't seem to make a difference, but inspecting the upload page, I realised the parameter name should've been "conflicts" (plural):
curl -s -X POST -F method=translate -F conflicts=replace-translated -F file=@"master/libo_ui/svl/messages.po" -H "authorization: Token <my API key>" did the trick:


As for wlc (1.13), it doesn't accept "--conflict" as an argument: wlc --key <my API key> --url "" upload --input "master/libo_ui/svl/messages.po" --method translate --conflict replace-translated "libo_ui-master/svlmessages/et" returns:

usage: wlc [-h] [--format {text,csv,json,html}] [--version] [--debug] [--config CONFIG] [--config-section CONFIG_SECTION] [--key KEY] [--url URL]
           {version,list-projects,list-components,list-languages,list-translations,show,delete,ls,commit,push,pull,reset,cleanup,repo,changes,stats,lock-status,lock,unlock,download,upload} ...
wlc: error: unrecognized arguments: --conflict

Similar result with "--conflicts replace-translated" and just "--replace-translated".

Also tried with "--overwrite replace-translated" which returned:

Error: Object not found on the server (maybe operation is not supported on the server)

Anyway, at least curl works now -- and I can live with that :)
Thanks again!

Actions #3

Updated by Christian Lohmaier almost 2 years ago

  • Status changed from New to Resolved

wfm if it wfy :-)

Actions #4

Updated by Florian Effenberger over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF