chore: New Crowdin updates (#2620)

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
This commit is contained in:
Lipis 2020-12-25 12:15:34 +02:00 committed by GitHub
parent 86c036505b
commit e9cb7ee77c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 914 additions and 649 deletions

View file

@ -4,7 +4,7 @@ import { EVENT_CHANGE, trackEvent } from "./analytics";
import fallbackLanguageData from "./locales/en.json";
import percentages from "./locales/percentages.json";
const COMPLETION_THRESHOLD_TO_EXCEED = 85;
const COMPLETION_THRESHOLD = 85;
interface Language {
lng: string;
@ -34,6 +34,7 @@ const allLanguages: Language[] = [
{ lng: "nl-NL", label: "Nederlands" },
{ lng: "nn-NO", label: "Norsk nynorsk" },
{ lng: "pl-PL", label: "Polski" },
{ lng: "pt-BR", label: "Português Brasileiro" },
{ lng: "pt-PT", label: "Português" },
{ lng: "ro-RO", label: "Română" },
{ lng: "ru-RU", label: "Русский" },
@ -51,8 +52,7 @@ export const languages: Language[] = [{ lng: "en", label: "English" }]
)
.filter(
(lang) =>
(percentages as Record<string, number>)[lang.lng] >
COMPLETION_THRESHOLD_TO_EXCEED,
(percentages as Record<string, number>)[lang.lng] >= COMPLETION_THRESHOLD,
);
let currentLanguage = languages[0];