Generate more strings

This commit is contained in:
shilangyu 2021-03-01 09:44:37 +01:00
parent 1c8b063434
commit 5c989679b6
3 changed files with 675 additions and 23 deletions

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
export 'package:flutter_gen/gen_l10n/l10n.dart'; export 'package:flutter_gen/gen_l10n/l10n.dart';
export 'l10n_from_string.dart'; export 'l10n_from_string.dart';
abstract class LocaleSerde { abstract class LocaleSerde {

View File

@ -128,6 +128,104 @@ extension L10nFromString on String {
return L10n.of(context).admin; return L10n.of(context).admin;
case 'by': case 'by':
return L10n.of(context).by; return L10n.of(context).by;
case 'not_an_admin':
return L10n.of(context).not_an_admin;
case 'couldnt_find_post':
return L10n.of(context).couldnt_find_post;
case 'not_logged_in':
return L10n.of(context).not_logged_in;
case 'site_ban':
return L10n.of(context).site_ban;
case 'community_ban':
return L10n.of(context).community_ban;
case 'downvotes_disabled':
return L10n.of(context).downvotes_disabled;
case 'invalid_url':
return L10n.of(context).invalid_url;
case 'locked':
return L10n.of(context).locked;
case 'couldnt_create_comment':
return L10n.of(context).couldnt_create_comment;
case 'couldnt_like_comment':
return L10n.of(context).couldnt_like_comment;
case 'couldnt_update_comment':
return L10n.of(context).couldnt_update_comment;
case 'no_comment_edit_allowed':
return L10n.of(context).no_comment_edit_allowed;
case 'couldnt_save_comment':
return L10n.of(context).couldnt_save_comment;
case 'couldnt_get_comments':
return L10n.of(context).couldnt_get_comments;
case 'report_reason_required':
return L10n.of(context).report_reason_required;
case 'report_too_long':
return L10n.of(context).report_too_long;
case 'couldnt_create_report':
return L10n.of(context).couldnt_create_report;
case 'couldnt_resolve_report':
return L10n.of(context).couldnt_resolve_report;
case 'invalid_post_title':
return L10n.of(context).invalid_post_title;
case 'couldnt_create_post':
return L10n.of(context).couldnt_create_post;
case 'couldnt_like_post':
return L10n.of(context).couldnt_like_post;
case 'couldnt_find_community':
return L10n.of(context).couldnt_find_community;
case 'couldnt_get_posts':
return L10n.of(context).couldnt_get_posts;
case 'no_post_edit_allowed':
return L10n.of(context).no_post_edit_allowed;
case 'couldnt_save_post':
return L10n.of(context).couldnt_save_post;
case 'site_already_exists':
return L10n.of(context).site_already_exists;
case 'couldnt_update_site':
return L10n.of(context).couldnt_update_site;
case 'invalid_community_name':
return L10n.of(context).invalid_community_name;
case 'community_already_exists':
return L10n.of(context).community_already_exists;
case 'community_moderator_already_exists':
return L10n.of(context).community_moderator_already_exists;
case 'community_follower_already_exists':
return L10n.of(context).community_follower_already_exists;
case 'not_a_moderator':
return L10n.of(context).not_a_moderator;
case 'couldnt_update_community':
return L10n.of(context).couldnt_update_community;
case 'no_community_edit_allowed':
return L10n.of(context).no_community_edit_allowed;
case 'system_err_login':
return L10n.of(context).system_err_login;
case 'community_user_already_banned':
return L10n.of(context).community_user_already_banned;
case 'couldnt_find_that_username_or_email':
return L10n.of(context).couldnt_find_that_username_or_email;
case 'password_incorrect':
return L10n.of(context).password_incorrect;
case 'registration_closed':
return L10n.of(context).registration_closed;
case 'invalid_password':
return L10n.of(context).invalid_password;
case 'passwords_dont_match':
return L10n.of(context).passwords_dont_match;
case 'captcha_incorrect':
return L10n.of(context).captcha_incorrect;
case 'invalid_username':
return L10n.of(context).invalid_username;
case 'bio_length_overflow':
return L10n.of(context).bio_length_overflow;
case 'couldnt_update_user':
return L10n.of(context).couldnt_update_user;
case 'couldnt_update_private_message':
return L10n.of(context).couldnt_update_private_message;
case 'couldnt_update_post':
return L10n.of(context).couldnt_update_post;
case 'couldnt_create_private_message':
return L10n.of(context).couldnt_create_private_message;
case 'no_private_message_edit_allowed':
return L10n.of(context).no_private_message_edit_allowed;
default: default:
return this; return this;

View File

@ -11,7 +11,46 @@
"from", "from",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"couldnt_find_post",
"invalid_url",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"invalid_password",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"ca": [ "ca": [
@ -22,7 +61,17 @@
"add_instance", "add_instance",
"sign_in", "sign_in",
"register", "register",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"bio_length_overflow"
], ],
"da": [ "da": [
@ -42,7 +91,11 @@
"appearance", "appearance",
"add_instance", "add_instance",
"sign_in", "sign_in",
"register" "register",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report"
], ],
"el": [ "el": [
@ -110,7 +163,26 @@
"saved", "saved",
"theme", "theme",
"old", "old",
"by" "by",
"invalid_url",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"invalid_community_name",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"community_user_already_banned",
"invalid_password",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_private_message",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"fi": [ "fi": [
@ -124,7 +196,18 @@
"local", "local",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_community_name",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow"
], ],
"fr": [ "fr": [
@ -134,7 +217,8 @@
"appearance", "appearance",
"add_instance", "add_instance",
"sign_in", "sign_in",
"register" "register",
"report_too_long"
], ],
"ga": [ "ga": [
@ -144,7 +228,11 @@
"appearance", "appearance",
"add_instance", "add_instance",
"sign_in", "sign_in",
"register" "register",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report"
], ],
"gl": [ "gl": [
@ -208,7 +296,56 @@
"top", "top",
"chat", "chat",
"admin", "admin",
"by" "by",
"not_an_admin",
"couldnt_find_post",
"not_logged_in",
"site_ban",
"community_ban",
"downvotes_disabled",
"invalid_url",
"locked",
"couldnt_create_comment",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"registration_closed",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"hi": [ "hi": [
@ -259,7 +396,51 @@
"old", "old",
"top", "top",
"chat", "chat",
"by" "by",
"not_an_admin",
"not_logged_in",
"site_ban",
"community_ban",
"downvotes_disabled",
"invalid_url",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"registration_closed",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"hr": [ "hr": [
@ -323,7 +504,56 @@
"top", "top",
"chat", "chat",
"admin", "admin",
"by" "by",
"not_an_admin",
"couldnt_find_post",
"not_logged_in",
"site_ban",
"community_ban",
"downvotes_disabled",
"invalid_url",
"locked",
"couldnt_create_comment",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"registration_closed",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"hu": [ "hu": [
@ -337,7 +567,17 @@
"local", "local",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"bio_length_overflow"
], ],
"it": [ "it": [
@ -358,7 +598,18 @@
"add_instance", "add_instance",
"sign_in", "sign_in",
"register", "register",
"local" "local",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"invalid_community_name",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"invalid_username"
], ],
"ka": [ "ka": [
@ -372,7 +623,22 @@
"local", "local",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"invalid_community_name",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_private_message",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"km": [ "km": [
@ -436,7 +702,56 @@
"top", "top",
"chat", "chat",
"admin", "admin",
"by" "by",
"not_an_admin",
"couldnt_find_post",
"not_logged_in",
"site_ban",
"community_ban",
"downvotes_disabled",
"invalid_url",
"locked",
"couldnt_create_comment",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"registration_closed",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"ko": [ "ko": [
@ -460,7 +775,17 @@
"local", "local",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"bio_length_overflow"
], ],
"oc": [ "oc": [
@ -524,7 +849,56 @@
"top", "top",
"chat", "chat",
"admin", "admin",
"by" "by",
"not_an_admin",
"couldnt_find_post",
"not_logged_in",
"site_ban",
"community_ban",
"downvotes_disabled",
"invalid_url",
"locked",
"couldnt_create_comment",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"registration_closed",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"pl": [ "pl": [
@ -596,7 +970,56 @@
"top", "top",
"chat", "chat",
"admin", "admin",
"by" "by",
"not_an_admin",
"couldnt_find_post",
"not_logged_in",
"site_ban",
"community_ban",
"downvotes_disabled",
"invalid_url",
"locked",
"couldnt_create_comment",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"registration_closed",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"pt_BR": [ "pt_BR": [
@ -606,7 +1029,11 @@
"appearance", "appearance",
"add_instance", "add_instance",
"sign_in", "sign_in",
"register" "register",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report"
], ],
"ru": [ "ru": [
@ -630,7 +1057,17 @@
"local", "local",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"bio_length_overflow"
], ],
"sr": [ "sr": [
@ -694,7 +1131,56 @@
"top", "top",
"chat", "chat",
"admin", "admin",
"by" "by",
"not_an_admin",
"couldnt_find_post",
"not_logged_in",
"site_ban",
"community_ban",
"downvotes_disabled",
"invalid_url",
"locked",
"couldnt_create_comment",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"registration_closed",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"sr_Latn": [ "sr_Latn": [
@ -741,7 +1227,54 @@
"new_", "new_",
"old", "old",
"top", "top",
"admin" "admin",
"not_an_admin",
"couldnt_find_post",
"not_logged_in",
"site_ban",
"community_ban",
"invalid_url",
"locked",
"couldnt_create_comment",
"couldnt_like_comment",
"couldnt_update_comment",
"no_comment_edit_allowed",
"couldnt_save_comment",
"couldnt_get_comments",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"couldnt_create_post",
"couldnt_like_post",
"couldnt_find_community",
"couldnt_get_posts",
"no_post_edit_allowed",
"couldnt_save_post",
"site_already_exists",
"couldnt_update_site",
"invalid_community_name",
"community_already_exists",
"community_moderator_already_exists",
"community_follower_already_exists",
"not_a_moderator",
"couldnt_update_community",
"no_community_edit_allowed",
"system_err_login",
"community_user_already_banned",
"couldnt_find_that_username_or_email",
"password_incorrect",
"invalid_password",
"passwords_dont_match",
"captcha_incorrect",
"invalid_username",
"bio_length_overflow",
"couldnt_update_user",
"couldnt_update_private_message",
"couldnt_update_post",
"couldnt_create_private_message",
"no_private_message_edit_allowed"
], ],
"sv": [ "sv": [
@ -765,7 +1298,17 @@
"local", "local",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"bio_length_overflow"
], ],
"uk": [ "uk": [
@ -779,7 +1322,17 @@
"local", "local",
"banner", "banner",
"display_name", "display_name",
"bio" "bio",
"invalid_url",
"report_reason_required",
"report_too_long",
"couldnt_create_report",
"couldnt_resolve_report",
"invalid_post_title",
"not_a_moderator",
"invalid_password",
"captcha_incorrect",
"bio_length_overflow"
], ],
"zh": [ "zh": [