use crate::large::FileError;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Lang {
English,
Bokmal,
Nynorsk,
Swedish,
Danish,
German,
Dutch,
French,
Spanish,
Italian,
Portuguese,
Finnish,
Polish,
Icelandic,
Czech,
}
impl Lang {
pub fn disable_agent(self) -> &'static str {
match self {
Self::Bokmal => "Deaktiver agentmodus",
Self::Nynorsk => "Deaktiver agentmodus",
_ => "Disable agent mode",
}
}
pub fn agent_help(self) -> &'static str {
match self {
Self::Bokmal => "Slik kobler agenten til …",
Self::Nynorsk => "Slik koplar agenten til …",
_ => "How agents connect…",
}
}
pub const ALL: &[Self] = &[
Self::Bokmal,
Self::Nynorsk,
Self::English,
Self::Swedish,
Self::Danish,
Self::Icelandic,
Self::German,
Self::Dutch,
Self::French,
Self::Spanish,
Self::Italian,
Self::Portuguese,
Self::Finnish,
Self::Polish,
Self::Czech,
];
pub fn code(self) -> &'static str {
match self {
Self::English => "en",
Self::Bokmal => "nb",
Self::Nynorsk => "nn",
Self::Swedish => "sv",
Self::Danish => "da",
Self::German => "de",
Self::Dutch => "nl",
Self::French => "fr",
Self::Spanish => "es",
Self::Italian => "it",
Self::Portuguese => "pt",
Self::Finnish => "fi",
Self::Polish => "pl",
Self::Icelandic => "is",
Self::Czech => "cs",
}
}
pub fn native_name(self) -> &'static str {
match self {
Self::English => "English",
Self::Bokmal => "Norsk bokmål",
Self::Nynorsk => "Norsk nynorsk",
Self::Swedish => "Svenska",
Self::Danish => "Dansk",
Self::German => "Deutsch",
Self::Dutch => "Nederlands",
Self::French => "Français",
Self::Spanish => "Español",
Self::Italian => "Italiano",
Self::Portuguese => "Português",
Self::Finnish => "Suomi",
Self::Polish => "Polski",
Self::Icelandic => "Íslenska",
Self::Czech => "Čeština",
}
}
pub fn native_label(self, id: i32) -> Option<&'static str> {
let index = match id {
24..=32 => (id - 24) as usize,
35..=43 => (id - 35 + 9) as usize,
_ => return None,
};
let labels: &[&str] = match self {
Self::English => &[
"Edit",
"Undo",
"Redo",
"Cut",
"Copy",
"Paste",
"Select All",
"Next",
"Previous",
"Open Recent",
"Close",
"Window",
"Minimize",
"Zoom",
"Hide RavnPad",
"Hide Others",
"Show All",
"Services",
],
Self::Bokmal => &[
"Rediger",
"Angre",
"Gjør om",
"Klipp ut",
"Kopier",
"Lim inn",
"Marker alt",
"Neste",
"Forrige",
"Åpne nylige",
"Lukk",
"Vindu",
"Minimer",
"Zoom",
"Skjul RavnPad",
"Skjul andre",
"Vis alle",
"Tjenester",
],
Self::Nynorsk => &[
"Rediger",
"Angre",
"Gjer om",
"Klipp ut",
"Kopier",
"Lim inn",
"Merk alt",
"Neste",
"Førre",
"Opne nylege",
"Lukk",
"Vindauge",
"Minimer",
"Zoom",
"Gøym RavnPad",
"Gøym andre",
"Vis alle",
"Tenester",
],
Self::Swedish => &[
"Redigera",
"Ångra",
"Gör om",
"Klipp ut",
"Kopiera",
"Klistra in",
"Markera allt",
"Nästa",
"Föregående",
"Öppna senaste",
"Stäng",
"Fönster",
"Minimera",
"Zooma",
"Göm RavnPad",
"Göm övriga",
"Visa alla",
"Tjänster",
],
Self::Danish => &[
"Rediger",
"Fortryd",
"Gentag",
"Klip",
"Kopiér",
"Sæt ind",
"Vælg alt",
"Næste",
"Forrige",
"Åbn seneste",
"Luk",
"Vindue",
"Minimer",
"Zoom",
"Skjul RavnPad",
"Skjul andre",
"Vis alle",
"Tjenester",
],
Self::German => &[
"Bearbeiten",
"Rückgängig",
"Wiederholen",
"Ausschneiden",
"Kopieren",
"Einfügen",
"Alles auswählen",
"Nächstes",
"Vorheriges",
"Zuletzt benutzt öffnen",
"Schließen",
"Fenster",
"Minimieren",
"Zoomen",
"RavnPad ausblenden",
"Andere ausblenden",
"Alle einblenden",
"Dienste",
],
Self::Dutch => &[
"Bewerken",
"Ongedaan maken",
"Opnieuw",
"Knippen",
"Kopiëren",
"Plakken",
"Alles selecteren",
"Volgende",
"Vorige",
"Recent openen",
"Sluiten",
"Venster",
"Minimaliseren",
"Zoomen",
"RavnPad verbergen",
"Andere verbergen",
"Alles tonen",
"Voorzieningen",
],
Self::French => &[
"Édition",
"Annuler",
"Rétablir",
"Couper",
"Copier",
"Coller",
"Tout sélectionner",
"Suivant",
"Précédent",
"Ouvrir l’élément récent",
"Fermer",
"Fenêtre",
"Réduire",
"Zoom",
"Masquer RavnPad",
"Masquer les autres",
"Tout afficher",
"Services",
],
Self::Spanish => &[
"Edición",
"Deshacer",
"Rehacer",
"Cortar",
"Copiar",
"Pegar",
"Seleccionar todo",
"Siguiente",
"Anterior",
"Abrir reciente",
"Cerrar",
"Ventana",
"Minimizar",
"Zoom",
"Ocultar RavnPad",
"Ocultar otros",
"Mostrar todo",
"Servicios",
],
Self::Italian => &[
"Modifica",
"Annulla",
"Ripristina",
"Taglia",
"Copia",
"Incolla",
"Seleziona tutto",
"Successivo",
"Precedente",
"Apri recenti",
"Chiudi",
"Finestra",
"Riduci a icona",
"Zoom",
"Nascondi RavnPad",
"Nascondi altre",
"Mostra tutte",
"Servizi",
],
Self::Portuguese => &[
"Editar",
"Desfazer",
"Refazer",
"Cortar",
"Copiar",
"Colar",
"Selecionar tudo",
"Seguinte",
"Anterior",
"Abrir recente",
"Fechar",
"Janela",
"Minimizar",
"Zoom",
"Ocultar RavnPad",
"Ocultar outras",
"Mostrar tudo",
"Serviços",
],
Self::Finnish => &[
"Muokkaa",
"Kumoa",
"Tee uudelleen",
"Leikkaa",
"Kopioi",
"Sijoita",
"Valitse kaikki",
"Seuraava",
"Edellinen",
"Avaa äskeinen",
"Sulje",
"Ikkuna",
"Pienennä",
"Zoomaa",
"Kätke RavnPad",
"Kätke muut",
"Näytä kaikki",
"Palvelut",
],
Self::Polish => &[
"Edycja",
"Cofnij",
"Ponów",
"Wytnij",
"Kopiuj",
"Wklej",
"Zaznacz wszystko",
"Następny",
"Poprzedni",
"Otwórz ostatnie",
"Zamknij",
"Okno",
"Minimalizuj",
"Powiększ",
"Ukryj RavnPad",
"Ukryj pozostałe",
"Pokaż wszystkie",
"Usługi",
],
Self::Icelandic => &[
"Breyta",
"Afturkalla",
"Endurtaka",
"Klippa",
"Afrita",
"Líma",
"Velja allt",
"Næsta",
"Fyrra",
"Opna nýlegt",
"Loka",
"Gluggi",
"Lágmarka",
"Stækka",
"Fela RavnPad",
"Fela önnur",
"Sýna allt",
"Þjónustur",
],
Self::Czech => &[
"Úpravy",
"Zpět",
"Znovu",
"Vyjmout",
"Kopírovat",
"Vložit",
"Vybrat vše",
"Další",
"Předchozí",
"Otevřít poslední",
"Zavřít",
"Okno",
"Minimalizovat",
"Zvětšit",
"Skrýt RavnPad",
"Skrýt ostatní",
"Zobrazit vše",
"Služby",
],
};
labels.get(index).copied()
}
pub fn from_code(code: &str) -> Option<Self> {
match code.trim().to_ascii_lowercase().as_str() {
"en" => Some(Self::English),
"nb" | "no" => Some(Self::Bokmal),
"nn" => Some(Self::Nynorsk),
"sv" => Some(Self::Swedish),
"da" => Some(Self::Danish),
"de" => Some(Self::German),
"nl" => Some(Self::Dutch),
"fr" => Some(Self::French),
"es" => Some(Self::Spanish),
"it" => Some(Self::Italian),
"pt" => Some(Self::Portuguese),
"fi" => Some(Self::Finnish),
"pl" => Some(Self::Polish),
"is" => Some(Self::Icelandic),
"cs" => Some(Self::Czech),
_ => None,
}
}
pub fn from_locale(locale: &str) -> Option<Self> {
let primary = locale
.split(['.', '@'])
.next()
.unwrap_or(locale)
.replace('_', "-");
let lang = primary.split('-').next().unwrap_or(&primary);
Self::from_code(lang)
}
pub fn text(self) -> &'static UiText {
match self {
Self::English => &EN,
Self::Bokmal => &NB,
Self::Nynorsk => &NN,
Self::Swedish => &SV,
Self::Danish => &DA,
Self::German => &DE,
Self::Dutch => &NL,
Self::French => &FR,
Self::Spanish => &ES,
Self::Italian => &IT,
Self::Portuguese => &PT,
Self::Finnish => &FI,
Self::Polish => &PL,
Self::Icelandic => &IS,
Self::Czech => &CS,
}
}
}
pub struct UiText {
pub file_menu: &'static str,
pub language_menu: &'static str,
pub settings_menu: &'static str,
pub agent_menu: &'static str,
pub enable_agent: &'static str,
pub agent_enabled: &'static str,
pub font_label: &'static str,
pub font_size_label: &'static str,
pub font_default: &'static str,
pub theme: &'static str,
pub theme_system: &'static str,
pub theme_light: &'static str,
pub theme_dark: &'static str,
pub line_wrap: &'static str,
pub new: &'static str,
pub new_window: &'static str,
pub recent_files: &'static str,
pub open: &'static str,
pub save: &'static str,
pub save_as: &'static str,
pub quit: &'static str,
pub help_menu: &'static str,
pub update_menu: &'static str,
pub untitled: &'static str,
pub untitled_file: &'static str,
pub chars_unit: &'static str,
pub words_unit: &'static str,
pub unsaved_title: &'static str,
pub unsaved_body: &'static str,
pub dont_save: &'static str,
pub cancel: &'static str,
pub error_title: &'static str,
pub ok: &'static str,
pub drop_to_open: &'static str,
pub find: &'static str,
pub no_matches: &'static str,
pub whole_word: &'static str,
pub replace: &'static str,
pub replace_all: &'static str,
pub spellcheck: &'static str,
pub dict_error: &'static str,
pub dict_unavailable: &'static str,
pub add_to_dict: &'static str,
pub view_readonly: &'static str,
pub cannot_open: &'static str,
pub cannot_open_window: &'static str,
pub cannot_save: &'static str,
pub cannot_save_settings: &'static str,
pub cannot_read: &'static str,
pub invalid_utf8: &'static str,
pub invalid_rtf: &'static str,
pub too_large_edit: &'static str,
pub drop_too_large: &'static str,
pub update_available_title: &'static str,
pub update_available_body: &'static str,
pub update_now: &'static str,
pub update_later: &'static str,
pub update_checking: &'static str,
pub update_downloading: &'static str,
pub update_uptodate: &'static str,
pub update_failed: &'static str,
pub update_unsupported: &'static str,
pub decimal: char,
}
impl UiText {
pub fn chars(&self, n: usize) -> String {
format!("{} {}", n, self.chars_unit)
}
pub fn words(&self, n: usize) -> String {
format!("{} {}", n, self.words_unit)
}
pub fn unsaved(&self, name: &str) -> String {
self.unsaved_body.replace("{}", name)
}
pub fn file_error(&self, err: &FileError) -> String {
match err {
FileError::Open(err) => format!("{}:\n{err}", self.cannot_open),
FileError::Read(err) => format!("{}:\n{err}", self.cannot_read),
FileError::InvalidUtf8 => self.invalid_utf8.to_owned(),
FileError::InvalidRtf => self.invalid_rtf.to_owned(),
}
}
pub fn save_error(&self, err: &std::io::Error) -> String {
format!("{}:\n{err}", self.cannot_save)
}
pub fn settings_error(&self, err: &std::io::Error) -> String {
format!("{}:\n{err}", self.cannot_save_settings)
}
pub fn dictionary_error(&self, err: &str) -> String {
format!("{}:\n{err}", self.dict_error)
}
pub fn update_available(&self, new: &str, current: &str) -> String {
self.update_available_body
.replace("{new}", new)
.replace("{current}", current)
}
pub fn update_uptodate_msg(&self, version: &str) -> String {
self.update_uptodate.replace("{version}", version)
}
}
pub fn detect() -> Lang {
Lang::from_locale(&system_locale().unwrap_or_default()).unwrap_or(Lang::English)
}
fn system_locale() -> Option<String> {
#[cfg(windows)]
{
use winreg::RegKey;
use winreg::enums::HKEY_CURRENT_USER;
RegKey::predef(HKEY_CURRENT_USER)
.open_subkey("Control Panel\\International")
.ok()?
.get_value("LocaleName")
.ok()
}
#[cfg(not(windows))]
{
std::env::var("LC_ALL")
.or_else(|_| std::env::var("LC_MESSAGES"))
.or_else(|_| std::env::var("LANG"))
.ok()
}
}
const EN: UiText = UiText {
file_menu: "File",
language_menu: "Language",
settings_menu: "Settings",
agent_menu: "Agent",
enable_agent: "Enable agent mode",
agent_enabled: "Agent mode enabled",
font_label: "Font",
font_size_label: "Size",
font_default: "Default",
theme: "Theme",
theme_system: "Follow system",
theme_light: "Light",
theme_dark: "Dark",
line_wrap: "Wrap long lines",
new: "New",
new_window: "New window",
recent_files: "Recent files",
open: "Open…",
save: "Save",
save_as: "Save as…",
quit: "Quit",
help_menu: "Help",
update_menu: "Check for updates…",
untitled: "Untitled",
untitled_file: "untitled.txt",
chars_unit: "characters",
words_unit: "words",
unsaved_title: "Unsaved changes",
unsaved_body: "“{}” has unsaved changes. Save before continuing?",
dont_save: "Don't save",
cancel: "Cancel",
error_title: "Error",
ok: "OK",
drop_to_open: "Drop to open",
find: "Find",
no_matches: "No matches found",
whole_word: "Whole word",
replace: "Replace",
replace_all: "Replace all",
spellcheck: "Spell checking",
dict_error: "Could not download the dictionary",
dict_unavailable: "No dictionary is available for this language",
add_to_dict: "Add to dictionary",
view_readonly: "view (read-only)",
cannot_open: "Could not open the file",
cannot_open_window: "Could not open a new window",
cannot_save: "Could not save the file",
cannot_save_settings: "Could not save the settings",
cannot_read: "Could not read the file",
invalid_utf8: "The file is not valid UTF-8 text.",
invalid_rtf: "Could not convert the RTF file to text.",
too_large_edit: "The file is too large to edit in RavnPad. This view is read-only.",
drop_too_large: "The file is too large to open via drag-and-drop. Open it from disk instead.",
update_available_title: "Update available",
update_available_body: "RavnPad {new} is available. You have {current}.",
update_now: "Update",
update_later: "Later",
update_checking: "Checking for updates…",
update_downloading: "Downloading update…",
update_uptodate: "RavnPad is up to date ({version}).",
update_failed: "Could not update RavnPad.",
update_unsupported: "Automatic updates are not available on this system.",
decimal: '.',
};
const NB: UiText = UiText {
file_menu: "Fil",
language_menu: "Språk",
settings_menu: "Innstillinger",
agent_menu: "Agent",
enable_agent: "Aktiver agentmodus",
agent_enabled: "Agentmodus aktiv",
font_label: "Skrift",
font_size_label: "Størrelse",
font_default: "Standard",
theme: "Tema",
theme_system: "Følg systemet",
theme_light: "Lyst",
theme_dark: "Mørkt",
line_wrap: "Bryt lange linjer",
new: "Ny",
new_window: "Nytt vindu",
recent_files: "Siste filer",
open: "Åpne…",
save: "Lagre",
save_as: "Lagre som…",
quit: "Avslutt",
help_menu: "Hjelp",
update_menu: "Se etter oppdateringer…",
untitled: "Uten tittel",
untitled_file: "uten-tittel.txt",
chars_unit: "tegn",
words_unit: "ord",
unsaved_title: "Ulagrede endringer",
unsaved_body: "«{}» har ulagrede endringer. Vil du lagre før du fortsetter?",
dont_save: "Ikke lagre",
cancel: "Avbryt",
error_title: "Feil",
ok: "OK",
drop_to_open: "Slipp for å åpne",
find: "Søk",
no_matches: "Ingen treff",
whole_word: "Hele ord",
replace: "Erstatt",
replace_all: "Erstatt alle",
spellcheck: "Stavekontroll",
dict_error: "Kunne ikke laste ned ordboken",
dict_unavailable: "Ingen ordbok er tilgjengelig for dette språket",
add_to_dict: "Legg til i ordbok",
view_readonly: "visning (skrivebeskyttet)",
cannot_open: "Kunne ikke åpne filen",
cannot_open_window: "Kunne ikke åpne et nytt vindu",
cannot_save: "Kunne ikke lagre filen",
cannot_save_settings: "Kunne ikke lagre innstillingene",
cannot_read: "Kunne ikke lese filen",
invalid_utf8: "Filen er ikke gyldig UTF-8-tekst.",
invalid_rtf: "Kunne ikke konvertere RTF-filen til tekst.",
too_large_edit: "Filen er for stor til å redigeres i RavnPad. Visningen er skrivebeskyttet.",
drop_too_large: "Filen er for stor til å åpnes via dra-og-slipp. Åpne den fra disk i stedet.",
update_available_title: "Oppdatering tilgjengelig",
update_available_body: "RavnPad {new} er tilgjengelig. Du har {current}.",
update_now: "Oppdater",
update_later: "Senere",
update_checking: "Ser etter oppdateringer…",
update_downloading: "Laster ned oppdatering…",
update_uptodate: "RavnPad er oppdatert ({version}).",
update_failed: "Kunne ikke oppdatere RavnPad.",
update_unsupported: "Automatiske oppdateringer er ikke tilgjengelig på dette systemet.",
decimal: ',',
};
const NN: UiText = UiText {
file_menu: "Fil",
language_menu: "Språk",
settings_menu: "Innstillingar",
agent_menu: "Agent",
enable_agent: "Slå på agentmodus",
agent_enabled: "Agentmodus er på",
font_label: "Skrift",
font_size_label: "Storleik",
font_default: "Standard",
theme: "Tema",
theme_system: "Følg systemet",
theme_light: "Lyst",
theme_dark: "Mørkt",
line_wrap: "Bryt lange linjer",
new: "Ny",
new_window: "Nytt vindauge",
recent_files: "Siste filer",
open: "Opne…",
save: "Lagre",
save_as: "Lagre som…",
quit: "Avslutt",
help_menu: "Hjelp",
update_menu: "Sjå etter oppdateringar…",
untitled: "Utan tittel",
untitled_file: "utan-tittel.txt",
chars_unit: "teikn",
words_unit: "ord",
unsaved_title: "Ulagra endringar",
unsaved_body: "«{}» har ulagra endringar. Vil du lagre før du held fram?",
dont_save: "Ikkje lagre",
cancel: "Avbryt",
error_title: "Feil",
ok: "OK",
drop_to_open: "Slepp for å opne",
find: "Søk",
no_matches: "Ingen treff",
whole_word: "Heile ord",
replace: "Erstatt",
replace_all: "Erstatt alle",
spellcheck: "Stavekontroll",
dict_error: "Kunne ikkje laste ned ordboka",
dict_unavailable: "Inga ordbok er tilgjengeleg for dette språket",
add_to_dict: "Legg til i ordbok",
view_readonly: "vising (skriveverna)",
cannot_open: "Kunne ikkje opne fila",
cannot_open_window: "Kunne ikkje opne eit nytt vindauge",
cannot_save: "Kunne ikkje lagre fila",
cannot_save_settings: "Kunne ikkje lagre innstillingane",
cannot_read: "Kunne ikkje lese fila",
invalid_utf8: "Fila er ikkje gyldig UTF-8-tekst.",
invalid_rtf: "Kunne ikkje konvertere RTF-fila til tekst.",
too_large_edit: "Fila er for stor til å redigerast i RavnPad. Visinga er skriveverna.",
drop_too_large: "Fila er for stor til å opnast via dra-og-slep. Opne ho frå disk i staden.",
update_available_title: "Oppdatering tilgjengeleg",
update_available_body: "RavnPad {new} er tilgjengeleg. Du har {current}.",
update_now: "Oppdater",
update_later: "Seinare",
update_checking: "Ser etter oppdateringar…",
update_downloading: "Lastar ned oppdatering…",
update_uptodate: "RavnPad er oppdatert ({version}).",
update_failed: "Kunne ikkje oppdatere RavnPad.",
update_unsupported: "Automatiske oppdateringar er ikkje tilgjengelege på dette systemet.",
decimal: ',',
};
const SV: UiText = UiText {
file_menu: "Arkiv",
language_menu: "Språk",
settings_menu: "Inställningar",
agent_menu: "Agent",
enable_agent: "Aktivera agentläge",
agent_enabled: "Agentläge aktivt",
font_label: "Typsnitt",
font_size_label: "Storlek",
font_default: "Standard",
theme: "Tema",
theme_system: "Följ systemet",
theme_light: "Ljust",
theme_dark: "Mörkt",
line_wrap: "Radbryt långa rader",
new: "Ny",
new_window: "Nytt fönster",
recent_files: "Senaste filer",
open: "Öppna…",
save: "Spara",
save_as: "Spara som…",
quit: "Avsluta",
help_menu: "Hjälp",
update_menu: "Sök efter uppdateringar…",
untitled: "Namnlös",
untitled_file: "namnlos.txt",
chars_unit: "tecken",
words_unit: "ord",
unsaved_title: "Osparade ändringar",
unsaved_body: "“{}” har osparade ändringar. Vill du spara innan du fortsätter?",
dont_save: "Spara inte",
cancel: "Avbryt",
error_title: "Fel",
ok: "OK",
drop_to_open: "Släpp för att öppna",
find: "Sök",
no_matches: "Inga träffar",
whole_word: "Hela ord",
replace: "Ersätt",
replace_all: "Ersätt alla",
spellcheck: "Stavningskontroll",
dict_error: "Kunde inte hämta ordlistan",
dict_unavailable: "Ingen ordlista är tillgänglig för detta språk",
add_to_dict: "Lägg till i ordlistan",
view_readonly: "visning (skrivskyddad)",
cannot_open: "Kunde inte öppna filen",
cannot_open_window: "Kunde inte öppna ett nytt fönster",
cannot_save: "Kunde inte spara filen",
cannot_save_settings: "Kunde inte spara inställningarna",
cannot_read: "Kunde inte läsa filen",
invalid_utf8: "Filen är inte giltig UTF-8-text.",
invalid_rtf: "Kunde inte konvertera RTF-filen till text.",
too_large_edit: "Filen är för stor för att redigeras i RavnPad. Visningen är skrivskyddad.",
drop_too_large: "Filen är för stor för att öppnas via dra-och-släpp. Öppna den från disken i stället.",
update_available_title: "Uppdatering tillgänglig",
update_available_body: "RavnPad {new} finns tillgänglig. Du har {current}.",
update_now: "Uppdatera",
update_later: "Senare",
update_checking: "Söker efter uppdateringar…",
update_downloading: "Laddar ner uppdatering…",
update_uptodate: "RavnPad är uppdaterad ({version}).",
update_failed: "Kunde inte uppdatera RavnPad.",
update_unsupported: "Automatiska uppdateringar är inte tillgängliga på det här systemet.",
decimal: ',',
};
const DA: UiText = UiText {
file_menu: "Filer",
language_menu: "Sprog",
settings_menu: "Indstillinger",
agent_menu: "Agent",
enable_agent: "Aktivér agenttilstand",
agent_enabled: "Agenttilstand aktiv",
font_label: "Skrifttype",
font_size_label: "Størrelse",
font_default: "Standard",
theme: "Tema",
theme_system: "Følg systemet",
theme_light: "Lyst",
theme_dark: "Mørkt",
line_wrap: "Ombryd lange linjer",
new: "Ny",
new_window: "Nyt vindue",
recent_files: "Seneste filer",
open: "Åbn…",
save: "Gem",
save_as: "Gem som…",
quit: "Afslut",
help_menu: "Hjælp",
update_menu: "Søg efter opdateringer…",
untitled: "Unavngivet",
untitled_file: "unavngivet.txt",
chars_unit: "tegn",
words_unit: "ord",
unsaved_title: "Ikke-gemte ændringer",
unsaved_body: "«{}» har ændringer, der ikke er gemt. Vil du gemme, før du fortsætter?",
dont_save: "Gem ikke",
cancel: "Annuller",
error_title: "Fejl",
ok: "OK",
drop_to_open: "Slip for at åbne",
find: "Søg",
no_matches: "Ingen resultater",
whole_word: "Hele ord",
replace: "Erstat",
replace_all: "Erstat alle",
spellcheck: "Stavekontrol",
dict_error: "Kunne ikke hente ordbogen",
dict_unavailable: "Der findes ingen ordbog for dette sprog",
add_to_dict: "Føj til ordbog",
view_readonly: "visning (skrivebeskyttet)",
cannot_open: "Kunne ikke åbne filen",
cannot_open_window: "Kunne ikke åbne et nyt vindue",
cannot_save: "Kunne ikke gemme filen",
cannot_save_settings: "Kunne ikke gemme indstillingerne",
cannot_read: "Kunne ikke læse filen",
invalid_utf8: "Filen er ikke gyldig UTF-8-tekst.",
invalid_rtf: "Kunne ikke konvertere RTF-filen til tekst.",
too_large_edit: "Filen er for stor til at redigeres i RavnPad. Visningen er skrivebeskyttet.",
drop_too_large: "Filen er for stor til at åbnes via træk-og-slip. Åbn den fra disken i stedet.",
update_available_title: "Opdatering tilgængelig",
update_available_body: "RavnPad {new} er tilgængelig. Du har {current}.",
update_now: "Opdater",
update_later: "Senere",
update_checking: "Søger efter opdateringer…",
update_downloading: "Henter opdatering…",
update_uptodate: "RavnPad er opdateret ({version}).",
update_failed: "Kunne ikke opdatere RavnPad.",
update_unsupported: "Automatiske opdateringer er ikke tilgængelige på dette system.",
decimal: ',',
};
const DE: UiText = UiText {
file_menu: "Datei",
language_menu: "Sprache",
settings_menu: "Einstellungen",
agent_menu: "Agent",
enable_agent: "Agentenmodus aktivieren",
agent_enabled: "Agentenmodus aktiv",
font_label: "Schriftart",
font_size_label: "Größe",
font_default: "Standard",
theme: "Design",
theme_system: "Systemeinstellung",
theme_light: "Hell",
theme_dark: "Dunkel",
line_wrap: "Lange Zeilen umbrechen",
new: "Neu",
new_window: "Neues Fenster",
recent_files: "Zuletzt verwendete Dateien",
open: "Öffnen…",
save: "Speichern",
save_as: "Speichern unter…",
quit: "Beenden",
help_menu: "Hilfe",
update_menu: "Nach Updates suchen…",
untitled: "Unbenannt",
untitled_file: "unbenannt.txt",
chars_unit: "Zeichen",
words_unit: "Wörter",
unsaved_title: "Ungespeicherte Änderungen",
unsaved_body: "„{}“ enthält ungespeicherte Änderungen. Speichern, bevor Sie fortfahren?",
dont_save: "Nicht speichern",
cancel: "Abbrechen",
error_title: "Fehler",
ok: "OK",
drop_to_open: "Zum Öffnen ablegen",
find: "Suchen",
no_matches: "Keine Treffer gefunden",
whole_word: "Ganzes Wort",
replace: "Ersetzen",
replace_all: "Alle ersetzen",
spellcheck: "Rechtschreibprüfung",
dict_error: "Das Wörterbuch konnte nicht heruntergeladen werden",
dict_unavailable: "Für diese Sprache ist kein Wörterbuch verfügbar",
add_to_dict: "Zum Wörterbuch hinzufügen",
view_readonly: "Ansicht (schreibgeschützt)",
cannot_open: "Datei konnte nicht geöffnet werden",
cannot_open_window: "Neues Fenster konnte nicht geöffnet werden",
cannot_save: "Datei konnte nicht gespeichert werden",
cannot_save_settings: "Einstellungen konnten nicht gespeichert werden",
cannot_read: "Datei konnte nicht gelesen werden",
invalid_utf8: "Die Datei ist kein gültiger UTF-8-Text.",
invalid_rtf: "Die RTF-Datei konnte nicht in Text umgewandelt werden.",
too_large_edit: "Die Datei ist zu groß zum Bearbeiten in RavnPad. Die Ansicht ist schreibgeschützt.",
drop_too_large: "Die Datei ist zu groß zum Öffnen per Drag-and-drop. Öffnen Sie sie von der Festplatte.",
update_available_title: "Update verfügbar",
update_available_body: "RavnPad {new} ist verfügbar. Sie haben {current}.",
update_now: "Aktualisieren",
update_later: "Später",
update_checking: "Suche nach Updates…",
update_downloading: "Update wird heruntergeladen…",
update_uptodate: "RavnPad ist aktuell ({version}).",
update_failed: "RavnPad konnte nicht aktualisiert werden.",
update_unsupported: "Automatische Updates sind auf diesem System nicht verfügbar.",
decimal: ',',
};
const NL: UiText = UiText {
file_menu: "Bestand",
language_menu: "Taal",
settings_menu: "Instellingen",
agent_menu: "Agent",
enable_agent: "Agentmodus inschakelen",
agent_enabled: "Agentmodus actief",
font_label: "Lettertype",
font_size_label: "Grootte",
font_default: "Standaard",
theme: "Thema",
theme_system: "Systeem volgen",
theme_light: "Licht",
theme_dark: "Donker",
line_wrap: "Lange regels afbreken",
new: "Nieuw",
new_window: "Nieuw venster",
recent_files: "Recente bestanden",
open: "Openen…",
save: "Opslaan",
save_as: "Opslaan als…",
quit: "Afsluiten",
help_menu: "Help",
update_menu: "Controleren op updates…",
untitled: "Naamloos",
untitled_file: "naamloos.txt",
chars_unit: "tekens",
words_unit: "woorden",
unsaved_title: "Niet-opgeslagen wijzigingen",
unsaved_body: "“{}” heeft niet-opgeslagen wijzigingen. Opslaan voordat u doorgaat?",
dont_save: "Niet opslaan",
cancel: "Annuleren",
error_title: "Fout",
ok: "OK",
drop_to_open: "Sleep om te openen",
find: "Zoeken",
no_matches: "Geen resultaten gevonden",
whole_word: "Heel woord",
replace: "Vervangen",
replace_all: "Alles vervangen",
spellcheck: "Spellingscontrole",
dict_error: "Kan het woordenboek niet downloaden",
dict_unavailable: "Er is geen woordenboek beschikbaar voor deze taal",
add_to_dict: "Aan woordenboek toevoegen",
view_readonly: "weergave (alleen-lezen)",
cannot_open: "Kan het bestand niet openen",
cannot_open_window: "Kan geen nieuw venster openen",
cannot_save: "Kan het bestand niet opslaan",
cannot_save_settings: "Kan de instellingen niet opslaan",
cannot_read: "Kan het bestand niet lezen",
invalid_utf8: "Het bestand is geen geldige UTF-8-tekst.",
invalid_rtf: "Het RTF-bestand kon niet naar tekst worden omgezet.",
too_large_edit: "Het bestand is te groot om in RavnPad te bewerken. Deze weergave is alleen-lezen.",
drop_too_large: "Het bestand is te groot om via slepen-en-neerzetten te openen. Open het vanaf de schijf.",
update_available_title: "Update beschikbaar",
update_available_body: "RavnPad {new} is beschikbaar. U hebt {current}.",
update_now: "Bijwerken",
update_later: "Later",
update_checking: "Controleren op updates…",
update_downloading: "Update downloaden…",
update_uptodate: "RavnPad is up-to-date ({version}).",
update_failed: "RavnPad kon niet worden bijgewerkt.",
update_unsupported: "Automatische updates zijn niet beschikbaar op dit systeem.",
decimal: ',',
};
const FR: UiText = UiText {
file_menu: "Fichier",
language_menu: "Langue",
settings_menu: "Paramètres",
agent_menu: "Agent",
enable_agent: "Activer le mode agent",
agent_enabled: "Mode agent activé",
font_label: "Police",
font_size_label: "Taille",
font_default: "Par défaut",
theme: "Thème",
theme_system: "Suivre le système",
theme_light: "Clair",
theme_dark: "Sombre",
line_wrap: "Renvoyer les longues lignes",
new: "Nouveau",
new_window: "Nouvelle fenêtre",
recent_files: "Fichiers récents",
open: "Ouvrir…",
save: "Enregistrer",
save_as: "Enregistrer sous…",
quit: "Quitter",
help_menu: "Aide",
update_menu: "Rechercher des mises à jour…",
untitled: "Sans titre",
untitled_file: "sans-titre.txt",
chars_unit: "caractères",
words_unit: "mots",
unsaved_title: "Modifications non enregistrées",
unsaved_body: "« {} » contient des modifications non enregistrées. Enregistrer avant de continuer ?",
dont_save: "Ne pas enregistrer",
cancel: "Annuler",
error_title: "Erreur",
ok: "OK",
drop_to_open: "Déposer pour ouvrir",
find: "Rechercher",
no_matches: "Aucun résultat",
whole_word: "Mot entier",
replace: "Remplacer",
replace_all: "Tout remplacer",
spellcheck: "Vérification orthographique",
dict_error: "Impossible de télécharger le dictionnaire",
dict_unavailable: "Aucun dictionnaire n’est disponible pour cette langue",
add_to_dict: "Ajouter au dictionnaire",
view_readonly: "affichage (lecture seule)",
cannot_open: "Impossible d’ouvrir le fichier",
cannot_open_window: "Impossible d’ouvrir une nouvelle fenêtre",
cannot_save: "Impossible d’enregistrer le fichier",
cannot_save_settings: "Impossible d’enregistrer les paramètres",
cannot_read: "Impossible de lire le fichier",
invalid_utf8: "Le fichier n’est pas un texte UTF-8 valide.",
invalid_rtf: "Impossible de convertir le fichier RTF en texte.",
too_large_edit: "Le fichier est trop volumineux pour être modifié dans RavnPad. Cet affichage est en lecture seule.",
drop_too_large: "Le fichier est trop volumineux pour être ouvert par glisser-déposer. Ouvrez-le depuis le disque.",
update_available_title: "Mise à jour disponible",
update_available_body: "RavnPad {new} est disponible. Vous avez {current}.",
update_now: "Mettre à jour",
update_later: "Plus tard",
update_checking: "Recherche de mises à jour…",
update_downloading: "Téléchargement de la mise à jour…",
update_uptodate: "RavnPad est à jour ({version}).",
update_failed: "Impossible de mettre à jour RavnPad.",
update_unsupported: "Les mises à jour automatiques ne sont pas disponibles sur ce système.",
decimal: ',',
};
const ES: UiText = UiText {
file_menu: "Archivo",
language_menu: "Idioma",
settings_menu: "Ajustes",
agent_menu: "Agente",
enable_agent: "Activar modo agente",
agent_enabled: "Modo agente activo",
font_label: "Fuente",
font_size_label: "Tamaño",
font_default: "Predeterminada",
theme: "Tema",
theme_system: "Seguir el sistema",
theme_light: "Claro",
theme_dark: "Oscuro",
line_wrap: "Ajustar líneas largas",
new: "Nuevo",
new_window: "Nueva ventana",
recent_files: "Archivos recientes",
open: "Abrir…",
save: "Guardar",
save_as: "Guardar como…",
quit: "Salir",
help_menu: "Ayuda",
update_menu: "Buscar actualizaciones…",
untitled: "Sin título",
untitled_file: "sin-titulo.txt",
chars_unit: "caracteres",
words_unit: "palabras",
unsaved_title: "Cambios sin guardar",
unsaved_body: "«{}» tiene cambios sin guardar. ¿Guardar antes de continuar?",
dont_save: "No guardar",
cancel: "Cancelar",
error_title: "Error",
ok: "Aceptar",
drop_to_open: "Suelte para abrir",
find: "Buscar",
no_matches: "No se encontraron resultados",
whole_word: "Palabra completa",
replace: "Reemplazar",
replace_all: "Reemplazar todo",
spellcheck: "Corrección ortográfica",
dict_error: "No se pudo descargar el diccionario",
dict_unavailable: "No hay ningún diccionario disponible para este idioma",
add_to_dict: "Añadir al diccionario",
view_readonly: "vista (solo lectura)",
cannot_open: "No se pudo abrir el archivo",
cannot_open_window: "No se pudo abrir una ventana nueva",
cannot_save: "No se pudo guardar el archivo",
cannot_save_settings: "No se pudieron guardar los ajustes",
cannot_read: "No se pudo leer el archivo",
invalid_utf8: "El archivo no es texto UTF-8 válido.",
invalid_rtf: "No se pudo convertir el archivo RTF a texto.",
too_large_edit: "El archivo es demasiado grande para editarlo en RavnPad. Esta vista es de solo lectura.",
drop_too_large: "El archivo es demasiado grande para abrirlo arrastrándolo. Ábralo desde el disco.",
update_available_title: "Actualización disponible",
update_available_body: "RavnPad {new} está disponible. Tienes {current}.",
update_now: "Actualizar",
update_later: "Más tarde",
update_checking: "Buscando actualizaciones…",
update_downloading: "Descargando actualización…",
update_uptodate: "RavnPad está actualizado ({version}).",
update_failed: "No se pudo actualizar RavnPad.",
update_unsupported: "Las actualizaciones automáticas no están disponibles en este sistema.",
decimal: ',',
};
const IT: UiText = UiText {
file_menu: "File",
language_menu: "Lingua",
settings_menu: "Impostazioni",
agent_menu: "Agente",
enable_agent: "Attiva modalità agente",
agent_enabled: "Modalità agente attiva",
font_label: "Carattere",
font_size_label: "Dimensione",
font_default: "Predefinito",
theme: "Tema",
theme_system: "Segui il sistema",
theme_light: "Chiaro",
theme_dark: "Scuro",
line_wrap: "A capo automatico",
new: "Nuovo",
new_window: "Nuova finestra",
recent_files: "File recenti",
open: "Apri…",
save: "Salva",
save_as: "Salva con nome…",
quit: "Esci",
help_menu: "Aiuto",
update_menu: "Verifica aggiornamenti…",
untitled: "Senza titolo",
untitled_file: "senza-titolo.txt",
chars_unit: "caratteri",
words_unit: "parole",
unsaved_title: "Modifiche non salvate",
unsaved_body: "«{}» contiene modifiche non salvate. Salvare prima di continuare?",
dont_save: "Non salvare",
cancel: "Annulla",
error_title: "Errore",
ok: "OK",
drop_to_open: "Rilascia per aprire",
find: "Cerca",
no_matches: "Nessun risultato",
whole_word: "Parola intera",
replace: "Sostituisci",
replace_all: "Sostituisci tutto",
spellcheck: "Controllo ortografico",
dict_error: "Impossibile scaricare il dizionario",
dict_unavailable: "Nessun dizionario disponibile per questa lingua",
add_to_dict: "Aggiungi al dizionario",
view_readonly: "visualizzazione (sola lettura)",
cannot_open: "Impossibile aprire il file",
cannot_open_window: "Impossibile aprire una nuova finestra",
cannot_save: "Impossibile salvare il file",
cannot_save_settings: "Impossibile salvare le impostazioni",
cannot_read: "Impossibile leggere il file",
invalid_utf8: "Il file non è testo UTF-8 valido.",
invalid_rtf: "Impossibile convertire il file RTF in testo.",
too_large_edit: "Il file è troppo grande per essere modificato in RavnPad. Questa vista è in sola lettura.",
drop_too_large: "Il file è troppo grande per l’apertura tramite trascinamento. Aprilo dal disco.",
update_available_title: "Aggiornamento disponibile",
update_available_body: "RavnPad {new} è disponibile. Hai {current}.",
update_now: "Aggiorna",
update_later: "Più tardi",
update_checking: "Verifica aggiornamenti…",
update_downloading: "Download dell’aggiornamento…",
update_uptodate: "RavnPad è aggiornato ({version}).",
update_failed: "Impossibile aggiornare RavnPad.",
update_unsupported: "Gli aggiornamenti automatici non sono disponibili su questo sistema.",
decimal: ',',
};
const PT: UiText = UiText {
file_menu: "Ficheiro",
language_menu: "Idioma",
settings_menu: "Definições",
agent_menu: "Agente",
enable_agent: "Ativar modo de agente",
agent_enabled: "Modo de agente ativo",
font_label: "Tipo de letra",
font_size_label: "Tamanho",
font_default: "Predefinido",
theme: "Tema",
theme_system: "Seguir o sistema",
theme_light: "Claro",
theme_dark: "Escuro",
line_wrap: "Moldar linhas longas",
new: "Novo",
new_window: "Nova janela",
recent_files: "Ficheiros recentes",
open: "Abrir…",
save: "Guardar",
save_as: "Guardar como…",
quit: "Sair",
help_menu: "Ajuda",
update_menu: "Procurar atualizações…",
untitled: "Sem título",
untitled_file: "sem-titulo.txt",
chars_unit: "caracteres",
words_unit: "palavras",
unsaved_title: "Alterações não guardadas",
unsaved_body: "«{}» tem alterações não guardadas. Guardar antes de continuar?",
dont_save: "Não guardar",
cancel: "Cancelar",
error_title: "Erro",
ok: "OK",
drop_to_open: "Largue para abrir",
find: "Localizar",
no_matches: "Nenhum resultado encontrado",
whole_word: "Palavra inteira",
replace: "Substituir",
replace_all: "Substituir tudo",
spellcheck: "Verificação ortográfica",
dict_error: "Não foi possível descarregar o dicionário",
dict_unavailable: "Não há dicionário disponível para este idioma",
add_to_dict: "Adicionar ao dicionário",
view_readonly: "visualização (só de leitura)",
cannot_open: "Não foi possível abrir o ficheiro",
cannot_open_window: "Não foi possível abrir uma nova janela",
cannot_save: "Não foi possível guardar o ficheiro",
cannot_save_settings: "Não foi possível guardar as definições",
cannot_read: "Não foi possível ler o ficheiro",
invalid_utf8: "O ficheiro não é texto UTF-8 válido.",
invalid_rtf: "Não foi possível converter o ficheiro RTF em texto.",
too_large_edit: "O ficheiro é demasiado grande para ser editado no RavnPad. Esta vista é só de leitura.",
drop_too_large: "O ficheiro é demasiado grande para abrir por arrastar. Abra-o a partir do disco.",
update_available_title: "Atualização disponível",
update_available_body: "RavnPad {new} está disponível. Você tem {current}.",
update_now: "Atualizar",
update_later: "Mais tarde",
update_checking: "A procurar atualizações…",
update_downloading: "A descarregar atualização…",
update_uptodate: "RavnPad está atualizado ({version}).",
update_failed: "Não foi possível atualizar o RavnPad.",
update_unsupported: "As atualizações automáticas não estão disponíveis neste sistema.",
decimal: ',',
};
const FI: UiText = UiText {
file_menu: "Tiedosto",
language_menu: "Kieli",
settings_menu: "Asetukset",
agent_menu: "Agentti",
enable_agent: "Ota agenttitila käyttöön",
agent_enabled: "Agenttitila käytössä",
font_label: "Fontti",
font_size_label: "Koko",
font_default: "Oletus",
theme: "Teema",
theme_system: "Noudata järjestelmää",
theme_light: "Vaalea",
theme_dark: "Tumma",
line_wrap: "Rivitä pitkät rivit",
new: "Uusi",
new_window: "Uusi ikkuna",
recent_files: "Viimeisimmät tiedostot",
open: "Avaa…",
save: "Tallenna",
save_as: "Tallenna nimellä…",
quit: "Lopeta",
help_menu: "Ohje",
update_menu: "Tarkista päivitykset…",
untitled: "Nimetön",
untitled_file: "nimetön.txt",
chars_unit: "merkkiä",
words_unit: "sanaa",
unsaved_title: "Tallentamattomia muutoksia",
unsaved_body: "Tiedostossa «{}» on tallentamattomia muutoksia. Tallennetaanko ennen jatkamista?",
dont_save: "Älä tallenna",
cancel: "Peruuta",
error_title: "Virhe",
ok: "OK",
drop_to_open: "Avaa pudottamalla",
find: "Etsi",
no_matches: "Ei osumia",
whole_word: "Koko sana",
replace: "Korvaa",
replace_all: "Korvaa kaikki",
spellcheck: "Oikeinkirjoitustarkistus",
dict_error: "Sanakirjaa ei voitu ladata",
dict_unavailable: "Tälle kielelle ei ole saatavilla sanakirjaa",
add_to_dict: "Lisää sanakirjaan",
view_readonly: "näkymä (vain luku)",
cannot_open: "Tiedostoa ei voitu avata",
cannot_open_window: "Uutta ikkunaa ei voitu avata",
cannot_save: "Tiedostoa ei voitu tallentaa",
cannot_save_settings: "Asetuksia ei voitu tallentaa",
cannot_read: "Tiedostoa ei voitu lukea",
invalid_utf8: "Tiedosto ei ole kelvollista UTF-8-tekstiä.",
invalid_rtf: "RTF-tiedostoa ei voitu muuntaa tekstiksi.",
too_large_edit: "Tiedosto on liian suuri muokattavaksi RavnPadissa. Näkymä on vain luku.",
drop_too_large: "Tiedosto on liian suuri avattavaksi raahaamalla. Avaa se levyltä.",
update_available_title: "Päivitys saatavilla",
update_available_body: "RavnPad {new} on saatavilla. Nykyinen versio on {current}.",
update_now: "Päivitä",
update_later: "Myöhemmin",
update_checking: "Tarkistetaan päivityksiä…",
update_downloading: "Ladataan päivitystä…",
update_uptodate: "RavnPad on ajan tasalla ({version}).",
update_failed: "RavnPadia ei voitu päivittää.",
update_unsupported: "Automaattiset päivitykset eivät ole käytettävissä tällä järjestelmällä.",
decimal: ',',
};
const PL: UiText = UiText {
file_menu: "Plik",
language_menu: "Język",
settings_menu: "Ustawienia",
agent_menu: "Agent",
enable_agent: "Włącz tryb agenta",
agent_enabled: "Tryb agenta aktywny",
font_label: "Czcionka",
font_size_label: "Rozmiar",
font_default: "Domyślna",
theme: "Motyw",
theme_system: "Zgodny z systemem",
theme_light: "Jasny",
theme_dark: "Ciemny",
line_wrap: "Zawijaj długie wiersze",
new: "Nowy",
new_window: "Nowe okno",
recent_files: "Ostatnie pliki",
open: "Otwórz…",
save: "Zapisz",
save_as: "Zapisz jako…",
quit: "Zakończ",
help_menu: "Pomoc",
update_menu: "Sprawdź aktualizacje…",
untitled: "Bez tytułu",
untitled_file: "bez-tytulu.txt",
chars_unit: "znaków",
words_unit: "wyrazów",
unsaved_title: "Niezapisane zmiany",
unsaved_body: "«{}» ma niezapisane zmiany. Zapisać przed kontynuowaniem?",
dont_save: "Nie zapisuj",
cancel: "Anuluj",
error_title: "Błąd",
ok: "OK",
drop_to_open: "Upuść, aby otworzyć",
find: "Szukaj",
no_matches: "Brak wyników",
whole_word: "Całe słowo",
replace: "Zamień",
replace_all: "Zamień wszystko",
spellcheck: "Sprawdzanie pisowni",
dict_error: "Nie można pobrać słownika",
dict_unavailable: "Brak słownika dla tego języka",
add_to_dict: "Dodaj do słownika",
view_readonly: "widok (tylko do odczytu)",
cannot_open: "Nie można otworzyć pliku",
cannot_open_window: "Nie można otworzyć nowego okna",
cannot_save: "Nie można zapisać pliku",
cannot_save_settings: "Nie można zapisać ustawień",
cannot_read: "Nie można odczytać pliku",
invalid_utf8: "Plik nie jest poprawnym tekstem UTF-8.",
invalid_rtf: "Nie można przekonwertować pliku RTF na tekst.",
too_large_edit: "Plik jest za duży, aby edytować go w RavnPad. Ten widok jest tylko do odczytu.",
drop_too_large: "Plik jest za duży, aby otworzyć go metodą przeciągnij i upuść. Otwórz go z dysku.",
update_available_title: "Dostępna aktualizacja",
update_available_body: "RavnPad {new} jest dostępny. Masz {current}.",
update_now: "Aktualizuj",
update_later: "Później",
update_checking: "Sprawdzanie aktualizacji…",
update_downloading: "Pobieranie aktualizacji…",
update_uptodate: "RavnPad jest aktualny ({version}).",
update_failed: "Nie można zaktualizować RavnPad.",
update_unsupported: "Automatyczne aktualizacje nie są dostępne w tym systemie.",
decimal: ',',
};
const IS: UiText = UiText {
file_menu: "Skrá",
language_menu: "Tungumál",
settings_menu: "Stillingar",
agent_menu: "Agent",
enable_agent: "Virkja agentaham",
agent_enabled: "Agentahamur virkur",
font_label: "Letur",
font_size_label: "Stærð",
font_default: "Sjálfgefið",
theme: "Þema",
theme_system: "Fylgja kerfi",
theme_light: "Ljóst",
theme_dark: "Dökkt",
line_wrap: "Línuskipta löngum línum",
new: "Nýtt",
new_window: "Nýr gluggi",
recent_files: "Nýlegar skrár",
open: "Opna…",
save: "Vista",
save_as: "Vista sem…",
quit: "Hætta",
help_menu: "Hjálp",
update_menu: "Leita að uppfærslum…",
untitled: "Ónefnt",
untitled_file: "onefnt.txt",
chars_unit: "stafir",
words_unit: "orð",
unsaved_title: "Óvistaðar breytingar",
unsaved_body: "„{}“ hefur óvistaðar breytingar. Vista áður en haldið er áfram?",
dont_save: "Ekki vista",
cancel: "Hætta við",
error_title: "Villa",
ok: "Í lagi",
drop_to_open: "Slepptu til að opna",
find: "Leita",
no_matches: "Engar niðurstöður",
whole_word: "Heilt orð",
replace: "Skipta út",
replace_all: "Skipta út öllu",
spellcheck: "Stafsetningarathugun",
dict_error: "Gat ekki sótt orðabókina",
dict_unavailable: "Engin orðabók er tiltæk fyrir þetta tungumál",
add_to_dict: "Bæta í orðabók",
view_readonly: "sýn (skrifvarið)",
cannot_open: "Gat ekki opnað skrána",
cannot_open_window: "Gat ekki opnað nýjan glugga",
cannot_save: "Gat ekki vistað skrána",
cannot_save_settings: "Gat ekki vistað stillingarnar",
cannot_read: "Gat ekki lesið skrána",
invalid_utf8: "Skráin er ekki gildur UTF-8-texti.",
invalid_rtf: "Gat ekki umbreytt RTF-skránni í texta.",
too_large_edit: "Skráin er of stór til að breyta í RavnPad. Þessi sýn er skrifvarin.",
drop_too_large: "Skráin er of stór til að opna með dragi og sleppi. Opnaðu hana af diski.",
update_available_title: "Uppfærsla í boði",
update_available_body: "RavnPad {new} er í boði. Þú ert með {current}.",
update_now: "Uppfæra",
update_later: "Seinna",
update_checking: "Leita að uppfærslum…",
update_downloading: "Sæki uppfærslu…",
update_uptodate: "RavnPad er uppfært ({version}).",
update_failed: "Gat ekki uppfært RavnPad.",
update_unsupported: "Sjálfvirkar uppfærslur eru ekki í boði á þessu kerfi.",
decimal: ',',
};
const CS: UiText = UiText {
file_menu: "Soubor",
language_menu: "Jazyk",
settings_menu: "Nastavení",
agent_menu: "Agent",
enable_agent: "Zapnout režim agenta",
agent_enabled: "Režim agenta je aktivní",
font_label: "Písmo",
font_size_label: "Velikost",
font_default: "Výchozí",
theme: "Motiv",
theme_system: "Podle systému",
theme_light: "Světlý",
theme_dark: "Tmavý",
line_wrap: "Zalamovat dlouhé řádky",
new: "Nový",
new_window: "Nové okno",
recent_files: "Nedávné soubory",
open: "Otevřít…",
save: "Uložit",
save_as: "Uložit jako…",
quit: "Konec",
help_menu: "Nápověda",
update_menu: "Zkontrolovat aktualizace…",
untitled: "Bez názvu",
untitled_file: "bez-nazvu.txt",
chars_unit: "znaků",
words_unit: "slov",
unsaved_title: "Neuložené změny",
unsaved_body: "«{}» obsahuje neuložené změny. Uložit před pokračováním?",
dont_save: "Neukládat",
cancel: "Zrušit",
error_title: "Chyba",
ok: "OK",
drop_to_open: "Přetáhněte pro otevření",
find: "Hledat",
no_matches: "Nebyly nalezeny žádné výsledky",
whole_word: "Celé slovo",
replace: "Nahradit",
replace_all: "Nahradit vše",
spellcheck: "Kontrola pravopisu",
dict_error: "Slovník se nepodařilo stáhnout",
dict_unavailable: "Pro tento jazyk není k dispozici žádný slovník",
add_to_dict: "Přidat do slovníku",
view_readonly: "zobrazení (jen ke čtení)",
cannot_open: "Soubor se nepodařilo otevřít",
cannot_open_window: "Nové okno se nepodařilo otevřít",
cannot_save: "Soubor se nepodařilo uložit",
cannot_save_settings: "Nastavení se nepodařilo uložit",
cannot_read: "Soubor se nepodařilo přečíst",
invalid_utf8: "Soubor není platný text UTF-8.",
invalid_rtf: "Soubor RTF se nepodařilo převést na text.",
too_large_edit: "Soubor je příliš velký na úpravy v RavnPad. Toto zobrazení je jen ke čtení.",
drop_too_large: "Soubor je příliš velký na otevření přetažením. Otevřete jej z disku.",
update_available_title: "Je k dispozici aktualizace",
update_available_body: "RavnPad {new} je k dispozici. Máte {current}.",
update_now: "Aktualizovat",
update_later: "Později",
update_checking: "Kontrola aktualizací…",
update_downloading: "Stahování aktualizace…",
update_uptodate: "RavnPad je aktuální ({version}).",
update_failed: "RavnPad se nepodařilo aktualizovat.",
update_unsupported: "Automatické aktualizace nejsou v tomto systému k dispozici.",
decimal: ',',
};
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn locale_nb_and_no_map_to_bokmal() {
assert_eq!(Lang::from_locale("nb_NO.UTF-8"), Some(Lang::Bokmal));
assert_eq!(Lang::from_locale("nb-NO"), Some(Lang::Bokmal));
assert_eq!(Lang::from_locale("no"), Some(Lang::Bokmal));
}
#[test]
fn locale_nn_maps_to_nynorsk() {
assert_eq!(Lang::from_locale("nn_NO.UTF-8"), Some(Lang::Nynorsk));
}
#[test]
fn unknown_locale_is_none() {
assert_eq!(Lang::from_locale("ja_JP"), None);
assert_eq!(Lang::from_code("xx"), None);
}
#[test]
fn every_language_has_unique_code() {
let mut codes: Vec<_> = Lang::ALL.iter().map(|lang| lang.code()).collect();
codes.sort_unstable();
codes.dedup();
assert_eq!(codes.len(), Lang::ALL.len());
}
#[test]
fn every_language_has_all_native_menu_labels() {
let ids = (24..=32).chain(35..=43);
for lang in Lang::ALL {
for id in ids.clone() {
assert!(
lang.native_label(id).is_some_and(|label| !label.is_empty()),
"missing native label {id} for {}",
lang.code()
);
}
}
}
}
pub struct IoText {
pub busy: &'static str,
pub recovery: &'static str,
pub description: &'static str,
pub restore: &'static str,
pub delete: &'static str,
pub conflict: &'static str,
}
impl Lang {
pub fn io_text(self) -> IoText {
let [busy, recovery, description, restore, delete, conflict] = match self {
Self::Bokmal => [
"Leser / lagrer…",
"Gjenoppretting",
"Ulagrede kopier fra tidligere økter",
"Gjenopprett",
"Slett",
"Filen er endret utenfor RavnPad. Åpne den på nytt, eller bruk Lagre som med et nytt filnavn.",
],
Self::Nynorsk => [
"Les / lagrar…",
"Gjenoppretting",
"Ulagra kopiar frå tidlegare økter",
"Gjenopprett",
"Slett",
"Fila er endra utanfor RavnPad. Opne henne på nytt, eller bruk Lagre som med eit nytt filnamn.",
],
Self::Swedish => [
"Läser / sparar…",
"Återställning",
"Osparade kopior från tidigare sessioner",
"Återställ",
"Ta bort",
"Filen har ändrats utanför RavnPad. Öppna den igen eller spara med ett nytt filnamn.",
],
Self::Danish => [
"Læser / gemmer…",
"Gendannelse",
"Ikke-gemte kopier fra tidligere sessioner",
"Gendan",
"Slet",
"Filen er ændret uden for RavnPad. Åbn den igen, eller gem med et nyt filnavn.",
],
Self::German => [
"Lesen / Speichern…",
"Wiederherstellung",
"Ungespeicherte Kopien früherer Sitzungen",
"Wiederherstellen",
"Löschen",
"Die Datei wurde außerhalb von RavnPad geändert. Öffnen Sie sie erneut oder speichern Sie unter einem neuen Namen.",
],
Self::Dutch => [
"Lezen / opslaan…",
"Herstel",
"Niet-opgeslagen kopieën van eerdere sessies",
"Herstellen",
"Verwijderen",
"Het bestand is buiten RavnPad gewijzigd. Open het opnieuw of sla het op onder een nieuwe naam.",
],
Self::French => [
"Lecture / enregistrement…",
"Récupération",
"Copies non enregistrées de sessions précédentes",
"Restaurer",
"Supprimer",
"Le fichier a été modifié en dehors de RavnPad. Rouvrez-le ou enregistrez-le sous un nouveau nom.",
],
Self::Spanish => [
"Leyendo / guardando…",
"Recuperación",
"Copias sin guardar de sesiones anteriores",
"Restaurar",
"Eliminar",
"El archivo se ha modificado fuera de RavnPad. Ábralo de nuevo o guárdelo con otro nombre.",
],
Self::Italian => [
"Lettura / salvataggio…",
"Ripristino",
"Copie non salvate di sessioni precedenti",
"Ripristina",
"Elimina",
"Il file è stato modificato fuori da RavnPad. Riaprilo o salvalo con un nuovo nome.",
],
Self::Portuguese => [
"A ler / guardar…",
"Recuperação",
"Cópias não guardadas de sessões anteriores",
"Restaurar",
"Eliminar",
"O ficheiro foi alterado fora do RavnPad. Abra-o novamente ou guarde-o com outro nome.",
],
Self::Finnish => [
"Luetaan / tallennetaan…",
"Palautus",
"Aiempien istuntojen tallentamattomat kopiot",
"Palauta",
"Poista",
"Tiedostoa on muutettu RavnPadin ulkopuolella. Avaa se uudelleen tai tallenna uudella nimellä.",
],
Self::Polish => [
"Odczyt / zapis…",
"Odzyskiwanie",
"Niezapisane kopie z poprzednich sesji",
"Przywróć",
"Usuń",
"Plik został zmieniony poza RavnPad. Otwórz go ponownie lub zapisz pod nową nazwą.",
],
Self::Icelandic => [
"Les / vista…",
"Endurheimt",
"Óvistaðar afrit úr fyrri lotum",
"Endurheimta",
"Eyða",
"Skránni var breytt utan RavnPad. Opnaðu hana aftur eða vistaðu með nýju nafni.",
],
Self::Czech => [
"Čtení / ukládání…",
"Obnovení",
"Neuložené kopie z předchozích relací",
"Obnovit",
"Smazat",
"Soubor byl změněn mimo RavnPad. Otevřete jej znovu nebo uložte pod novým názvem.",
],
Self::English => [
"Reading / saving…",
"Recovery",
"Unsaved copies from earlier sessions",
"Restore",
"Delete",
"The file changed outside RavnPad. Reopen it, or use Save As with a new filename.",
],
};
IoText {
busy,
recovery,
description,
restore,
delete,
conflict,
}
}
}