From f0834681ad9f3442b350991cfa84e1c22a958c72 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Tue, 9 Mar 2021 22:21:14 +0100 Subject: [PATCH] Add post listing type translations --- lib/l10n/intl_ar.arb | 10 +- lib/l10n/intl_ca.arb | 10 +- lib/l10n/intl_da.arb | 4 +- lib/l10n/intl_de.arb | 4 +- lib/l10n/intl_el.arb | 10 +- lib/l10n/intl_en.arb | 18 ++- lib/l10n/intl_eo.arb | 10 +- lib/l10n/intl_es.arb | 10 +- lib/l10n/intl_eu.arb | 10 +- lib/l10n/intl_fa.arb | 3 +- lib/l10n/intl_fi.arb | 3 +- lib/l10n/intl_fr.arb | 10 +- lib/l10n/intl_ga.arb | 10 +- lib/l10n/intl_hu.arb | 3 +- lib/l10n/intl_it.arb | 10 +- lib/l10n/intl_ja.arb | 4 +- lib/l10n/intl_ka.arb | 3 +- lib/l10n/intl_ko.arb | 10 +- lib/l10n/intl_nl.arb | 3 +- lib/l10n/intl_pl.arb | 9 +- lib/l10n/intl_pt_BR.arb | 4 +- lib/l10n/intl_ru.arb | 8 +- lib/l10n/intl_sq.arb | 3 +- lib/l10n/intl_sv.arb | 9 +- lib/l10n/intl_tr.arb | 3 +- lib/l10n/intl_uk.arb | 3 +- lib/l10n/intl_zh.arb | 10 +- lib/l10n/l10n_api.dart | 12 +- lib/l10n/l10n_from_string.dart | 24 ++++ lib/l10n/untranslated.json | 204 +++++++++++++++++++++++++---- lib/widgets/post_list_options.dart | 3 +- scripts/migrate_lemmy_l10n.dart | 8 ++ 32 files changed, 391 insertions(+), 54 deletions(-) diff --git a/lib/l10n/intl_ar.arb b/lib/l10n/intl_ar.arb index 2176071..397180b 100644 --- a/lib/l10n/intl_ar.arb +++ b/lib/l10n/intl_ar.arb @@ -69,5 +69,13 @@ "old_password": "الكلمة السرية القديمة", "show_avatars": "إظهار الصور الرمزية", "search": "البحث", - "send_message": "أرسل الرسالة" + "send_message": "أرسل الرسالة", + "top_day": "المتداول", + "top_week": "المتداول هذا", + "top_month": "المتداول هذا", + "top_year": "المتداول هذه", + "top_all": "المتداولة", + "most_comments": "الأكثر", + "new_comments": "الأحدث", + "active": "النشط" } diff --git a/lib/l10n/intl_ca.arb b/lib/l10n/intl_ca.arb index 1678fe0..b615dc4 100644 --- a/lib/l10n/intl_ca.arb +++ b/lib/l10n/intl_ca.arb @@ -120,5 +120,13 @@ "old_password": "Contrasenya antiga", "show_avatars": "Mostra els avatars", "search": "Cerca", - "send_message": "Envia el missatge" + "send_message": "Envia el missatge", + "top_day": "El millor del dia", + "top_week": "El millor de la setmana", + "top_month": "El millor del mes", + "top_year": "El millor de l'any", + "top_all": "El millor de tots els temps", + "most_comments": "Més comentaris", + "new_comments": "Comentaris nous", + "active": "Actiu" } diff --git a/lib/l10n/intl_da.arb b/lib/l10n/intl_da.arb index 6c08b01..ce6958b 100644 --- a/lib/l10n/intl_da.arb +++ b/lib/l10n/intl_da.arb @@ -120,5 +120,7 @@ "old_password": "Tidligere Kodeord", "show_avatars": "Vis Avatarer", "search": "Søg", - "send_message": "Send Besked" + "send_message": "Send Besked", + "top_day": "Top dag", + "active": "Active" } diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index dadb2a4..bfcff43 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -116,5 +116,7 @@ "old_password": "Letztes Passwort", "show_avatars": "Avatare anzeigen", "search": "Suchen", - "send_message": "Nachricht absenden" + "send_message": "Nachricht absenden", + "top_day": "Top täglich", + "active": "Aktiv" } diff --git a/lib/l10n/intl_el.arb b/lib/l10n/intl_el.arb index fb63d0f..999bc4e 100644 --- a/lib/l10n/intl_el.arb +++ b/lib/l10n/intl_el.arb @@ -120,5 +120,13 @@ "old_password": "Παλιός κωδικός", "show_avatars": "Εμφάνιση των άβαταρς", "search": "Αναζήτηση", - "send_message": "Αποστολή μηνύματος" + "send_message": "Αποστολή μηνύματος", + "top_day": "Κορυφαία σήμερα", + "top_week": "Κορυφαία της εβδομάδας", + "top_month": "Κορυφαία του μήνα", + "top_year": "Κορυφαία φέτος", + "top_all": "Κορυφαία από πάντα", + "most_comments": "Περισσότερα σχόλια", + "new_comments": "Νέα σχόλια", + "active": "Δραστηριότητα" } diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 86946e8..582bb97 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -269,5 +269,21 @@ "search": "search", "@search": {}, "send_message": "Send message", - "@send_message": {} + "@send_message": {}, + "top_day": "Top Day", + "@top_day": {}, + "top_week": "Top Week", + "@top_week": {}, + "top_month": "Top Month", + "@top_month": {}, + "top_year": "Top Year", + "@top_year": {}, + "top_all": "Top All Time", + "@top_all": {}, + "most_comments": "Most Comments", + "@most_comments": {}, + "new_comments": "New Comments", + "@new_comments": {}, + "active": "Active", + "@active": {} } diff --git a/lib/l10n/intl_eo.arb b/lib/l10n/intl_eo.arb index 0040c9d..83c7d3d 100644 --- a/lib/l10n/intl_eo.arb +++ b/lib/l10n/intl_eo.arb @@ -120,5 +120,13 @@ "old_password": "Malnova pasvorto", "show_avatars": "Montri profilbildojn", "search": "Serĉi", - "send_message": "Sendi mesaĝon" + "send_message": "Sendi mesaĝon", + "top_day": "Supraj tagaj", + "top_week": "Supraj semajnaj", + "top_month": "Supraj monataj", + "top_year": "Supraj jaraj", + "top_all": "Supraj ĉiamaj", + "most_comments": "Plej komentitaj", + "new_comments": "Nove komentitaj", + "active": "Aktiva" } diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index cc741dc..98f9a1b 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -120,5 +120,13 @@ "old_password": "Antigua contraseña", "show_avatars": "Mostrar avatares", "search": "Buscar", - "send_message": "Enviar mensaje" + "send_message": "Enviar mensaje", + "top_day": "Lo mejor del día", + "top_week": "Lo mejor de la semana", + "top_month": "Lo mejor del mes", + "top_year": "Lo mejor del año", + "top_all": "Lo mejor de todos los tiempos", + "most_comments": "La mayoría de los comentarios", + "new_comments": "Nuevos Comentarios", + "active": "Activo" } diff --git a/lib/l10n/intl_eu.arb b/lib/l10n/intl_eu.arb index d124beb..57a4f28 100644 --- a/lib/l10n/intl_eu.arb +++ b/lib/l10n/intl_eu.arb @@ -120,5 +120,13 @@ "old_password": "Aurreko pasahitza", "show_avatars": "Erakutsi avatarrak", "search": "Bilatu", - "send_message": "Bidali mezua" + "send_message": "Bidali mezua", + "top_day": "Gaur pil-pilean", + "top_week": "Asteko Onena", + "top_month": "Hilabeteko Onena", + "top_year": "Urteko Onena", + "top_all": "Onena", + "most_comments": "Iruzkin gehienak", + "new_comments": "Iruzkin berriak", + "active": "Aktibo" } diff --git a/lib/l10n/intl_fa.arb b/lib/l10n/intl_fa.arb index 2d772a7..7164766 100644 --- a/lib/l10n/intl_fa.arb +++ b/lib/l10n/intl_fa.arb @@ -77,5 +77,6 @@ "verify_password": "تایید گذرواژه", "old_password": "پسورد پیشین", "show_avatars": "نمایش آواتارها", - "search": "جستجو" + "search": "جستجو", + "top_day": "بهترین‌های روز" } diff --git a/lib/l10n/intl_fi.arb b/lib/l10n/intl_fi.arb index 7d8f731..7dc055c 100644 --- a/lib/l10n/intl_fi.arb +++ b/lib/l10n/intl_fi.arb @@ -105,5 +105,6 @@ "old_password": "Vanha salasana", "show_avatars": "Näytä avatarit", "search": "Etsi", - "send_message": "Lähetä viesti" + "send_message": "Lähetä viesti", + "top_day": "Päivän parhaimmat" } diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 5b892ad..dea7462 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -119,5 +119,13 @@ "old_password": "Ancien mot de passe", "show_avatars": "Afficher les avatars", "search": "Rechercher", - "send_message": "Envoyer le message" + "send_message": "Envoyer le message", + "top_day": "Top du jour", + "top_week": "Top de la semaine", + "top_month": "Top du mois", + "top_year": "Top de l'année", + "top_all": "Top", + "most_comments": "Plus commentés", + "new_comments": "Nouveaux commentaires", + "active": "Actif" } diff --git a/lib/l10n/intl_ga.arb b/lib/l10n/intl_ga.arb index da41eb4..aacb618 100644 --- a/lib/l10n/intl_ga.arb +++ b/lib/l10n/intl_ga.arb @@ -111,5 +111,13 @@ "old_password": "Sean Pasfhocal", "show_avatars": "Taispeáin Abhatáranna", "search": "Cuardaigh", - "send_message": "Seol Teachtaireacht" + "send_message": "Seol Teachtaireacht", + "top_day": "Lá Barr", + "top_week": "Seachtain Barr", + "top_month": "Barr Mí", + "top_year": "Bar Bliain", + "top_all": "Barr an Ama Uile", + "most_comments": "Tuairimí an chuid is mó", + "new_comments": "Tráchtaireachtaí Nua", + "active": "Gnóthach" } diff --git a/lib/l10n/intl_hu.arb b/lib/l10n/intl_hu.arb index 5fd456a..f44c578 100644 --- a/lib/l10n/intl_hu.arb +++ b/lib/l10n/intl_hu.arb @@ -106,5 +106,6 @@ "old_password": "Régi jelszó", "show_avatars": "Avatárok mutatása", "search": "Keresés", - "send_message": "Üzenet küldése" + "send_message": "Üzenet küldése", + "top_day": "A nap bejegyzése" } diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index ac03221..2c878d4 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -120,5 +120,13 @@ "old_password": "Vecchia Password", "show_avatars": "Mostra Avatar", "search": "Cerca", - "send_message": "Invia Messaggio" + "send_message": "Invia Messaggio", + "top_day": "Migliori della giornata", + "top_week": "Migliori della settimana", + "top_month": "Migliori del mese", + "top_year": "Migliori dell'anno", + "top_all": "Migliori di sempre", + "most_comments": "Più commenti", + "new_comments": "Nuovi Commenti", + "active": "Attivi" } diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index 2e8ec04..2e599ed 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -107,5 +107,7 @@ "old_password": "現在のパスワード", "show_avatars": "アバターを表示", "search": "検索", - "send_message": "メッセージを送信" + "send_message": "メッセージを送信", + "top_day": "日間トップ", + "active": "活発さ" } diff --git a/lib/l10n/intl_ka.arb b/lib/l10n/intl_ka.arb index 102b0db..6252aa9 100644 --- a/lib/l10n/intl_ka.arb +++ b/lib/l10n/intl_ka.arb @@ -101,5 +101,6 @@ "old_password": "ძველი პაროლი", "show_avatars": "ავატარები გამოჩენა", "search": "ძებმა", - "send_message": "მესეჯის გაგზავნა" + "send_message": "მესეჯის გაგზავნა", + "top_day": "ტოპ დღეს" } diff --git a/lib/l10n/intl_ko.arb b/lib/l10n/intl_ko.arb index 2397205..82cf9d5 100644 --- a/lib/l10n/intl_ko.arb +++ b/lib/l10n/intl_ko.arb @@ -120,5 +120,13 @@ "old_password": "기존 비밀번호", "show_avatars": "아바타 보기", "search": "검색", - "send_message": "메세지 전송" + "send_message": "메세지 전송", + "top_day": "일별", + "top_week": "주별", + "top_month": "월별", + "top_year": "년간", + "top_all": "전체", + "most_comments": "최근 댓글", + "new_comments": "새 덧글", + "active": "활발한" } diff --git a/lib/l10n/intl_nl.arb b/lib/l10n/intl_nl.arb index eb31533..f470e9f 100644 --- a/lib/l10n/intl_nl.arb +++ b/lib/l10n/intl_nl.arb @@ -106,5 +106,6 @@ "old_password": "Oud wachtwoord", "show_avatars": "Toon avatars", "search": "Zoek", - "send_message": "Verstuur bericht" + "send_message": "Verstuur bericht", + "top_day": "Dagelijkse top" } diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index b5941f2..3bfe675 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -115,5 +115,12 @@ "old_password": "Stare Hasło", "show_avatars": "Pokaż Awatary", "search": "Szukaj", - "send_message": "Wyślij Wiadomość" + "send_message": "Wyślij Wiadomość", + "top_day": "Najpopularniejsze dziś", + "top_week": "Najpopularniejsze tydzień", + "top_month": "Najpopularniejsze miesiąc", + "top_year": "Najpopularniejsze rok", + "top_all": "Najpopularniejsze kiedykolwiek", + "most_comments": "Najwięcej komentarzy", + "active": "Aktywne" } diff --git a/lib/l10n/intl_pt_BR.arb b/lib/l10n/intl_pt_BR.arb index 42a2882..5fe7708 100644 --- a/lib/l10n/intl_pt_BR.arb +++ b/lib/l10n/intl_pt_BR.arb @@ -116,5 +116,7 @@ "old_password": "Senha antiga", "show_avatars": "Mostrar Avatares", "search": "Busca", - "send_message": "Enviar mensagem" + "send_message": "Enviar mensagem", + "top_day": "Top do dia", + "active": "Ativo" } diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 0de32dc..062ab17 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -115,5 +115,11 @@ "old_password": "Действующий пароль", "show_avatars": "Показывать аватары", "search": "Поиск", - "send_message": "Послать сообщение" + "send_message": "Послать сообщение", + "top_day": "Лучшее за день", + "top_week": "Лучшее за неделю", + "top_month": "Лучшее за месяц", + "top_year": "Лучшее за год", + "top_all": "Лучшее за все время", + "active": "Активное" } diff --git a/lib/l10n/intl_sq.arb b/lib/l10n/intl_sq.arb index e0bb169..ed4aca4 100644 --- a/lib/l10n/intl_sq.arb +++ b/lib/l10n/intl_sq.arb @@ -106,5 +106,6 @@ "old_password": "Fjalëkalimi i vjetër", "show_avatars": "Shfaq fotot e profilit", "search": "Kërko", - "send_message": "Dërgo Mesazh" + "send_message": "Dërgo Mesazh", + "top_day": "Më të pëlqyerat e ditës" } diff --git a/lib/l10n/intl_sv.arb b/lib/l10n/intl_sv.arb index 7ce4674..0ac1693 100644 --- a/lib/l10n/intl_sv.arb +++ b/lib/l10n/intl_sv.arb @@ -120,5 +120,12 @@ "old_password": "Gammalt lösenord", "show_avatars": "Visa profilbilder", "search": "Sök", - "send_message": "Skicka meddelande" + "send_message": "Skicka meddelande", + "top_day": "Dagstoppen", + "top_week": "Veckotoppen", + "top_month": "Månadstoppen", + "top_year": "Årstoppen", + "top_all": "Totaltoppen", + "most_comments": "Flest kommentarer", + "active": "Aktivt" } diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index b8f251d..7f4caef 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -106,5 +106,6 @@ "old_password": "Eski şifre", "show_avatars": "Avatarları Göster", "search": "Ara", - "send_message": "Mesaj Yolla" + "send_message": "Mesaj Yolla", + "top_day": "Günün en iyileri" } diff --git a/lib/l10n/intl_uk.arb b/lib/l10n/intl_uk.arb index 62c0f83..7e7a3b0 100644 --- a/lib/l10n/intl_uk.arb +++ b/lib/l10n/intl_uk.arb @@ -101,5 +101,6 @@ "old_password": "Діючий пароль", "show_avatars": "Показувати аватари", "search": "Пошук", - "send_message": "Послати повідомлення" + "send_message": "Послати повідомлення", + "top_day": "Найкраще за день" } diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb index ab521bb..23daad9 100644 --- a/lib/l10n/intl_zh.arb +++ b/lib/l10n/intl_zh.arb @@ -120,5 +120,13 @@ "old_password": "当前密码", "show_avatars": "显示头像", "search": "搜索", - "send_message": "发送消息" + "send_message": "发送消息", + "top_day": "日推荐", + "top_week": "周推荐", + "top_month": "月推荐", + "top_year": "年推荐", + "top_all": "全部推荐", + "most_comments": "最多评论", + "new_comments": "新评论", + "active": "活跃" } diff --git a/lib/l10n/l10n_api.dart b/lib/l10n/l10n_api.dart index 5ec08f7..3667c1f 100644 --- a/lib/l10n/l10n_api.dart +++ b/lib/l10n/l10n_api.dart @@ -10,15 +10,23 @@ extension SortTypeL10n on SortType { case SortType.new_: return L10n.of(context).new_; case SortType.topYear: + return L10n.of(context).top_year; case SortType.topMonth: + return L10n.of(context).top_month; + case SortType.topWeek: + return L10n.of(context).top_week; case SortType.topDay: + return L10n.of(context).top_day; case SortType.topAll: + return L10n.of(context).top_all; case SortType.newComments: + return L10n.of(context).new_comments; case SortType.active: + return L10n.of(context).active; case SortType.mostComments: + return L10n.of(context).most_comments; default: - // TODO: l10n string - return value; + throw Exception('unreachable'); } } } diff --git a/lib/l10n/l10n_from_string.dart b/lib/l10n/l10n_from_string.dart index 54117c2..5f873d1 100644 --- a/lib/l10n/l10n_from_string.dart +++ b/lib/l10n/l10n_from_string.dart @@ -133,6 +133,14 @@ abstract class L10nStrings { static const show_avatars = 'show_avatars'; static const search = 'search'; static const send_message = 'send_message'; + static const top_day = 'top_day'; + static const top_week = 'top_week'; + static const top_month = 'top_month'; + static const top_year = 'top_year'; + static const top_all = 'top_all'; + static const most_comments = 'most_comments'; + static const new_comments = 'new_comments'; + static const active = 'active'; } extension L10nFromString on String { @@ -372,6 +380,22 @@ extension L10nFromString on String { return L10n.of(context).search; case L10nStrings.send_message: return L10n.of(context).send_message; + case L10nStrings.top_day: + return L10n.of(context).top_day; + case L10nStrings.top_week: + return L10n.of(context).top_week; + case L10nStrings.top_month: + return L10n.of(context).top_month; + case L10nStrings.top_year: + return L10n.of(context).top_year; + case L10nStrings.top_all: + return L10n.of(context).top_all; + case L10nStrings.most_comments: + return L10n.of(context).most_comments; + case L10nStrings.new_comments: + return L10n.of(context).new_comments; + case L10nStrings.active: + return L10n.of(context).active; default: return this; diff --git a/lib/l10n/untranslated.json b/lib/l10n/untranslated.json index aaf4462..047df3d 100644 --- a/lib/l10n/untranslated.json +++ b/lib/l10n/untranslated.json @@ -59,7 +59,13 @@ ], "da": [ - "not_a_mod_or_admin" + "not_a_mod_or_admin", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments" ], "de": [ @@ -67,7 +73,13 @@ "report_reason_required", "report_too_long", "couldnt_create_report", - "couldnt_resolve_report" + "couldnt_resolve_report", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments" ], "el": [ @@ -130,7 +142,14 @@ "subscribe", "messages", "banned_users", - "send_message" + "send_message", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "fi": [ @@ -149,7 +168,14 @@ "invalid_password", "captcha_incorrect", "invalid_username", - "bio_length_overflow" + "bio_length_overflow", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "fr": [ @@ -292,7 +318,15 @@ "old_password", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "hi": [ @@ -396,7 +430,15 @@ "new_password", "verify_password", "old_password", - "search" + "search", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "hr": [ @@ -521,7 +563,15 @@ "old_password", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "hu": [ @@ -539,7 +589,14 @@ "not_a_moderator", "invalid_password", "captcha_incorrect", - "bio_length_overflow" + "bio_length_overflow", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "it": [ @@ -560,7 +617,13 @@ "invalid_password", "captcha_incorrect", "invalid_username", - "banned_users" + "banned_users", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments" ], "ka": [ @@ -583,7 +646,14 @@ "bio_length_overflow", "couldnt_update_private_message", "couldnt_create_private_message", - "no_private_message_edit_allowed" + "no_private_message_edit_allowed", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "km": [ @@ -708,7 +778,15 @@ "old_password", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "ko": [ @@ -730,7 +808,14 @@ "not_a_moderator", "invalid_password", "captcha_incorrect", - "bio_length_overflow" + "bio_length_overflow", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "oc": [ @@ -855,7 +940,15 @@ "old_password", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "pl": [ @@ -864,7 +957,8 @@ "number_of_comments", "number_of_posts", "number_of_subscribers", - "number_of_users" + "number_of_users", + "new_comments" ], "pt": [ @@ -989,7 +1083,15 @@ "old_password", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "pt_BR": [ @@ -997,7 +1099,13 @@ "report_reason_required", "report_too_long", "couldnt_create_report", - "couldnt_resolve_report" + "couldnt_resolve_report", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments" ], "ru": [ @@ -1006,7 +1114,9 @@ "number_of_comments", "number_of_posts", "number_of_subscribers", - "number_of_users" + "number_of_users", + "most_comments", + "new_comments" ], "sq": [ @@ -1024,7 +1134,14 @@ "not_a_moderator", "invalid_password", "captcha_incorrect", - "bio_length_overflow" + "bio_length_overflow", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "sr": [ @@ -1149,7 +1266,15 @@ "old_password", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "sr_Latn": [ @@ -1252,11 +1377,20 @@ "delete_account_confirm", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "sv": [ - "not_a_mod_or_admin" + "not_a_mod_or_admin", + "new_comments" ], "th": [ @@ -1381,7 +1515,15 @@ "old_password", "show_avatars", "search", - "send_message" + "send_message", + "top_day", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "tr": [ @@ -1399,7 +1541,14 @@ "not_a_moderator", "invalid_password", "captcha_incorrect", - "bio_length_overflow" + "bio_length_overflow", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "uk": [ @@ -1422,7 +1571,14 @@ "number_of_comments", "number_of_posts", "number_of_subscribers", - "number_of_users" + "number_of_users", + "top_week", + "top_month", + "top_year", + "top_all", + "most_comments", + "new_comments", + "active" ], "zh": [ diff --git a/lib/widgets/post_list_options.dart b/lib/widgets/post_list_options.dart index 8ceb664..089ecb5 100644 --- a/lib/widgets/post_list_options.dart +++ b/lib/widgets/post_list_options.dart @@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:lemmy_api_client/v2.dart'; +import '../l10n/l10n.dart'; import 'radio_picker.dart'; /// Dropdown filters where you can change sorting or viewing type @@ -26,7 +27,7 @@ class PostListOptions extends StatelessWidget { values: SortType.values, groupValue: sortValue, onChanged: onSortChanged, - mapValueToString: (value) => value.value, + mapValueToString: (value) => value.tr(context), ), const Spacer(), if (styleButton) diff --git a/scripts/migrate_lemmy_l10n.dart b/scripts/migrate_lemmy_l10n.dart index cf80dbd..5489d7d 100644 --- a/scripts/migrate_lemmy_l10n.dart +++ b/scripts/migrate_lemmy_l10n.dart @@ -166,6 +166,14 @@ const toMigrate = <_>[ _('show_avatars', decapitalize: true), _('search', toLowerCase: true), _('send_message', decapitalize: true), + _('top_day'), + _('top_week'), + _('top_month'), + _('top_year'), + _('top_all'), + _('most_comments'), + _('new_comments'), + _('active'), ]; const repoName = 'lemmy-translations';