From 3cecc1f475d8f2d34f6e2519a8f7f9168296a494 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Tue, 14 Jun 2016 19:55:30 -0700 Subject: [PATCH] trivial locale cleanups Clarify the purpose of the `N_()` macro. Remove inconsistent capitalization of two strings in the parser module. --- po/de.po | 8 ++++---- po/en.po | 8 ++++---- po/fr.po | 4 ++-- po/pt_BR.po | 8 ++++---- po/sv.po | 8 ++++---- po/zh_CN.po | 8 ++++---- src/common.h | 6 ++++-- src/parser.cpp | 4 ++-- 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/po/de.po b/po/de.po index 7a9d90d05..b67292666 100644 --- a/po/de.po +++ b/po/de.po @@ -1056,8 +1056,8 @@ msgid "'for' block" msgstr "'for'-Block" #: parser.cpp:77 parse_constants.h:265 -msgid "Block created by breakpoint" -msgstr "" +msgid "block created by breakpoint" +msgstr "block created by breakpoint" #: parser.cpp:82 parse_constants.h:272 msgid "'if' conditional block" @@ -1097,8 +1097,8 @@ msgid "'begin' unconditional block" msgstr "'begin' unbedingter Block" #: parser.cpp:127 parse_constants.h:325 -msgid "Block created by the . builtin" -msgstr "" +msgid "block created by the . builtin" +msgstr "block created by the . builtin" #: parser.cpp:132 parse_constants.h:330 #, fuzzy diff --git a/po/en.po b/po/en.po index 51e2515d3..f1151a543 100644 --- a/po/en.po +++ b/po/en.po @@ -1050,8 +1050,8 @@ msgid "'for' block" msgstr "“for” block" #: parser.cpp:77 parse_constants.h:265 -msgid "Block created by breakpoint" -msgstr "Block created by breakpoint" +msgid "block created by breakpoint" +msgstr "block created by breakpoint" #: parser.cpp:82 parse_constants.h:272 msgid "'if' conditional block" @@ -1090,8 +1090,8 @@ msgid "'begin' unconditional block" msgstr "“begin” unconditional block" #: parser.cpp:127 parse_constants.h:325 -msgid "Block created by the . builtin" -msgstr "Block created by the . builtin" +msgid "block created by the . builtin" +msgstr "block created by the . builtin" #: parser.cpp:132 parse_constants.h:330 msgid "event handler block" diff --git a/po/fr.po b/po/fr.po index a7574c03d..70105dbe2 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1069,7 +1069,7 @@ msgstr "bloc 'for'" #: parser.cpp:77 parse_constants.h:265 #, fuzzy -msgid "Block created by breakpoint" +msgid "block created by breakpoint" msgstr "bloc créé par la commande interne '.'" #: parser.cpp:82 parse_constants.h:272 @@ -1110,7 +1110,7 @@ msgid "'begin' unconditional block" msgstr "bloc inconditionnel 'begin'" #: parser.cpp:127 parse_constants.h:325 -msgid "Block created by the . builtin" +msgid "block created by the . builtin" msgstr "bloc créé par la commande interne '.'" #: parser.cpp:132 parse_constants.h:330 diff --git a/po/pt_BR.po b/po/pt_BR.po index 8bf4be18b..1225812fd 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1063,8 +1063,8 @@ msgid "'for' block" msgstr "bloco “for”" #: parser.cpp:77 parse_constants.h:265 -msgid "Block created by breakpoint" -msgstr "Bloco criado por breakpoint" +msgid "block created by breakpoint" +msgstr "bloco criado por breakpoint" #: parser.cpp:82 parse_constants.h:272 msgid "'if' conditional block" @@ -1104,8 +1104,8 @@ msgid "'begin' unconditional block" msgstr "bloco não condicional “begin”" #: parser.cpp:127 parse_constants.h:325 -msgid "Block created by the . builtin" -msgstr "Bloco criado pelo builtin ." +msgid "block created by the . builtin" +msgstr "bloco criado pelo builtin ." #: parser.cpp:132 parse_constants.h:330 #, fuzzy diff --git a/po/sv.po b/po/sv.po index 0730d6579..2eabe166e 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1061,8 +1061,8 @@ msgid "'for' block" msgstr "'for' block" #: parser.cpp:77 parse_constants.h:265 -msgid "Block created by breakpoint" -msgstr "Block skapat av det inbuggde kommandot breakpoint" +msgid "block created by breakpoint" +msgstr "block skapat av det inbuggde kommandot breakpoint" #: parser.cpp:82 parse_constants.h:272 msgid "'if' conditional block" @@ -1101,8 +1101,8 @@ msgid "'begin' unconditional block" msgstr "'begin' ovillkorligen exekverat block" #: parser.cpp:127 parse_constants.h:325 -msgid "Block created by the . builtin" -msgstr "Block skapat av det inbyggda kommandot '.'" +msgid "block created by the . builtin" +msgstr "block skapat av det inbyggda kommandot '.'" #: parser.cpp:132 parse_constants.h:330 msgid "event handler block" diff --git a/po/zh_CN.po b/po/zh_CN.po index 08b54db51..391f76fc7 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1039,8 +1039,8 @@ msgid "'for' block" msgstr "“for” block" #: parser.cpp:77 parse_constants.h:265 -msgid "Block created by breakpoint" -msgstr "Block created by breakpoint" +msgid "block created by breakpoint" +msgstr "block created by breakpoint" #: parser.cpp:82 parse_constants.h:272 msgid "'if' conditional block" @@ -1079,8 +1079,8 @@ msgid "'begin' unconditional block" msgstr "“begin” unconditional block" #: parser.cpp:127 parse_constants.h:325 -msgid "Block created by the . builtin" -msgstr "Block created by the . builtin" +msgid "block created by the . builtin" +msgstr "block created by the . builtin" #: parser.cpp:132 parse_constants.h:330 msgid "event handler block" diff --git a/src/common.h b/src/common.h index 87fefed34..b8791279c 100644 --- a/src/common.h +++ b/src/common.h @@ -229,8 +229,10 @@ void write_ignore(int fd, const void *buff, size_t count); /// Shorthand for wgettext call in situations where a C-style string is needed (e.g., fwprintf()). #define _(wstr) wgettext(wstr).c_str() -/// Noop, used to tell xgettext that a string should be translated, even though it is not directly -/// sent to wgettext. +/// Noop, used to tell xgettext that a string should be translated. Use this when a string cannot be +/// passed through wgettext() at the point where it is used. For example, when initializing a +/// static array or structure. You must pass the string through wgettext() when it is used. +/// See https://developer.gnome.org/glib/stable/glib-I18N.html#N-:CAPS #define N_(wstr) wstr /// Check if the specified string element is a part of the specified string list. diff --git a/src/parser.cpp b/src/parser.cpp index 86026f80b..6b19f3496 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -37,7 +37,7 @@ class io_chain_t; #define FOR_BLOCK N_(L"'for' block") /// Breakpoint block. -#define BREAKPOINT_BLOCK N_(L"Block created by breakpoint") +#define BREAKPOINT_BLOCK N_(L"block created by breakpoint") /// If block description. #define IF_BLOCK N_(L"'if' conditional block") @@ -67,7 +67,7 @@ class io_chain_t; #define BEGIN_BLOCK N_(L"'begin' unconditional block") /// Source block description. -#define SOURCE_BLOCK N_(L"Block created by the . builtin") +#define SOURCE_BLOCK N_(L"block created by the . builtin") /// Source block description. #define EVENT_BLOCK N_(L"event handler block")