From d5857ee15b28af5de57614348f930046e122ba85 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Mon, 25 Feb 2008 00:30:21 +0100 Subject: libalpm/sync.c : fix poorly worded debug message. Signed-off-by: Chantry Xavier --- lib/libalpm/sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 44fef4e7..a927f61b 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -170,7 +170,7 @@ static int find_replacements(pmtrans_t *trans, pmdb_t *db_local, sync->data = alpm_list_add(NULL, dummy); *syncpkgs = alpm_list_add(*syncpkgs, sync); } - _alpm_log(PM_LOG_DEBUG, "%s-%s elected for upgrade (to be replaced by %s-%s)\n", + _alpm_log(PM_LOG_DEBUG, "%s-%s elected for removal (to be replaced by %s-%s)\n", alpm_pkg_get_name(lpkg), alpm_pkg_get_version(lpkg), alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg)); } -- cgit v1.2.3-24-g4f1b From 7eaad2f2a9879499d29e20bb897b018f0b13f6c1 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Mon, 25 Feb 2008 21:52:53 +0100 Subject: xgettext : change pass-c-format flag to c-format. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently xgettext apparently attempts to autodetect c format strings (eg a string with a %s) to decide whether to use c-format flag or not. If we use --flag=_:1:c-format instead of --flag=_:1:pass-c-format, the c-format will be applied everywhere. I couldn't find this documented anywhere though. But the pass prefix is mentioned here : http://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html#xgettext-Invocation "Specifies additional flags for strings occurring as part of the argth argument of the function word. The possible flags are the possible format string indicators, such as ‘c-format’, and their negations, such as ‘no-c-format’, possibly prefixed with ‘pass-’." And c-format is documented there : http://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.html#c_002dformat-Flag "This situation happens quite often. The printf function is often called with strings which do not contain a format specifier. Of course one would normally use fputs but it does happen. In this case xgettext does not recognize this as a format string but what happens if the translation introduces a valid format specifier? The printf function will try to access one of the parameters but none exists because the original code does not pass any parameters." And that's exactly what happened with FS#9658. So using c-format for every string will prevent this issue from happening again. Signed-off-by: Chantry Xavier --- lib/libalpm/po/Makevars | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/po/Makevars b/lib/libalpm/po/Makevars index 1b1b8279..d7515220 100644 --- a/lib/libalpm/po/Makevars +++ b/lib/libalpm/po/Makevars @@ -9,8 +9,8 @@ top_builddir = ../../../ # These options get passed to xgettext. XGETTEXT_OPTIONS = \ - --keyword=_ --flag=_:1:pass-c-format \ - --keyword=N_ --flag=N_:1:pass-c-format + --keyword=_ --flag=_:1:c-format \ + --keyword=N_ --flag=N_:1:c-format # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -- cgit v1.2.3-24-g4f1b From 66591e8284054adcefb416a5331916a6812582a8 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Mon, 25 Feb 2008 22:19:05 +0100 Subject: fix two broken translated strings. Using c-format on every strings allowed me two found two broken ones. One was harmless, but the other caused a segfault, as reported in FS#9658. Signed-off-by: Chantry Xavier --- lib/libalpm/po/pl.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/po/pl.po b/lib/libalpm/po/pl.po index da5e581b..27b8ce85 100644 --- a/lib/libalpm/po/pl.po +++ b/lib/libalpm/po/pl.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Pacman package manager 3.0.1\n" "Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n" "POT-Creation-Date: 2008-01-14 23:08-0600\n" -"PO-Revision-Date: 2007-04-12 04:23+0200\n" +"PO-Revision-Date: 2008-02-25 22:16+0100\n" "Last-Translator: Mateusz Herych \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" @@ -154,7 +154,7 @@ msgstr "ścieżka bazy danych jest niezdefiniowana\n" #: lib/libalpm/deps.c:171 msgid "dependency cycle detected:\n" -msgstr "wykryto cykl zależności: %s\n" +msgstr "wykryto cykl zależności:\n" #: lib/libalpm/deps.c:173 #, c-format -- cgit v1.2.3-24-g4f1b From 7a9d444de874f7e814b36711d3cfc51224f3385c Mon Sep 17 00:00:00 2001 From: "甘露(Lu.Gan)" Date: Mon, 25 Feb 2008 14:48:14 +0100 Subject: Update simplified chinese (zh_CN) translation. Signed-off-by: Chantry Xavier --- lib/libalpm/po/zh_CN.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/po/zh_CN.po b/lib/libalpm/po/zh_CN.po index aeb17d95..c33bb0fb 100644 --- a/lib/libalpm/po/zh_CN.po +++ b/lib/libalpm/po/zh_CN.po @@ -2,20 +2,20 @@ # Copyright (C) 2008 Judd Vinet # This file is distributed under the same license as the Pacman package manager package. # 甘露(Lu.Gan) , 2008. -# -# -# +# +# +# msgid "" msgstr "" "Project-Id-Version: Pacman package manager 3.1.2\n" "Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n" "POT-Creation-Date: 2008-01-14 23:08-0600\n" -"PO-Revision-Date: 2008-02-22 20:42+0800\n" +"PO-Revision-Date: 2008-02-25 20:25+0100\n" "Last-Translator: 甘露(Lu.Gan) \n" "Language-Team: Chinese/Simplified \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit" +"Content-Transfer-Encoding: 8bit\n" #: lib/libalpm/add.c:86 #, c-format @@ -48,7 +48,8 @@ msgstr "你可以使用 -Rd 及 -U 来手动替代软件包\n" msgid "" "directory permissions differ on %s\n" "filesystem: %o package: %o\n" -msgstr "目录权限不一致%s\n" +msgstr "" +"目录权限不一致%s\n" "文件系统:%o 软件包:%o\n" #: lib/libalpm/add.c:404 @@ -493,8 +494,8 @@ msgstr "%s-%s:忽略软件包更新(由%s-%s替代)\n" #: lib/libalpm/sync.c:248 #, c-format -msgid "%s-%s: ignoring package upgrade (%s => %s)\n" -msgstr "%s-%s:忽略软件包更新(%s => %s)\n" +msgid "%s: ignoring package upgrade (%s => %s)\n" +msgstr "%s:忽略软件包更新(%s => %s)\n" #: lib/libalpm/sync.c:309 #, c-format @@ -652,4 +653,3 @@ msgstr "md5:%s无法打开\n" #, c-format msgid "md5: %s can't be read\n" msgstr "md5:%s无法读取\n" - -- cgit v1.2.3-24-g4f1b