Skip to content

Commit

Permalink
Update languages lists
Browse files Browse the repository at this point in the history
  • Loading branch information
atuchin-m committed Oct 7, 2021
1 parent f7eb691 commit dcc3ec7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Expand Up @@ -8,12 +8,16 @@
namespace translate {

bool IsSourceLanguageCodeSupported(const std::string& lang_code) {
return lang_code == "fr" || lang_code == "en" || lang_code == "de" ||
lang_code == "und";
// Note: keep sync with language/language.go (brave/go-translate repo)
return lang_code == "und" || lang_code == "en" || lang_code == "es" ||
lang_code == "et" || lang_code == "it" || lang_code == "pt" ||
lang_code == "ru";
}

bool IsTargetLanguageCodeSupported(const std::string& lang_code) {
return lang_code == "en" || lang_code == "ru";
// Note: keep sync with language/language.go (brave/go-translate repo)
return lang_code == "de" || lang_code == "en" || lang_code == "es" ||
lang_code == "et" || lang_code == "ru";
}

} // namespace translate
Expand Up @@ -10,8 +10,12 @@

namespace translate {

// Returns true if the source language |lang_code| is supported by Brave
// backend.
bool IsSourceLanguageCodeSupported(const std::string& lang_code);

// Returns true if the target language |lang_code| is supported by Brave
// backend.
bool IsTargetLanguageCodeSupported(const std::string& lang_code);

} // namespace translate
Expand Down

0 comments on commit dcc3ec7

Please sign in to comment.