Add post listing type translations

This commit is contained in:
shilangyu 2021-03-09 22:21:14 +01:00
parent e4ebcb31ec
commit f0834681ad
32 changed files with 391 additions and 54 deletions

View File

@ -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": "النشط"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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": "Δραστηριότητα"
}

View File

@ -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": {}
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -77,5 +77,6 @@
"verify_password": "تایید گذرواژه",
"old_password": "پسورد پیشین",
"show_avatars": "نمایش آواتارها",
"search": "جستجو"
"search": "جستجو",
"top_day": "بهترین‌های روز"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -107,5 +107,7 @@
"old_password": "現在のパスワード",
"show_avatars": "アバターを表示",
"search": "検索",
"send_message": "メッセージを送信"
"send_message": "メッセージを送信",
"top_day": "日間トップ",
"active": "活発さ"
}

View File

@ -101,5 +101,6 @@
"old_password": "ძველი პაროლი",
"show_avatars": "ავატარები გამოჩენა",
"search": "ძებმა",
"send_message": "მესეჯის გაგზავნა"
"send_message": "მესეჯის გაგზავნა",
"top_day": "ტოპ დღეს"
}

View File

@ -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": "활발한"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -115,5 +115,11 @@
"old_password": "Действующий пароль",
"show_avatars": "Показывать аватары",
"search": "Поиск",
"send_message": "Послать сообщение"
"send_message": "Послать сообщение",
"top_day": "Лучшее за день",
"top_week": "Лучшее за неделю",
"top_month": "Лучшее за месяц",
"top_year": "Лучшее за год",
"top_all": "Лучшее за все время",
"active": "Активное"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -101,5 +101,6 @@
"old_password": "Діючий пароль",
"show_avatars": "Показувати аватари",
"search": "Пошук",
"send_message": "Послати повідомлення"
"send_message": "Послати повідомлення",
"top_day": "Найкраще за день"
}

View File

@ -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": "活跃"
}

View File

@ -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');
}
}
}

View File

@ -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;

View File

@ -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": [

View File

@ -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)

View File

@ -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';