Skip to content

Commit 1bb388b

Browse files
committed
Crowdin: fix upload of same-as-source translations
The Crowdin API requires explicit flag, which is off by default, to accept translations that are identical to the source string. This is probably to allow upload of files that weren't changed (Crowdin tends to export files with source as translation), but that is something that Poedit never does, so it is safe to set importEqSuggestions.
1 parent ad6d976 commit 1bb388b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/crowdin_client.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,8 @@ dispatch::future<void> CrowdinClient::UploadFile(const std::string& file_buffer,
671671
"projects/" + std::to_string(meta->projectId) + "/translations/" + meta->lang.LanguageTag(),
672672
json_data({
673673
{ "storageId", storageId },
674-
{ "fileId", meta->fileId }
674+
{ "fileId", meta->fileId },
675+
{ "importEqSuggestions", true }
675676
}))
676677
.then([](json r) {
677678
wxLogTrace("poedit.crowdin", "File uploaded: %s", r.dump().c_str());

0 commit comments

Comments
 (0)