//! 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 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ç", } }