//! Strings of the shell and of the first pages: the topbar, the restart bar, the 404 page and the //! start page. Area modules hold their own strings as they arrive. use super::Lang; /// One variant per phrase. Add a variant, then its English and Turkish texts in [`t`]. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum K { /// The badge shown beside an administrator's name. Admin, /// The link on the 404 page that returns to the start page. BackHome, /// The sentence under the 404 title. NotFoundBody, /// The title of the 404 page. NotFoundTitle, /// The bar shown while the server cannot be reached. ServerRestarting, /// The accessible name of the service switcher. Services, /// The first link on every page, which jumps past the topbar. SkipToContent, /// The heading of the start page for a visitor who is not signed in. SignedOutTitle, /// The sentence under the signed-out heading on the start page. SignedOutBody, /// The button that starts sign-in. SignIn, /// The button in the user menu that ends the session. SignOut, /// Heading of the page that explains a sign-in that did not finish. ProblemFailedTitle, /// Text of that page. ProblemFailedBody, /// Heading of the page shown when `im` cannot be reached. ProblemUnavailableTitle, /// Text of that page. ProblemUnavailableBody, /// Heading of the page shown to a disabled or refused account. ProblemDeniedTitle, /// Text of that page. ProblemDeniedBody, } /// The text of `key` in `lang`. pub fn t(lang: Lang, key: K) -> &'static str { match (key, lang) { (K::Admin, Lang::En) => "Admin", (K::Admin, Lang::Tr) => "Yönetici", (K::BackHome, Lang::En) => "Back to the start", (K::BackHome, Lang::Tr) => "Başlangıca dön", (K::NotFoundBody, Lang::En) => "The page does not exist, or you do not have access to it.", (K::NotFoundBody, Lang::Tr) => "Sayfa yok ya da bu sayfayı görme izniniz yok.", (K::NotFoundTitle, Lang::En) => "Page not found", (K::NotFoundTitle, Lang::Tr) => "Sayfa bulunamadı", (K::ServerRestarting, Lang::En) => "The server is restarting. Reconnecting…", (K::ServerRestarting, Lang::Tr) => "Sunucu yeniden başlatılıyor. Yeniden bağlanılıyor…", (K::Services, Lang::En) => "Services", (K::Services, Lang::Tr) => "Hizmetler", (K::SkipToContent, Lang::En) => "Skip to content", (K::SkipToContent, Lang::Tr) => "İçeriğe geç", (K::SignedOutTitle, Lang::En) => "Sign in to open your files", (K::SignedOutTitle, Lang::Tr) => "Dosyalarınızı açmak için oturum açın", (K::SignedOutBody, Lang::En) => "Sign in with your family account to open your files.", (K::SignedOutBody, Lang::Tr) => "Dosyalarınızı açmak için aile hesabınızla oturum açın.", (K::SignIn, Lang::En) => "Sign in", (K::SignIn, Lang::Tr) => "Oturum aç", (K::SignOut, Lang::En) => "Sign out", (K::SignOut, Lang::Tr) => "Oturumu kapat", (K::ProblemFailedTitle, Lang::En) => "Sign-in did not finish", (K::ProblemFailedTitle, Lang::Tr) => "Oturum açma tamamlanamadı", (K::ProblemFailedBody, Lang::En) => { "The sign-in was cancelled or expired. Start again from the start page." } (K::ProblemFailedBody, Lang::Tr) => { "Oturum açma iptal edildi ya da süresi doldu. Başlangıç sayfasından yeniden deneyin." } (K::ProblemUnavailableTitle, Lang::En) => "Sign-in is unavailable", (K::ProblemUnavailableTitle, Lang::Tr) => "Oturum açma şu an kullanılamıyor", (K::ProblemUnavailableBody, Lang::En) => { "The account service cannot be reached. Try again in a few minutes." } (K::ProblemUnavailableBody, Lang::Tr) => { "Hesap servisine ulaşılamıyor. Birkaç dakika içinde yeniden deneyin." } (K::ProblemDeniedTitle, Lang::En) => "This account cannot sign in", (K::ProblemDeniedTitle, Lang::Tr) => "Bu hesapla oturum açılamaz", (K::ProblemDeniedBody, Lang::En) => { "Ask the administrator of this instance to check the account." } (K::ProblemDeniedBody, Lang::Tr) => { "Bu sunucunun yöneticisine hesabı kontrol etmesini isteyin." } } }