mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-14 05:52:55 +00:00
Feat: support for alternative translations
This commit is contained in:
parent
f7a35db05b
commit
ba8b8d97a1
5 changed files with 66 additions and 31 deletions
|
@ -134,6 +134,7 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||
' source: ' + this.$options.filters.escape(this.sourceLang) + ',',
|
||||
' target: ' + this.$options.filters.escape(this.targetLang) + ',',
|
||||
' format: "' + (this.isHtml ? "html" : "text") + '",',
|
||||
' alternatives: 3,',
|
||||
' api_key: "' + (localStorage.getItem("api_key") || "") + '"',
|
||||
' }),',
|
||||
' headers: { "Content-Type": "application/json" }',
|
||||
|
@ -241,6 +242,7 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||
data.append("source", self.sourceLang);
|
||||
data.append("target", self.targetLang);
|
||||
data.append("format", self.isHtml ? "html" : "text");
|
||||
data.append("alternatives", 3);
|
||||
data.append("api_key", localStorage.getItem("api_key") || "");
|
||||
if (self.apiSecret) data.append("secret", self.apiSecret);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue