Skip to content

Commit

Permalink
Better cordoning off of translation completion filtering
Browse files Browse the repository at this point in the history
(cherry-picked from commit 9c5ec1c)
  • Loading branch information
Vultraz committed Oct 7, 2018
1 parent 5a7fbf3 commit 48789ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/language.cpp
Expand Up @@ -43,7 +43,11 @@ namespace {
language_def current_language;
std::vector<config> languages_;
utils::string_map strings_;

// This should be enabled for stable releases.
#ifdef ENABLE_TRANSLATION_COMPLETION_FILTERING
const int MIN_TRANSLATION_PERCENT = 80;
#endif
}

static language_list known_languages;
Expand Down Expand Up @@ -117,7 +121,7 @@ language_list get_languages()
// We sort every time, the local might have changed which can modify the
// sort order.
std::sort(known_languages.begin(), known_languages.end());
#if 0
#ifdef ENABLE_TRANSLATION_COMPLETION_FILTERING
language_list result;
std::copy_if(known_languages.begin(), known_languages.end(), std::back_inserter(result),
[](const language_def& lang) { return lang.percent >= MIN_TRANSLATION_PERCENT; });
Expand Down

0 comments on commit 48789ee

Please sign in to comment.