diff --git a/localization/po/de.po b/localization/po/de.po index 48003f15e..03f38a294 100644 --- a/localization/po/de.po +++ b/localization/po/de.po @@ -110,12 +110,12 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "" #, c-format -msgid "%s (line %d): " -msgstr "%s (Zeile %d): " +msgid "%s (line %d):" +msgstr "%s (Zeile %d):" #, c-format -msgid "%s (line %u): " -msgstr "%s (Zeile %u): " +msgid "%s (line %u):" +msgstr "%s (Zeile %u):" #, c-format msgid "%s and %s are mutually exclusive" @@ -1474,12 +1474,12 @@ msgid "Standard input" msgstr "Standardeingabe" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "" #, c-format -msgid "Startup (line %d): " -msgstr "Start (Zeile %d): " +msgid "Startup (line %d):" +msgstr "Start (Zeile %d):" msgid "State\tCommand" msgstr "Status\tBefehl" @@ -1848,8 +1848,8 @@ msgstr "Zeilen %u bis %u von %u" msgid "running" msgstr "aktiv" -msgid "search: " -msgstr "Suche: " +msgid "search:" +msgstr "Suche:" msgid "stopped" msgstr "gestoppt" diff --git a/localization/po/en.po b/localization/po/en.po index 1961a10c3..d039005ed 100644 --- a/localization/po/en.po +++ b/localization/po/en.po @@ -110,12 +110,12 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "" #, c-format -msgid "%s (line %d): " -msgstr "%s (line %d): " +msgid "%s (line %d):" +msgstr "%s (line %d):" #, c-format -msgid "%s (line %u): " -msgstr "%s (line %u): " +msgid "%s (line %u):" +msgstr "%s (line %u):" #, c-format msgid "%s and %s are mutually exclusive" @@ -1474,11 +1474,11 @@ msgid "Standard input" msgstr "Standard input" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "" #, c-format -msgid "Startup (line %d): " +msgid "Startup (line %d):" msgstr "" msgid "State\tCommand" @@ -1848,8 +1848,8 @@ msgstr "rows %u to %u of %u" msgid "running" msgstr "running" -msgid "search: " -msgstr "search: " +msgid "search:" +msgstr "search:" msgid "stopped" msgstr "stopped" diff --git a/localization/po/fr.po b/localization/po/fr.po index 7fc075619..536630a68 100644 --- a/localization/po/fr.po +++ b/localization/po/fr.po @@ -239,12 +239,12 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "%s %s : fonctionnalité non reconnue « %s »" #, c-format -msgid "%s (line %d): " -msgstr "%s (ligne %d) : " +msgid "%s (line %d):" +msgstr "%s (ligne %d) :" #, c-format -msgid "%s (line %u): " -msgstr "%s (ligne %u) : " +msgid "%s (line %u):" +msgstr "%s (ligne %u) :" #, c-format msgid "%s and %s are mutually exclusive" @@ -1603,11 +1603,11 @@ msgid "Standard input" msgstr "Entrée standard" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "" #, c-format -msgid "Startup (line %d): " +msgid "Startup (line %d):" msgstr "" msgid "State\tCommand" @@ -1977,7 +1977,7 @@ msgstr "lignes %u à %u de %u" msgid "running" msgstr "en cours d’exécution" -msgid "search: " +msgid "search:" msgstr "recherche :" msgid "stopped" diff --git a/localization/po/pl.po b/localization/po/pl.po index f0f7e0ad7..d97ccc95b 100644 --- a/localization/po/pl.po +++ b/localization/po/pl.po @@ -106,12 +106,12 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "" #, c-format -msgid "%s (line %d): " -msgstr "%s (linia %d): " +msgid "%s (line %d):" +msgstr "%s (linia %d):" #, c-format -msgid "%s (line %u): " -msgstr "%s (linia %u): " +msgid "%s (line %u):" +msgstr "%s (linia %u):" #, c-format msgid "%s and %s are mutually exclusive" @@ -1470,11 +1470,11 @@ msgid "Standard input" msgstr "Standardowe wejście" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "" #, c-format -msgid "Startup (line %d): " +msgid "Startup (line %d):" msgstr "" msgid "State\tCommand" @@ -1844,7 +1844,7 @@ msgstr "rzędy od %u do %u z %u" msgid "running" msgstr "uruchomiona" -msgid "search: " +msgid "search:" msgstr "wyszukiwanie:" msgid "stopped" diff --git a/localization/po/pt_BR.po b/localization/po/pt_BR.po index 969c1377b..8b252c810 100644 --- a/localization/po/pt_BR.po +++ b/localization/po/pt_BR.po @@ -111,12 +111,12 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "" #, c-format -msgid "%s (line %d): " -msgstr "%s (linha %d): " +msgid "%s (line %d):" +msgstr "%s (linha %d):" #, c-format -msgid "%s (line %u): " -msgstr "%s (linha %u): " +msgid "%s (line %u):" +msgstr "%s (linha %u):" #, c-format msgid "%s and %s are mutually exclusive" @@ -1475,11 +1475,11 @@ msgid "Standard input" msgstr "Entrada padrão" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "" #, c-format -msgid "Startup (line %d): " +msgid "Startup (line %d):" msgstr "" msgid "State\tCommand" @@ -1849,8 +1849,8 @@ msgstr "linhas %u a %u de %u" msgid "running" msgstr "" -msgid "search: " -msgstr "procurar: " +msgid "search:" +msgstr "procurar:" msgid "stopped" msgstr "parado" diff --git a/localization/po/sv.po b/localization/po/sv.po index 7e30db200..f54118fde 100644 --- a/localization/po/sv.po +++ b/localization/po/sv.po @@ -107,11 +107,11 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "" #, c-format -msgid "%s (line %d): " -msgstr "%s (rad %d): " +msgid "%s (line %d):" +msgstr "%s (rad %d):" #, c-format -msgid "%s (line %u): " +msgid "%s (line %u):" msgstr "" #, c-format @@ -1471,11 +1471,11 @@ msgid "Standard input" msgstr "Standard in" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "" #, c-format -msgid "Startup (line %d): " +msgid "Startup (line %d):" msgstr "" msgid "State\tCommand" @@ -1845,7 +1845,7 @@ msgstr "" msgid "running" msgstr "körande" -msgid "search: " +msgid "search:" msgstr "" msgid "stopped" diff --git a/localization/po/zh_CN.po b/localization/po/zh_CN.po index 48edb1e2c..be33c3e74 100644 --- a/localization/po/zh_CN.po +++ b/localization/po/zh_CN.po @@ -131,12 +131,12 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "%s %s: 未识别的特性 '%s'" #, c-format -msgid "%s (line %d): " -msgstr "%s (行 %d): " +msgid "%s (line %d):" +msgstr "%s (行 %d):" #, c-format -msgid "%s (line %u): " -msgstr "%s (行 %u): " +msgid "%s (line %u):" +msgstr "%s (行 %u):" #, c-format msgid "%s and %s are mutually exclusive" @@ -1498,11 +1498,11 @@ msgid "Standard input" msgstr "标准输入" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "标准输入 (行 %d):" #, c-format -msgid "Startup (line %d): " +msgid "Startup (line %d):" msgstr "启动 (行 %d):" msgid "State\tCommand" @@ -1875,8 +1875,8 @@ msgstr "第 %u 行至第 %u 行,共 %u 行" msgid "running" msgstr "运行中" -msgid "search: " -msgstr "搜索: " +msgid "search:" +msgstr "搜索:" msgid "stopped" msgstr "已终止" diff --git a/localization/po/zh_TW.po b/localization/po/zh_TW.po index b9c04d3a0..894f0be51 100644 --- a/localization/po/zh_TW.po +++ b/localization/po/zh_TW.po @@ -104,11 +104,11 @@ msgid "%s %s: unrecognized feature '%s'" msgstr "%s %s:不認識的功能「%s」" #, c-format -msgid "%s (line %d): " +msgid "%s (line %d):" msgstr "%s(第 %d 行):" #, c-format -msgid "%s (line %u): " +msgid "%s (line %u):" msgstr "%s(第 %u 行):" #, c-format @@ -1473,11 +1473,11 @@ msgid "Standard input" msgstr "標準輸入流" #, c-format -msgid "Standard input (line %d): " +msgid "Standard input (line %d):" msgstr "標準輸入流(第 %d 行):" #, c-format -msgid "Startup (line %d): " +msgid "Startup (line %d):" msgstr "啟動命令稿(第 %d 行):" msgid "State\tCommand" @@ -1850,7 +1850,7 @@ msgstr "第 %u 至 %u 列,共 %u 列" msgid "running" msgstr "執行中" -msgid "search: " +msgid "search:" msgstr "搜尋:" msgid "stopped" diff --git a/src/pager.rs b/src/pager.rs index 2d0003f21..f9fe9a6a4 100644 --- a/src/pager.rs +++ b/src/pager.rs @@ -80,7 +80,7 @@ pub enum SelectionMotion { localizable_consts!( /// Text we use for the search field. SEARCH_FIELD_PROMPT - "search: " + "search:" ); const PAGER_SELECTION_NONE: usize = usize::MAX; @@ -327,7 +327,7 @@ fn completion_try_print( let mut search_field_remaining = term_width - 1; search_field_remaining -= print_max( CharOffset::None, - wgettext!(SEARCH_FIELD_PROMPT), + &sprintf!("%s ", wgettext!(SEARCH_FIELD_PROMPT)), HighlightSpec::new(), search_field_remaining, false, @@ -1043,7 +1043,8 @@ pub fn set_fully_disclosed(&mut self) { // Position of the cursor. pub fn cursor_position(&self) -> usize { - let mut result = wgettext!(SEARCH_FIELD_PROMPT).len() + self.search_field_line.position(); + let mut result = + wgettext!(SEARCH_FIELD_PROMPT).len() + 1 + self.search_field_line.position(); // Clamp it to the right edge. if self.available_term_width > 0 && result + 1 > self.available_term_width { result = self.available_term_width - 1; diff --git a/src/parser.rs b/src/parser.rs index 21ee8a141..de19fa64a 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -791,15 +791,16 @@ pub fn current_line(&self) -> WString { if !self.is_interactive() || self.is_function() { if let Some(file) = file { prefix.push_utfstr(&wgettext_fmt!( - "%s (line %d): ", + "%s (line %d):", &user_presentable_path(&file, self.vars()), lineno )); } else if self.libdata().within_fish_init { - prefix.push_utfstr(&wgettext_fmt!("Startup (line %d): ", lineno)); + prefix.push_utfstr(&wgettext_fmt!("Startup (line %d):", lineno)); } else { - prefix.push_utfstr(&wgettext_fmt!("Standard input (line %d): ", lineno)); + prefix.push_utfstr(&wgettext_fmt!("Standard input (line %d):", lineno)); } + prefix.push(' '); } let skip_caret = self.is_interactive() && !self.is_function(); @@ -1190,11 +1191,13 @@ pub fn get_backtrace(&self, src: &wstr, errors: &ParseErrorList) -> WString { let prefix = if let Some(filename) = self.current_filename() { if which_line > 0 { - wgettext_fmt!( - "%s (line %u): ", + let mut prefix = wgettext_fmt!( + "%s (line %u):", user_presentable_path(&filename, self.vars()), which_line - ) + ); + prefix.push(' '); + prefix } else { sprintf!("%s: ", user_presentable_path(&filename, self.vars())) }