diff --git a/extensions/translatewrapper.cpp b/extensions/translatewrapper.cpp index 05fc8ff..5a2e174 100644 --- a/extensions/translatewrapper.cpp +++ b/extensions/translatewrapper.cpp @@ -7,6 +7,7 @@ extern const char* SELECT_LANGUAGE; extern const char* SELECT_LANGUAGE_MESSAGE; +extern const char* LANGUAGE_SAVED; extern const wchar_t* TOO_MANY_TRANS_REQUESTS; extern const char* TRANSLATION_PROVIDER; @@ -52,6 +53,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ); translateTo->assign(S(language.split(": ")[1])); settings.setValue(LANGUAGE, S(translateTo->c_str())); + QMessageBox::information(nullptr, SELECT_LANGUAGE, QString(LANGUAGE_SAVED).arg(CONFIG_FILE)); }); QStringList savedCache = QString(QTextFile(CACHE_FILE, QIODevice::ReadOnly).readAll()).split("|T|\n", QString::SkipEmptyParts); diff --git a/text.cpp b/text.cpp index 4182128..e08b35f 100644 --- a/text.cpp +++ b/text.cpp @@ -116,6 +116,7 @@ const char* HIJACK_ERROR = u8"Textractor: Hijack ERROR"; const char* COULD_NOT_FIND = u8"Textractor: could not find text"; const char* SELECT_LANGUAGE = u8"Select language"; const char* SELECT_LANGUAGE_MESSAGE = u8"What language should %1 translate to?"; +const char* LANGUAGE_SAVED = u8"Translation language saved (you can delete it in the config file %1 then reopen Textractor to reselect)"; const wchar_t* TOO_MANY_TRANS_REQUESTS = L"Too many translation requests: refuse to make more"; const wchar_t* TRANSLATION_ERROR = L"Error while translating"; const char* EXTRA_WINDOW_INFO = u8R"(Right click to change settings