forked from Public-Mirror/Textractor
Compare commits
1 Commits
master
...
google_rom
Author | SHA1 | Date | |
---|---|---|---|
|
ceb0dd68db |
@ -116,8 +116,8 @@ std::pair<bool, std::wstring> Translate(const std::wstring& text)
|
||||
if (httpRequest.response[0] == L'[')
|
||||
{
|
||||
std::wstring translation;
|
||||
for (std::wsmatch results; std::regex_search(httpRequest.response, results, std::wregex(L"\\[\"(.*?)\",[n\"]")); httpRequest.response = results.suffix())
|
||||
if (!IsHash(results[1])) translation += std::wstring(results[1]) + L" ";
|
||||
for (std::wsmatch results; std::regex_search(httpRequest.response, results, std::wregex(L"(?:\\[\\[|null,)\"([ -~]{3,}?)\"[,\\]]")); httpRequest.response = results.suffix())
|
||||
if (!IsHash(results[1])) translation += std::wstring(results[1]) + L"\n";
|
||||
if (!translation.empty()) return { true, translation };
|
||||
}
|
||||
return { false, FormatString(L"%s (TKK=%u)", TRANSLATION_ERROR, _InterlockedExchange(&TKK, 0)) };
|
||||
|
Loading…
x
Reference in New Issue
Block a user