From 3fc3627f2d27b181269416f346f29d6451f7009a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 24 Feb 2023 11:59:48 +0200 Subject: SL-19209 WIP Switch MS Bing to MS Azure #2 --- indra/newview/llfloatertranslationsettings.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloatertranslationsettings.h') diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h index 2a15eacded..52523f4d4a 100644 --- a/indra/newview/llfloatertranslationsettings.h +++ b/indra/newview/llfloatertranslationsettings.h @@ -42,22 +42,22 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - void setBingVerified(bool ok, bool alert); + void setAzureVerified(bool ok, bool alert); void setGoogleVerified(bool ok, bool alert); void onClose(bool app_quitting); private: std::string getSelectedService() const; - std::string getEnteredBingKey() const; + LLSD getEnteredAzureKey() const; std::string getEnteredGoogleKey() const; void showAlert(const std::string& msg_name) const; void updateControlsEnabledState(); - void verifyKey(int service, const std::string& key, bool alert = true); + void verifyKey(int service, const LLSD& key, bool alert = true); void onEditorFocused(LLFocusableElement* control); - void onBingKeyEdited(); + void onAzureKeyEdited(); void onGoogleKeyEdited(); - void onBtnBingVerify(); + void onBtnAzureVerify(); void onBtnGoogleVerify(); void onBtnOK(); @@ -65,14 +65,16 @@ private: LLCheckBoxCtrl* mMachineTranslationCB; LLComboBox* mLanguageCombo; - LLLineEditor* mBingAPIKeyEditor; + LLComboBox* mAzureAPIEndpointEditor;; + LLLineEditor* mAzureAPIKeyEditor; + LLLineEditor* mAzureAPIRegionEditor; LLLineEditor* mGoogleAPIKeyEditor; LLRadioGroup* mTranslationServiceRadioGroup; - LLButton* mBingVerifyBtn; + LLButton* mAzureVerifyBtn; LLButton* mGoogleVerifyBtn; LLButton* mOKBtn; - bool mBingKeyVerified; + bool mAzureKeyVerified; bool mGoogleKeyVerified; }; -- cgit v1.2.3 From f7210db06ee677231b93b750c205cd0317a9901f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 28 Feb 2023 00:13:31 +0200 Subject: SL-19209 Switch MS Bing to MS Azure #3 --- indra/newview/llfloatertranslationsettings.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloatertranslationsettings.h') diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h index 52523f4d4a..f039d90e27 100644 --- a/indra/newview/llfloatertranslationsettings.h +++ b/indra/newview/llfloatertranslationsettings.h @@ -42,15 +42,15 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - void setAzureVerified(bool ok, bool alert); - void setGoogleVerified(bool ok, bool alert); + void setAzureVerified(bool ok, bool alert, S32 status); + void setGoogleVerified(bool ok, bool alert, S32 status); void onClose(bool app_quitting); private: std::string getSelectedService() const; LLSD getEnteredAzureKey() const; std::string getEnteredGoogleKey() const; - void showAlert(const std::string& msg_name) const; + void showAlert(const std::string& msg_name, S32 status) const; void updateControlsEnabledState(); void verifyKey(int service, const LLSD& key, bool alert = true); @@ -61,7 +61,7 @@ private: void onBtnGoogleVerify(); void onBtnOK(); - static void setVerificationStatus(int service, bool alert, bool ok); + static void setVerificationStatus(int service, bool alert, bool ok, S32 status); LLCheckBoxCtrl* mMachineTranslationCB; LLComboBox* mLanguageCombo; -- cgit v1.2.3 From 1d1a63abe4a3d3a6191172c1693ffbdb0ffb2d71 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 19 May 2023 19:56:57 +0300 Subject: SL-19635 Implement DeepL tranlation support --- indra/newview/llfloatertranslationsettings.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatertranslationsettings.h') diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h index f039d90e27..eff0803fdd 100644 --- a/indra/newview/llfloatertranslationsettings.h +++ b/indra/newview/llfloatertranslationsettings.h @@ -44,12 +44,14 @@ public: void setAzureVerified(bool ok, bool alert, S32 status); void setGoogleVerified(bool ok, bool alert, S32 status); + void setDeepLVerified(bool ok, bool alert, S32 status); void onClose(bool app_quitting); private: std::string getSelectedService() const; LLSD getEnteredAzureKey() const; std::string getEnteredGoogleKey() const; + LLSD getEnteredDeepLKey() const; void showAlert(const std::string& msg_name, S32 status) const; void updateControlsEnabledState(); void verifyKey(int service, const LLSD& key, bool alert = true); @@ -57,25 +59,31 @@ private: void onEditorFocused(LLFocusableElement* control); void onAzureKeyEdited(); void onGoogleKeyEdited(); + void onDeepLKeyEdited(); void onBtnAzureVerify(); void onBtnGoogleVerify(); + void onBtnDeepLVerify(); void onBtnOK(); static void setVerificationStatus(int service, bool alert, bool ok, S32 status); LLCheckBoxCtrl* mMachineTranslationCB; LLComboBox* mLanguageCombo; - LLComboBox* mAzureAPIEndpointEditor;; + LLComboBox* mAzureAPIEndpointEditor; LLLineEditor* mAzureAPIKeyEditor; LLLineEditor* mAzureAPIRegionEditor; LLLineEditor* mGoogleAPIKeyEditor; + LLComboBox* mDeepLAPIDomainCombo; + LLLineEditor* mDeepLAPIKeyEditor; LLRadioGroup* mTranslationServiceRadioGroup; LLButton* mAzureVerifyBtn; LLButton* mGoogleVerifyBtn; + LLButton* mDeepLVerifyBtn; LLButton* mOKBtn; bool mAzureKeyVerified; bool mGoogleKeyVerified; + bool mDeepLKeyVerified; }; #endif // LL_LLFLOATERTRANSLATIONSETTINGS_H -- cgit v1.2.3