in
Clone
https://git.tahinli.com/Tahinli/in.git
0 watching·0 forks·Rust·AGPL-3.0·528.7 KiB·9215377·Tahinli·27 days ago·37 commits
| 1 | //! Strings of the shell and of the first pages: the topbar, the restart bar, the 404 page and the |
| 2 | //! start page. Area modules hold their own strings as they arrive. |
| 3 | |
| 4 | use super::Lang; |
| 5 | |
| 6 | /// One variant per phrase. Add a variant, then its English and Turkish texts in [`t`]. |
| 7 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
| 8 | pub enum K { |
| 9 | /// The badge shown beside an administrator's name. |
| 10 | Admin, |
| 11 | /// The link on the 404 page that returns to the start page. |
| 12 | BackHome, |
| 13 | /// The sentence under the 404 title. |
| 14 | NotFoundBody, |
| 15 | /// The title of the 404 page. |
| 16 | NotFoundTitle, |
| 17 | /// The bar shown while the server cannot be reached. |
| 18 | ServerRestarting, |
| 19 | /// The accessible name of the service switcher. |
| 20 | Services, |
| 21 | /// The first link on every page, which jumps past the topbar. |
| 22 | SkipToContent, |
| 23 | /// The heading of the start page for a visitor who is not signed in. |
| 24 | SignedOutTitle, |
| 25 | /// The sentence under the signed-out heading on the start page. |
| 26 | SignedOutBody, |
| 27 | /// The button that starts sign-in. |
| 28 | SignIn, |
| 29 | /// The button in the user menu that ends the session. |
| 30 | SignOut, |
| 31 | /// Heading of the page that explains a sign-in that did not finish. |
| 32 | ProblemFailedTitle, |
| 33 | /// Text of that page. |
| 34 | ProblemFailedBody, |
| 35 | /// Heading of the page shown when `im` cannot be reached. |
| 36 | ProblemUnavailableTitle, |
| 37 | /// Text of that page. |
| 38 | ProblemUnavailableBody, |
| 39 | /// Heading of the page shown to a disabled or refused account. |
| 40 | ProblemDeniedTitle, |
| 41 | /// Text of that page. |
| 42 | ProblemDeniedBody, |
| 43 | } |
| 44 | |
| 45 | /// The text of `key` in `lang`. |
| 46 | pub fn t(lang: Lang, key: K) -> &'static str { |
| 47 | match (key, lang) { |
| 48 | (K::Admin, Lang::En) => "Admin", |
| 49 | (K::Admin, Lang::Tr) => "Yönetici", |
| 50 | (K::BackHome, Lang::En) => "Back to the start", |
| 51 | (K::BackHome, Lang::Tr) => "Başlangıca dön", |
| 52 | (K::NotFoundBody, Lang::En) => "The page does not exist, or you do not have access to it.", |
| 53 | (K::NotFoundBody, Lang::Tr) => "Sayfa yok ya da bu sayfayı görme izniniz yok.", |
| 54 | (K::NotFoundTitle, Lang::En) => "Page not found", |
| 55 | (K::NotFoundTitle, Lang::Tr) => "Sayfa bulunamadı", |
| 56 | (K::ServerRestarting, Lang::En) => "The server is restarting. Reconnecting…", |
| 57 | (K::ServerRestarting, Lang::Tr) => "Sunucu yeniden başlatılıyor. Yeniden bağlanılıyor…", |
| 58 | (K::Services, Lang::En) => "Services", |
| 59 | (K::Services, Lang::Tr) => "Hizmetler", |
| 60 | (K::SkipToContent, Lang::En) => "Skip to content", |
| 61 | (K::SkipToContent, Lang::Tr) => "İçeriğe geç", |
| 62 | (K::SignedOutTitle, Lang::En) => "Sign in to open your files", |
| 63 | (K::SignedOutTitle, Lang::Tr) => "Dosyalarınızı açmak için oturum açın", |
| 64 | (K::SignedOutBody, Lang::En) => "Sign in with your family account to open your files.", |
| 65 | (K::SignedOutBody, Lang::Tr) => "Dosyalarınızı açmak için aile hesabınızla oturum açın.", |
| 66 | (K::SignIn, Lang::En) => "Sign in", |
| 67 | (K::SignIn, Lang::Tr) => "Oturum aç", |
| 68 | (K::SignOut, Lang::En) => "Sign out", |
| 69 | (K::SignOut, Lang::Tr) => "Oturumu kapat", |
| 70 | (K::ProblemFailedTitle, Lang::En) => "Sign-in did not finish", |
| 71 | (K::ProblemFailedTitle, Lang::Tr) => "Oturum açma tamamlanamadı", |
| 72 | (K::ProblemFailedBody, Lang::En) => { |
| 73 | "The sign-in was cancelled or expired. Start again from the start page." |
| 74 | } |
| 75 | (K::ProblemFailedBody, Lang::Tr) => { |
| 76 | "Oturum açma iptal edildi ya da süresi doldu. Başlangıç sayfasından yeniden deneyin." |
| 77 | } |
| 78 | (K::ProblemUnavailableTitle, Lang::En) => "Sign-in is unavailable", |
| 79 | (K::ProblemUnavailableTitle, Lang::Tr) => "Oturum açma şu an kullanılamıyor", |
| 80 | (K::ProblemUnavailableBody, Lang::En) => { |
| 81 | "The account service cannot be reached. Try again in a few minutes." |
| 82 | } |
| 83 | (K::ProblemUnavailableBody, Lang::Tr) => { |
| 84 | "Hesap servisine ulaşılamıyor. Birkaç dakika içinde yeniden deneyin." |
| 85 | } |
| 86 | (K::ProblemDeniedTitle, Lang::En) => "This account cannot sign in", |
| 87 | (K::ProblemDeniedTitle, Lang::Tr) => "Bu hesapla oturum açılamaz", |
| 88 | (K::ProblemDeniedBody, Lang::En) => { |
| 89 | "Ask the administrator of this instance to check the account." |
| 90 | } |
| 91 | (K::ProblemDeniedBody, Lang::Tr) => { |
| 92 | "Bu sunucunun yöneticisine hesabı kontrol etmesini isteyin." |
| 93 | } |
| 94 | } |
| 95 | } |