mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 19:41:15 -03:00
gettext: remove trailing spaces
Another step towards trimming the localizable strings. Fix inconsistencies in some of the translations. Translations for zh_CN are not entirely consistent between using ASCII colons and `:`. If the latter is used, which also happens for zh_TW, no trailing space is present in the translation even if it is present in the msgid. This means that the new code will show excessive whitespace after these colons, since a regular space is inserted outside of the localization code. While this might not be pretty, I don't think it really breaks anything, and not having to deal with trailing whitespace simplifies working with Fluent. Part of #12405
This commit is contained in:
committed by
Johannes Altmanninger
parent
12bd4cf9e9
commit
25e2bdb7de
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 "已终止"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user