mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 09:51:50 -05:00
Merge branch 'maint'
Conflicts: src/pacman/callback.c
This commit is contained in:
commit
3ad3077d8d
4
NEWS
4
NEWS
@ -5,9 +5,13 @@ VERSION DESCRIPTION
|
||||
- mark gensync and updatesync as deprecated
|
||||
- fix pacman -Qo behavior on symlinks (FS#9473)
|
||||
- fix segfault on a broken symlinks in backup code (FS#9235)
|
||||
- ensure filename is determined correctly for a pkg (FS#9547)
|
||||
- fix conflict progress bar with UTF-8 chars (FS#6437)
|
||||
- fix chk_fileconflicts brokenness, ensure it reads entire list
|
||||
- ensure -Sc operation locks DB, only checks DBs (FS#9609)
|
||||
- minor documentation and message updates
|
||||
- moved some translations to their more generic lang codes
|
||||
- allow scripts to be run without gettext installed
|
||||
- makepkg:
|
||||
- check to ensure we have non-URL sources (FS#9208)
|
||||
- ensure we strip binaries in /opt/ dirs (FS#9342)
|
||||
|
@ -40,4 +40,6 @@ Brazilian Portuguese (pt_BR):
|
||||
Leandro Inácio <leandro@archlinux-br.org>
|
||||
Russian (ru):
|
||||
Vladimir Bayrakovskiy <4rayven@gmail.com>
|
||||
Simplified Chinese (zh_CN):
|
||||
甘露(Lu.Gan) <rhythm.gan@gmail.com>
|
||||
|
||||
|
@ -46,13 +46,13 @@ AC_PREREQ(2.60)
|
||||
# For code under development: [devel]
|
||||
# For production releases: []
|
||||
|
||||
m4_define([lib_current], [3])
|
||||
m4_define([lib_current], [4])
|
||||
m4_define([lib_revision], [0])
|
||||
m4_define([lib_age], [1])
|
||||
m4_define([lib_age], [2])
|
||||
|
||||
m4_define([pacman_version_major], [3])
|
||||
m4_define([pacman_version_minor], [1])
|
||||
m4_define([pacman_version_micro], [1])
|
||||
m4_define([pacman_version_micro], [2])
|
||||
m4_define([pacman_version_suffix], [])
|
||||
m4_define([pacman_version],
|
||||
[pacman_version_major.pacman_version_minor.pacman_version_micro])
|
||||
|
@ -9,3 +9,4 @@ it
|
||||
pl
|
||||
pt_BR
|
||||
ru
|
||||
zh_CN
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Russian translations for Pacman package manager package.
|
||||
# Copyright (C) 2007 Judd Vinet <jvinet@zeroflux.org>
|
||||
# This file is distributed under the same license as the Pacman package manager package.
|
||||
# <4rayven@gmail.com>, 2007.
|
||||
# <4rayven@gmail.com>, 2007. <serg.partizan@gmail.com> 2008
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@ -380,7 +380,7 @@ msgstr "%s: принудительно обновляю до версии %s\n"
|
||||
#: lib/libalpm/package.c:849
|
||||
#, c-format
|
||||
msgid "%s: local (%s) is newer than %s (%s)\n"
|
||||
msgstr "%s: установленная версия (%s) новее, чем %s (%s)\n"
|
||||
msgstr "%s: установленная версия (%s) новее, чем в %s (%s)\n"
|
||||
|
||||
#: lib/libalpm/package.c:1027
|
||||
#, c-format
|
||||
@ -534,7 +534,7 @@ msgstr "не удалось получить md5 контрольную сумм
|
||||
#: lib/libalpm/sync.c:902
|
||||
#, c-format
|
||||
msgid "file %s was corrupted (bad MD5 checksum)\n"
|
||||
msgstr "архив %s поврежден (не сходится MD5 контрольная сумма)\n"
|
||||
msgstr "архив %s поврежден (не сходятся контрольные MD5-суммы)\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1049
|
||||
#, c-format
|
||||
|
655
lib/libalpm/po/zh_CN.po
Normal file
655
lib/libalpm/po/zh_CN.po
Normal file
@ -0,0 +1,655 @@
|
||||
# Chinese/Simplified translation of Pacman package manager package.
|
||||
# Copyright (C) 2008 Judd Vinet <jvinet@zeroflux.org>
|
||||
# This file is distributed under the same license as the Pacman package manager package.
|
||||
# 甘露(Lu.Gan) <rhythm.gan@gmail.com>, 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"
|
||||
"Last-Translator: 甘露(Lu.Gan) <rhythm.gan@gmail.com>\n"
|
||||
"Language-Team: Chinese/Simplified <i18n-translation@lists.linux.net.cn>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit"
|
||||
|
||||
#: lib/libalpm/add.c:86
|
||||
#, c-format
|
||||
msgid "replacing older version %s-%s by %s in target list\n"
|
||||
msgstr "正在替换老版本 %s-%s 通过在目标清单中的%s\n"
|
||||
|
||||
#: lib/libalpm/add.c:95
|
||||
#, c-format
|
||||
msgid "newer version %s-%s is in the target list -- skipping\n"
|
||||
msgstr "较新版本 %s-%s 在目标清单中 -- 跳过\n"
|
||||
|
||||
#: lib/libalpm/add.c:166
|
||||
msgid "conflicting packages were found in the target list\n"
|
||||
msgstr "目标清单中发现有冲突的软件包\n"
|
||||
|
||||
#: lib/libalpm/add.c:167
|
||||
msgid "you cannot install two conflicting packages at the same time\n"
|
||||
msgstr "你不能同时安装有冲突的两个软件包\n"
|
||||
|
||||
#: lib/libalpm/add.c:170
|
||||
msgid "replacing packages with -A and -U is not supported yet\n"
|
||||
msgstr "正在使用 -A 替代软件包, -U 目前尚不支持\n"
|
||||
|
||||
#: lib/libalpm/add.c:171
|
||||
msgid "you can replace packages manually using -Rd and -U\n"
|
||||
msgstr "你可以使用 -Rd 及 -U 来手动替代软件包\n"
|
||||
|
||||
#: lib/libalpm/add.c:377
|
||||
#, c-format
|
||||
msgid ""
|
||||
"directory permissions differ on %s\n"
|
||||
"filesystem: %o package: %o\n"
|
||||
msgstr "目录权限不一致%s\n"
|
||||
"文件系统:%o 软件包:%o\n"
|
||||
|
||||
#: lib/libalpm/add.c:404
|
||||
#, c-format
|
||||
msgid "extract: symlink %s does not point to dir\n"
|
||||
msgstr "解压缩:链接 %s 没有指向目录\n"
|
||||
|
||||
#: lib/libalpm/add.c:411
|
||||
#, c-format
|
||||
msgid "extract: not overwriting dir with file %s\n"
|
||||
msgstr "解压缩:没有用 %s 覆盖目录\n"
|
||||
|
||||
#: lib/libalpm/add.c:466 lib/libalpm/add.c:610 lib/libalpm/util.c:428
|
||||
#, c-format
|
||||
msgid "could not extract %s (%s)\n"
|
||||
msgstr "无法解压缩 %s (%s)\n"
|
||||
|
||||
#: lib/libalpm/add.c:517
|
||||
#, c-format
|
||||
msgid "could not rename %s (%s)\n"
|
||||
msgstr "无法重命名 %s (%s)\n"
|
||||
|
||||
#: lib/libalpm/add.c:524 lib/libalpm/add.c:544 lib/libalpm/trans.c:508
|
||||
#, c-format
|
||||
msgid "could not copy tempfile to %s (%s)\n"
|
||||
msgstr "无法复制临时文件到 %s (%s)\n"
|
||||
|
||||
#: lib/libalpm/add.c:529 lib/libalpm/remove.c:238
|
||||
#, c-format
|
||||
msgid "%s saved as %s\n"
|
||||
msgstr "%s 已另存为 %s\n"
|
||||
|
||||
#: lib/libalpm/add.c:568
|
||||
#, c-format
|
||||
msgid "could not install %s as %s: %s\n"
|
||||
msgstr "无法安装 %s 作为 %s: %s\n"
|
||||
|
||||
#: lib/libalpm/add.c:571
|
||||
#, c-format
|
||||
msgid "%s installed as %s\n"
|
||||
msgstr "%s 已作为 %s 安装\n"
|
||||
|
||||
#: lib/libalpm/add.c:588
|
||||
#, c-format
|
||||
msgid "extracting %s as %s.pacnew\n"
|
||||
msgstr "正在解压缩 %s 作为 %s.pacnew\n"
|
||||
|
||||
#: lib/libalpm/add.c:723 lib/libalpm/trans.c:526
|
||||
msgid "could not get current working directory\n"
|
||||
msgstr "无法得到当前的工作目录\n"
|
||||
|
||||
#: lib/libalpm/add.c:777
|
||||
#, c-format
|
||||
msgid "problem occurred while upgrading %s\n"
|
||||
msgstr "更新 %s时出现错误\n"
|
||||
|
||||
#: lib/libalpm/add.c:782
|
||||
#, c-format
|
||||
msgid "problem occurred while installing %s\n"
|
||||
msgstr "安装 %s时出现错误\n"
|
||||
|
||||
#: lib/libalpm/add.c:797
|
||||
#, c-format
|
||||
msgid "could not update database entry %s-%s\n"
|
||||
msgstr "无法更新数据库记录 %s-%s\n"
|
||||
|
||||
#: lib/libalpm/add.c:805
|
||||
#, c-format
|
||||
msgid "could not add entry '%s' in cache\n"
|
||||
msgstr "无法在缓存中添加记录 '%s' \n"
|
||||
|
||||
#: lib/libalpm/be_files.c:221
|
||||
#, c-format
|
||||
msgid "invalid name for database entry '%s'\n"
|
||||
msgstr "数据库记录'%s'名字无效\n"
|
||||
|
||||
#: lib/libalpm/be_files.c:291 lib/libalpm/be_files.c:428
|
||||
#: lib/libalpm/be_files.c:451 lib/libalpm/be_files.c:562
|
||||
#: lib/libalpm/be_files.c:640 lib/libalpm/be_files.c:668
|
||||
#: lib/libalpm/package.c:885
|
||||
#, c-format
|
||||
msgid "could not open file %s: %s\n"
|
||||
msgstr "无法打开文件 %s: %s\n"
|
||||
|
||||
#: lib/libalpm/db.c:283
|
||||
#, c-format
|
||||
msgid "could not remove database entry %s%s\n"
|
||||
msgstr "无法删除数据库记录 %s%s\n"
|
||||
|
||||
#: lib/libalpm/db.c:551
|
||||
msgid "attempt to re-register the 'local' DB\n"
|
||||
msgstr "尝试重新登记“本地”数据库\n"
|
||||
|
||||
#: lib/libalpm/db.c:560 lib/libalpm/db.c:611
|
||||
msgid "database path is undefined\n"
|
||||
msgstr "没有指定数据库路径\n"
|
||||
|
||||
#: lib/libalpm/deps.c:171
|
||||
msgid "dependency cycle detected:\n"
|
||||
msgstr "探测到依赖关系循环:\n"
|
||||
|
||||
#: lib/libalpm/deps.c:173
|
||||
#, c-format
|
||||
msgid "%s will be removed after its %s dependency\n"
|
||||
msgstr "%s将在它%s的依赖关系之后被删除\n"
|
||||
|
||||
#: lib/libalpm/deps.c:175
|
||||
#, c-format
|
||||
msgid "%s will be installed before its %s dependency\n"
|
||||
msgstr "%s将在它%s的依赖关系之前被安装\n"
|
||||
|
||||
#: lib/libalpm/deps.c:588
|
||||
#, c-format
|
||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||
msgstr "无法解决\"%s\",\"%s\"的依赖关系\n"
|
||||
|
||||
#: lib/libalpm/error.c:41
|
||||
msgid "out of memory!"
|
||||
msgstr "没有内存可用!"
|
||||
|
||||
#: lib/libalpm/error.c:43
|
||||
msgid "unexpected system error"
|
||||
msgstr "未预计的系统错误"
|
||||
|
||||
#: lib/libalpm/error.c:45
|
||||
msgid "insufficient privileges"
|
||||
msgstr "权限不充分"
|
||||
|
||||
#: lib/libalpm/error.c:47
|
||||
msgid "could not find or read file"
|
||||
msgstr "无法找到或读取文件"
|
||||
|
||||
#: lib/libalpm/error.c:49
|
||||
msgid "could not find or read directory"
|
||||
msgstr "无法找到或读取目录"
|
||||
|
||||
#: lib/libalpm/error.c:51
|
||||
msgid "wrong or NULL argument passed"
|
||||
msgstr "传递了错误的或空的参数"
|
||||
|
||||
#: lib/libalpm/error.c:54
|
||||
msgid "library not initialized"
|
||||
msgstr "无法初始化函数库"
|
||||
|
||||
#: lib/libalpm/error.c:56
|
||||
msgid "library already initialized"
|
||||
msgstr "函数库已初始化"
|
||||
|
||||
#: lib/libalpm/error.c:58
|
||||
msgid "unable to lock database"
|
||||
msgstr "无法锁定数据库"
|
||||
|
||||
#: lib/libalpm/error.c:61
|
||||
msgid "could not open database"
|
||||
msgstr "无法打开数据库"
|
||||
|
||||
#: lib/libalpm/error.c:63
|
||||
msgid "could not create database"
|
||||
msgstr "无法创建数据库"
|
||||
|
||||
#: lib/libalpm/error.c:65
|
||||
msgid "database not initialized"
|
||||
msgstr "数据库无法初始化"
|
||||
|
||||
#: lib/libalpm/error.c:67
|
||||
msgid "database already registered"
|
||||
msgstr "数据库已登记"
|
||||
|
||||
#: lib/libalpm/error.c:69
|
||||
msgid "could not find database"
|
||||
msgstr "无法找到数据库"
|
||||
|
||||
#: lib/libalpm/error.c:71
|
||||
msgid "could not update database"
|
||||
msgstr "无法更新数据库"
|
||||
|
||||
#: lib/libalpm/error.c:73
|
||||
msgid "could not remove database entry"
|
||||
msgstr "无法删除数据库记录"
|
||||
|
||||
#: lib/libalpm/error.c:76
|
||||
msgid "invalid url for server"
|
||||
msgstr "无效的服务器url"
|
||||
|
||||
#: lib/libalpm/error.c:83
|
||||
msgid "could not set parameter"
|
||||
msgstr "无法设置参数"
|
||||
|
||||
#: lib/libalpm/error.c:86
|
||||
msgid "transaction already initialized"
|
||||
msgstr "处理已初始化"
|
||||
|
||||
#: lib/libalpm/error.c:88 lib/libalpm/error.c:92
|
||||
msgid "transaction not initialized"
|
||||
msgstr "处理无法初始化"
|
||||
|
||||
#: lib/libalpm/error.c:90
|
||||
msgid "duplicate target"
|
||||
msgstr "重复的目标"
|
||||
|
||||
#: lib/libalpm/error.c:94
|
||||
msgid "transaction not prepared"
|
||||
msgstr "处理未准备好"
|
||||
|
||||
#: lib/libalpm/error.c:96
|
||||
msgid "transaction aborted"
|
||||
msgstr "处理已放弃"
|
||||
|
||||
#: lib/libalpm/error.c:98
|
||||
msgid "operation not compatible with the transaction type"
|
||||
msgstr "操作与处理类型不兼容"
|
||||
|
||||
#: lib/libalpm/error.c:100
|
||||
msgid "could not commit transaction"
|
||||
msgstr "无法交付处理"
|
||||
|
||||
#: lib/libalpm/error.c:102
|
||||
msgid "could not download all files"
|
||||
msgstr "无法下载全部文件"
|
||||
|
||||
#: lib/libalpm/error.c:105
|
||||
msgid "could not find or read package"
|
||||
msgstr "无法找到或读取软件包"
|
||||
|
||||
#: lib/libalpm/error.c:107
|
||||
msgid "invalid or corrupted package"
|
||||
msgstr "无效的或已损坏的软件包"
|
||||
|
||||
#: lib/libalpm/error.c:109
|
||||
msgid "cannot open package file"
|
||||
msgstr "无法打开软件包文件"
|
||||
|
||||
#: lib/libalpm/error.c:111
|
||||
msgid "cannot load package data"
|
||||
msgstr "无法加载软件包数据"
|
||||
|
||||
#: lib/libalpm/error.c:113
|
||||
msgid "package already installed"
|
||||
msgstr "软件包已经安装"
|
||||
|
||||
#: lib/libalpm/error.c:115
|
||||
msgid "package not installed or lesser version"
|
||||
msgstr "软件包没有安装或版本较低"
|
||||
|
||||
#: lib/libalpm/error.c:117
|
||||
msgid "cannot remove all files for package"
|
||||
msgstr "无法删除软件包全部文件"
|
||||
|
||||
#: lib/libalpm/error.c:119
|
||||
msgid "package name is not valid"
|
||||
msgstr "软件包名字无效"
|
||||
|
||||
#: lib/libalpm/error.c:121
|
||||
msgid "corrupted package"
|
||||
msgstr "已损坏的软件包"
|
||||
|
||||
#: lib/libalpm/error.c:123
|
||||
msgid "no such repository"
|
||||
msgstr "没有该软件库"
|
||||
|
||||
#: lib/libalpm/error.c:126
|
||||
msgid "corrupted delta"
|
||||
msgstr "已损怀的delta"
|
||||
|
||||
#: lib/libalpm/error.c:128
|
||||
msgid "delta patch failed"
|
||||
msgstr "delta补丁失败"
|
||||
|
||||
#: lib/libalpm/error.c:131
|
||||
msgid "group not found"
|
||||
msgstr "没有找到软件包组"
|
||||
|
||||
#: lib/libalpm/error.c:134
|
||||
msgid "could not satisfy dependencies"
|
||||
msgstr "无法满足依赖关系"
|
||||
|
||||
#: lib/libalpm/error.c:136
|
||||
msgid "conflicting dependencies"
|
||||
msgstr "有冲突的依赖关系"
|
||||
|
||||
#: lib/libalpm/error.c:138
|
||||
msgid "conflicting files"
|
||||
msgstr "有冲突的文件"
|
||||
|
||||
#: lib/libalpm/error.c:141
|
||||
msgid "user aborted the operation"
|
||||
msgstr "用户中断操作"
|
||||
|
||||
#: lib/libalpm/error.c:143
|
||||
msgid "internal error"
|
||||
msgstr "内部错误"
|
||||
|
||||
#: lib/libalpm/error.c:145
|
||||
msgid "libarchive error"
|
||||
msgstr "libarchive错误"
|
||||
|
||||
#: lib/libalpm/error.c:148
|
||||
msgid "not confirmed"
|
||||
msgstr "不能确认"
|
||||
|
||||
#: lib/libalpm/error.c:150
|
||||
msgid "invalid regular expression"
|
||||
msgstr "无效的常规表达式"
|
||||
|
||||
#: lib/libalpm/error.c:153
|
||||
msgid "connection to remote host failed"
|
||||
msgstr "连接远端主机失败"
|
||||
|
||||
#: lib/libalpm/error.c:156
|
||||
msgid "unexpected error"
|
||||
msgstr "未预期的错误"
|
||||
|
||||
#: lib/libalpm/package.c:122
|
||||
#, c-format
|
||||
msgid "could not get md5sum for package %s-%s\n"
|
||||
msgstr "无法得到软件包%s-%s的md5值\n"
|
||||
|
||||
#: lib/libalpm/package.c:131
|
||||
#, c-format
|
||||
msgid "md5sums do not match for package %s-%s\n"
|
||||
msgstr "软件包%s-%s的md5值不一致\n"
|
||||
|
||||
#: lib/libalpm/package.c:844
|
||||
#, c-format
|
||||
msgid "%s: forcing upgrade to version %s\n"
|
||||
msgstr "%s:强制更新至版本%s\n"
|
||||
|
||||
#: lib/libalpm/package.c:849
|
||||
#, c-format
|
||||
msgid "%s: local (%s) is newer than %s (%s)\n"
|
||||
msgstr "%s:本地(%s)比%s版本更新(%s)\n"
|
||||
|
||||
#: lib/libalpm/package.c:1027
|
||||
#, c-format
|
||||
msgid "error extracting package description file to %s\n"
|
||||
msgstr "解压缩软件包描述文件到%s时发生错误\n"
|
||||
|
||||
#: lib/libalpm/package.c:1033
|
||||
#, c-format
|
||||
msgid "could not parse package description file in %s\n"
|
||||
msgstr "无法分析%s中的软件包描述文件\n"
|
||||
|
||||
#: lib/libalpm/package.c:1038
|
||||
#, c-format
|
||||
msgid "missing package name in %s\n"
|
||||
msgstr "%s中缺少软件包名字\n"
|
||||
|
||||
#: lib/libalpm/package.c:1042
|
||||
#, c-format
|
||||
msgid "missing package version in %s\n"
|
||||
msgstr "%s中缺少软件包版本号\n"
|
||||
|
||||
#: lib/libalpm/package.c:1061 lib/libalpm/package.c:1074
|
||||
#, c-format
|
||||
msgid "error while reading package %s: %s\n"
|
||||
msgstr "读取软件包%s: %s发生错误\n"
|
||||
|
||||
#: lib/libalpm/package.c:1081
|
||||
#, c-format
|
||||
msgid "missing package metadata in %s\n"
|
||||
msgstr "%s中缺少软件包元数据\n"
|
||||
|
||||
#: lib/libalpm/remove.c:119
|
||||
#, c-format
|
||||
msgid "could not find %s in database -- skipping\n"
|
||||
msgstr "无法在数据库中找到%s -- 跳过\n"
|
||||
|
||||
#: lib/libalpm/remove.c:172 lib/libalpm/remove.c:247
|
||||
#, c-format
|
||||
msgid "cannot remove file '%s': %s\n"
|
||||
msgstr "无法删除文件'%s': %s\n"
|
||||
|
||||
#: lib/libalpm/remove.c:341
|
||||
#, c-format
|
||||
msgid "could not remove database entry %s-%s\n"
|
||||
msgstr "无法删除数据库记录%s-%s\n"
|
||||
|
||||
#: lib/libalpm/remove.c:346
|
||||
#, c-format
|
||||
msgid "could not remove entry '%s' from cache\n"
|
||||
msgstr "无法从缓存中删除记录'%s'\n"
|
||||
|
||||
#: lib/libalpm/server.c:54
|
||||
#, c-format
|
||||
msgid "url '%s' is invalid, ignoring\n"
|
||||
msgstr "url %s' 无效,忽略\n"
|
||||
|
||||
#: lib/libalpm/server.c:58
|
||||
msgid "url scheme not specified, assuming http\n"
|
||||
msgstr "url scheme没有指定,假定为http\n"
|
||||
|
||||
#: lib/libalpm/server.c:239
|
||||
msgid "disk"
|
||||
msgstr "硬盘"
|
||||
|
||||
#: lib/libalpm/server.c:243
|
||||
#, c-format
|
||||
msgid "failed retrieving file '%s' from %s : %s\n"
|
||||
msgstr "获取文件'%s'从%s : %s失败\n"
|
||||
|
||||
#: lib/libalpm/server.c:273
|
||||
msgid "cannot resume download, starting over\n"
|
||||
msgstr "无法恢复下载,重新开始\n"
|
||||
|
||||
#: lib/libalpm/server.c:286
|
||||
#, c-format
|
||||
msgid "cannot write to file '%s'\n"
|
||||
msgstr "无法写入文件'%s'\n"
|
||||
|
||||
#: lib/libalpm/server.c:305
|
||||
#, c-format
|
||||
msgid "error downloading '%s': %s\n"
|
||||
msgstr "下载'%s': %s时出错\n"
|
||||
|
||||
#: lib/libalpm/server.c:317
|
||||
#, c-format
|
||||
msgid "error writing to file '%s': %s\n"
|
||||
msgstr "写入文件'%s': %s时出错\n"
|
||||
|
||||
#: lib/libalpm/server.c:385
|
||||
#, c-format
|
||||
msgid "could not chdir to %s\n"
|
||||
msgstr "无法改变目录到%s\n"
|
||||
|
||||
#: lib/libalpm/server.c:392
|
||||
msgid "running XferCommand: fork failed!\n"
|
||||
msgstr "运行XferCommand:分支失败!\n"
|
||||
|
||||
#: lib/libalpm/server.c:443
|
||||
msgid "URL does not contain a file for download\n"
|
||||
msgstr "URL没有包含可下载的文件\n"
|
||||
|
||||
#: lib/libalpm/server.c:456
|
||||
#, c-format
|
||||
msgid "failed to download %s\n"
|
||||
msgstr "下载%s失败\n"
|
||||
|
||||
#: lib/libalpm/sync.c:133
|
||||
#, c-format
|
||||
msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
|
||||
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"
|
||||
|
||||
#: lib/libalpm/sync.c:309
|
||||
#, c-format
|
||||
msgid "repository '%s' not found\n"
|
||||
msgstr "没有找到软件库'%s'\n"
|
||||
|
||||
#: lib/libalpm/sync.c:336
|
||||
#, c-format
|
||||
msgid "%s-%s is up to date -- skipping\n"
|
||||
msgstr "%s-%s已经为最新 -- 跳过\n"
|
||||
|
||||
#: lib/libalpm/sync.c:340
|
||||
#, c-format
|
||||
msgid "%s-%s is up to date -- reinstalling\n"
|
||||
msgstr "%s-%s已经为最新 -- 重新安装\n"
|
||||
|
||||
#: lib/libalpm/sync.c:596 lib/libalpm/sync.c:601
|
||||
msgid "unresolvable package conflicts detected\n"
|
||||
msgstr "探测到无法解决的软件包冲突\n"
|
||||
|
||||
#: lib/libalpm/sync.c:611
|
||||
#, c-format
|
||||
msgid "malloc failure: could not allocate %zd bytes\n"
|
||||
msgstr "内存分配错误:无法分配 %zd bytes\n"
|
||||
|
||||
#: lib/libalpm/sync.c:812
|
||||
#, c-format
|
||||
msgid "command: %s\n"
|
||||
msgstr "命令:%s\n"
|
||||
|
||||
#: lib/libalpm/sync.c:876 lib/libalpm/sync.c:886
|
||||
#, c-format
|
||||
msgid "can't get md5 checksum for file %s\n"
|
||||
msgstr "无法得到文件%s的md5检查值\n"
|
||||
|
||||
#: lib/libalpm/sync.c:902
|
||||
#, c-format
|
||||
msgid "file %s was corrupted (bad MD5 checksum)\n"
|
||||
msgstr "文件%s已损坏(坏的MD5检查值)\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1049
|
||||
#, c-format
|
||||
msgid "failed to retrieve some files from %s\n"
|
||||
msgstr "某些文件无法从%s取回\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1130
|
||||
msgid "could not create removal transaction\n"
|
||||
msgstr "无法生成可删除处理\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1136
|
||||
msgid "could not initialize the removal transaction\n"
|
||||
msgstr "无法初始化可删除处理\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1158
|
||||
msgid "could not prepare removal transaction\n"
|
||||
msgstr "无法准备可删除处理\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1164
|
||||
msgid "could not commit removal transaction\n"
|
||||
msgstr "无法交付可删除处理\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1175
|
||||
msgid "could not create transaction\n"
|
||||
msgstr "无法创建处理\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1180
|
||||
msgid "could not initialize transaction\n"
|
||||
msgstr "无法初始化处理\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1207
|
||||
msgid "could not prepare transaction\n"
|
||||
msgstr "无法准备处理\n"
|
||||
|
||||
#: lib/libalpm/sync.c:1212
|
||||
msgid "could not commit transaction\n"
|
||||
msgstr "无法交付处理\n"
|
||||
|
||||
#: lib/libalpm/trans.c:212
|
||||
#, c-format
|
||||
msgid "could not remove lock file %s\n"
|
||||
msgstr "无法删除锁定文件%s\n"
|
||||
|
||||
#: lib/libalpm/trans.c:483
|
||||
msgid "No /bin/sh in parent environment, aborting scriptlet\n"
|
||||
msgstr "父环境中没有/bin/sh,正在中断脚本\n"
|
||||
|
||||
#: lib/libalpm/trans.c:494
|
||||
msgid "could not create temp directory\n"
|
||||
msgstr "无法创建临时目录\n"
|
||||
|
||||
#: lib/libalpm/trans.c:533
|
||||
#, c-format
|
||||
msgid "could not change directory to %s (%s)\n"
|
||||
msgstr "无法更改目录到%s (%s)\n"
|
||||
|
||||
#: lib/libalpm/trans.c:551
|
||||
#, c-format
|
||||
msgid "could not fork a new process (%s)\n"
|
||||
msgstr "无法分支新进程(%s)\n"
|
||||
|
||||
#: lib/libalpm/trans.c:561
|
||||
#, c-format
|
||||
msgid "could not change the root directory (%s)\n"
|
||||
msgstr "无法更改根目录(%s)\n"
|
||||
|
||||
#: lib/libalpm/trans.c:566
|
||||
#, c-format
|
||||
msgid "could not change directory to / (%s)\n"
|
||||
msgstr "无法更改目录到/ (%s)\n"
|
||||
|
||||
#: lib/libalpm/trans.c:575
|
||||
#, c-format
|
||||
msgid "call to popen failed (%s)"
|
||||
msgstr "调用popen失败(%s)"
|
||||
|
||||
#: lib/libalpm/trans.c:594
|
||||
#, c-format
|
||||
msgid "call to waitpid failed (%s)\n"
|
||||
msgstr "调用waitpid失败(%s)\n"
|
||||
|
||||
#: lib/libalpm/trans.c:603
|
||||
msgid "scriptlet failed to execute correctly\n"
|
||||
msgstr "脚本没有被正确执行\n"
|
||||
|
||||
#: lib/libalpm/trans.c:612
|
||||
#, c-format
|
||||
msgid "could not remove tmpdir %s\n"
|
||||
msgstr "无法删除临时目录%s\n"
|
||||
|
||||
#: lib/libalpm/util.c:207
|
||||
#, c-format
|
||||
msgid "failed to make path '%s' : %s\n"
|
||||
msgstr "无法创建路径'%s' : %s\n"
|
||||
|
||||
#: lib/libalpm/util.c:392
|
||||
#, c-format
|
||||
msgid "could not open %s: %s\n"
|
||||
msgstr "无法打开%s: %s\n"
|
||||
|
||||
#: lib/libalpm/util.c:579
|
||||
#, c-format
|
||||
msgid "no %s cache exists, creating...\n"
|
||||
msgstr "没有%s缓存存在,正在创建……\n"
|
||||
|
||||
#: lib/libalpm/util.c:595
|
||||
msgid "couldn't create package cache, using /tmp instead\n"
|
||||
msgstr "无法创建软件包缓存,正在使用/tmp代替\n"
|
||||
|
||||
#: lib/libalpm/util.c:644
|
||||
#, c-format
|
||||
msgid "md5: %s can't be opened\n"
|
||||
msgstr "md5:%s无法打开\n"
|
||||
|
||||
#: lib/libalpm/util.c:646
|
||||
#, c-format
|
||||
msgid "md5: %s can't be read\n"
|
||||
msgstr "md5:%s无法读取\n"
|
||||
|
@ -9,3 +9,4 @@ it
|
||||
pl
|
||||
pt_BR
|
||||
ru
|
||||
zh_CN
|
||||
|
71
po/ru.po
71
po/ru.po
@ -2,14 +2,14 @@
|
||||
# Copyright (C) 2007 Judd Vinet <jvinet@zeroflux.org>
|
||||
# This file is distributed under the same license as the Pacman package.
|
||||
# Vladimir Bayrakovskiy <4rayven@gmail.com>, Vitaly Dolgov <ferhiord@gmail.com>, 2007
|
||||
#
|
||||
# Sergey Tereschenko <serg.partizan@gmail.com> 2008
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pacman package manager 3.0.0\n"
|
||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
||||
"POT-Creation-Date: 2008-02-09 10:41-0600\n"
|
||||
"PO-Revision-Date: 2007-03-07 11:45-0500\n"
|
||||
"Last-Translator: Vitaly Dolgov <ferhiord@gmail.com>\n"
|
||||
"Last-Translator: Sergey Tereschenko <serg.partizan@gmail.com>\n"
|
||||
"Language-Team: Russian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -38,7 +38,7 @@ msgid ""
|
||||
" if you're sure a package manager is not already\n"
|
||||
" running, you can remove %s.\n"
|
||||
msgstr ""
|
||||
" если Вы уверены, что pacman еще не запущен, можете\n"
|
||||
" если Вы уверены, что pacman уже не запущен, можете\n"
|
||||
" удалить %s\n"
|
||||
|
||||
#: src/pacman/add.c:114 src/pacman/remove.c:106
|
||||
@ -293,7 +293,7 @@ msgstr "Заменяет :"
|
||||
#: src/pacman/package.c:111
|
||||
#, c-format
|
||||
msgid "Download Size : %6.2f K\n"
|
||||
msgstr "Будет загружено : %6.2f K\n"
|
||||
msgstr "Будет загружено : %6.2f K\n"
|
||||
|
||||
#: src/pacman/package.c:115
|
||||
#, c-format
|
||||
@ -303,31 +303,31 @@ msgstr "Размер архива : %6.2f K\n"
|
||||
#: src/pacman/package.c:119
|
||||
#, c-format
|
||||
msgid "Installed Size : %6.2f K\n"
|
||||
msgstr "Размер установленного : %6.2f K\n"
|
||||
msgstr "Размер установленного : %6.2f K\n"
|
||||
|
||||
#: src/pacman/package.c:121
|
||||
msgid "Packager :"
|
||||
msgstr "Сборщик :"
|
||||
msgstr "Сборщик :"
|
||||
|
||||
#: src/pacman/package.c:122
|
||||
msgid "Architecture :"
|
||||
msgstr "Архитектура :"
|
||||
msgstr "Архитектура :"
|
||||
|
||||
#: src/pacman/package.c:123
|
||||
msgid "Build Date :"
|
||||
msgstr "Дата сборки :"
|
||||
msgstr "Дата сборки :"
|
||||
|
||||
#: src/pacman/package.c:125
|
||||
msgid "Install Date :"
|
||||
msgstr "Дата установки :"
|
||||
msgstr "Дата установки :"
|
||||
|
||||
#: src/pacman/package.c:126
|
||||
msgid "Install Reason :"
|
||||
msgstr "Причина установки :"
|
||||
msgstr "Причина установки :"
|
||||
|
||||
#: src/pacman/package.c:129
|
||||
msgid "Install Script :"
|
||||
msgstr "Установочный скрипт :"
|
||||
msgstr "Установочный скрипт :"
|
||||
|
||||
#: src/pacman/package.c:130
|
||||
msgid "Yes"
|
||||
@ -339,11 +339,11 @@ msgstr "No"
|
||||
|
||||
#: src/pacman/package.c:135
|
||||
msgid "MD5 Sum :"
|
||||
msgstr "MD5-сумма :"
|
||||
msgstr "MD5-сумма :"
|
||||
|
||||
#: src/pacman/package.c:159
|
||||
msgid "Repository :"
|
||||
msgstr "Репозиторий :"
|
||||
msgstr "Репозиторий :"
|
||||
|
||||
#: src/pacman/package.c:169
|
||||
#, c-format
|
||||
@ -1280,7 +1280,7 @@ msgstr "Недостающие зависимости:"
|
||||
|
||||
#: scripts/makepkg.sh.in:444
|
||||
msgid "Retrieving Sources..."
|
||||
msgstr "Получаю исходные коды..."
|
||||
msgstr "Получаю исходные файлы..."
|
||||
|
||||
#: scripts/makepkg.sh.in:447
|
||||
msgid "You do not have write permission to store downloads in %s."
|
||||
@ -1288,7 +1288,7 @@ msgstr "У вас нет прав на запись, чтобы сохранит
|
||||
|
||||
#: scripts/makepkg.sh.in:458
|
||||
msgid "Found %s in build dir"
|
||||
msgstr "Обнаружен %s в директории для сборки"
|
||||
msgstr "Обнаружен %s в директории сборки"
|
||||
|
||||
#: scripts/makepkg.sh.in:462
|
||||
msgid "Using cached copy of %s"
|
||||
@ -1296,7 +1296,7 @@ msgstr "Использую копию %s из кэша"
|
||||
|
||||
#: scripts/makepkg.sh.in:469
|
||||
msgid "%s was not found in the build directory and is not a URL."
|
||||
msgstr "%s не найден в директории для сборки и это не URL."
|
||||
msgstr "%s не найден в директории сборки и это не URL."
|
||||
|
||||
#: scripts/makepkg.sh.in:476
|
||||
msgid "Downloading %s..."
|
||||
@ -1308,7 +1308,7 @@ msgstr "Загрузка %s завершилась неудачей"
|
||||
|
||||
#: scripts/makepkg.sh.in:492
|
||||
msgid "Generating checksums for source files..."
|
||||
msgstr "Генерирую контрольные суммы для файлов с исходными кодами..."
|
||||
msgstr "Генерирую контрольные суммы исходных файлов..."
|
||||
|
||||
#: scripts/makepkg.sh.in:501
|
||||
msgid "Invalid integrity algorithm '%s' specified."
|
||||
@ -1328,7 +1328,7 @@ msgstr "Указан неверный алгоритм '%s'"
|
||||
|
||||
#: scripts/makepkg.sh.in:564
|
||||
msgid "Validating source files with %s..."
|
||||
msgstr "Проверка файлов с исходными кодами с посощью %s..."
|
||||
msgstr "Проверка исходных файлов с помощью %s..."
|
||||
|
||||
#: scripts/makepkg.sh.in:574
|
||||
msgid "NOT FOUND"
|
||||
@ -1340,7 +1340,7 @@ msgstr "Завершено"
|
||||
|
||||
#: scripts/makepkg.sh.in:585
|
||||
msgid "FAILED"
|
||||
msgstr "НЕ УДАЛОСЬ"
|
||||
msgstr "СБОЙ"
|
||||
|
||||
#: scripts/makepkg.sh.in:593
|
||||
msgid "One or more files did not pass the validity check!"
|
||||
@ -1352,7 +1352,7 @@ msgstr "Проверка целостности (%s) не выполнена и
|
||||
|
||||
#: scripts/makepkg.sh.in:603
|
||||
msgid "Extracting Sources..."
|
||||
msgstr "Распаковка исходных кодов..."
|
||||
msgstr "Распаковка исходных файлов..."
|
||||
|
||||
#: scripts/makepkg.sh.in:615
|
||||
msgid "Unable to find source file %s for extraction."
|
||||
@ -1416,7 +1416,7 @@ msgstr "Пример для программ под лицензией GPL: lice
|
||||
|
||||
#: scripts/makepkg.sh.in:855 scripts/makepkg.sh.in:950
|
||||
msgid "Adding install script..."
|
||||
msgstr "Добавляю инсталяционный скрипт..."
|
||||
msgstr "Добавляю установочный скрипт..."
|
||||
|
||||
#: scripts/makepkg.sh.in:862
|
||||
msgid "Adding package changelog..."
|
||||
@ -1424,7 +1424,7 @@ msgstr "Добавляю список изменений пакета... "
|
||||
|
||||
#: scripts/makepkg.sh.in:868
|
||||
msgid "Compressing package..."
|
||||
msgstr "Архивирую пакета... "
|
||||
msgstr "Архивирую пакет... "
|
||||
|
||||
#: scripts/makepkg.sh.in:873
|
||||
msgid "Failed to create package file."
|
||||
@ -1482,31 +1482,31 @@ msgstr "Не удалось создать пакет с исходными ко
|
||||
|
||||
#: scripts/makepkg.sh.in:1005
|
||||
msgid "Determining latest darcs revision..."
|
||||
msgstr "Определяю последнюю darcs ревизию..."
|
||||
msgstr "Определяю последнюю версию в darcs..."
|
||||
|
||||
#: scripts/makepkg.sh.in:1009
|
||||
msgid "Determining latest cvs revision..."
|
||||
msgstr "Определяю последнюю cvs ревизию..."
|
||||
msgstr "Определяю последнюю версию в cvs..."
|
||||
|
||||
#: scripts/makepkg.sh.in:1013
|
||||
msgid "Determining latest git revision..."
|
||||
msgstr "Определяю последнюю git ревизию..."
|
||||
msgstr "Определяю последнюю версию в git..."
|
||||
|
||||
#: scripts/makepkg.sh.in:1017
|
||||
msgid "Determining latest svn revision..."
|
||||
msgstr "Определяю последнюю svn ревизию..."
|
||||
msgstr "Определяю последнюю версию в svn..."
|
||||
|
||||
#: scripts/makepkg.sh.in:1021
|
||||
msgid "Determining latest bzr revision..."
|
||||
msgstr "Определяю последнюю bzr ревизию..."
|
||||
msgstr "Определяю последнюю версию в bzr..."
|
||||
|
||||
#: scripts/makepkg.sh.in:1025
|
||||
msgid "Determining latest hg revision..."
|
||||
msgstr "Определяю последнюю hg ревизию..."
|
||||
msgstr "Определяю последнюю версию в hg..."
|
||||
|
||||
#: scripts/makepkg.sh.in:1040
|
||||
msgid "Version found: %s"
|
||||
msgstr "Обнаруженная версия: %s"
|
||||
msgstr "Обнаружена версия: %s"
|
||||
|
||||
#: scripts/makepkg.sh.in:1071
|
||||
msgid "Usage: %s [options]"
|
||||
@ -1522,8 +1522,7 @@ msgstr " -А --ignorearch Игнорировать неполное поле ar
|
||||
|
||||
#: scripts/makepkg.sh.in:1075
|
||||
msgid " -b, --builddeps Build missing dependencies from source"
|
||||
msgstr ""
|
||||
" -b, --builddeps Собирать недостающие зависимости из исходных текстов"
|
||||
msgstr " -b, --builddeps Собирать недостающие зависимости из исходных файлов"
|
||||
|
||||
#: scripts/makepkg.sh.in:1076
|
||||
msgid " -c, --clean Clean up work files after build"
|
||||
@ -1531,7 +1530,7 @@ msgstr " -c, --clean Удалять оставшиеся после сбо
|
||||
|
||||
#: scripts/makepkg.sh.in:1077
|
||||
msgid " -C, --cleancache Clean up source files from the cache"
|
||||
msgstr " -C, --cleancache Очистить кэш от исходных текстов"
|
||||
msgstr " -C, --cleancache Очистить кэш от исходных файлов"
|
||||
|
||||
#: scripts/makepkg.sh.in:1078
|
||||
msgid " -d, --nodeps Skip all dependency checks"
|
||||
@ -1540,8 +1539,8 @@ msgstr " -d, --nodeps Не проверять зависимости"
|
||||
#: scripts/makepkg.sh.in:1079
|
||||
msgid " -e, --noextract Do not extract source files (use existing src/ dir)"
|
||||
msgstr ""
|
||||
" -e, --noextract Не извлекать файлы с исходными кодами (использовать "
|
||||
"существующие в src/)"
|
||||
" -e, --noextract Не извлекать исходные файлы (использовать существующие в "
|
||||
"src/)"
|
||||
|
||||
#: scripts/makepkg.sh.in:1080
|
||||
msgid " -f, --force Overwrite existing package"
|
||||
@ -1551,7 +1550,7 @@ msgstr " -f, --force Переписать существующий пак
|
||||
msgid " -g, --geninteg Generate integrity checks for source files"
|
||||
msgstr ""
|
||||
" -g, --geninteg Генерировать информацию для проверки целостности исходных "
|
||||
"текстов"
|
||||
"файлов"
|
||||
|
||||
#: scripts/makepkg.sh.in:1082
|
||||
msgid " -h, --help This help"
|
||||
@ -1844,7 +1843,7 @@ msgstr "Директория пакета пуста. Здесь нечего п
|
||||
|
||||
#: scripts/makepkg.sh.in:1451
|
||||
msgid "Sources are ready."
|
||||
msgstr "Исходные коды готовы."
|
||||
msgstr "Исходные файлы готовы."
|
||||
|
||||
#: scripts/makepkg.sh.in:1456
|
||||
msgid "Removing existing pkg/ directory..."
|
||||
|
2062
po/zh_CN.po
Normal file
2062
po/zh_CN.po
Normal file
File diff suppressed because it is too large
Load Diff
@ -34,8 +34,6 @@
|
||||
#include "util.h"
|
||||
#include "conf.h"
|
||||
|
||||
#define FILENAME_TRIM_LEN 23
|
||||
|
||||
/* download progress bar */
|
||||
static float rate_last;
|
||||
static int xfered_last;
|
||||
@ -313,8 +311,11 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
|
||||
|
||||
/* size of line to allocate for text printing (e.g. not progressbar) */
|
||||
const int infolen = 50;
|
||||
int tmp, digits, oprlen, textlen, remainlen;
|
||||
int tmp, digits, textlen;
|
||||
char *opr = NULL;
|
||||
/* used for wide character width determination and printing */
|
||||
int len, wclen, wcwid, padwid;
|
||||
wchar_t *wcstr;
|
||||
|
||||
if(config->noprogressbar) {
|
||||
return;
|
||||
@ -363,27 +364,41 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
|
||||
while((tmp /= 10)) {
|
||||
++digits;
|
||||
}
|
||||
|
||||
/* determine room left for non-digits text [not ( 1/12) part] */
|
||||
textlen = infolen - 3 - (2 * digits);
|
||||
|
||||
oprlen = mbstowcs(NULL, opr, 0);
|
||||
/* room left (eg for package name) */
|
||||
remainlen = textlen - oprlen - 1;
|
||||
/* In order to deal with characters from all locales, we have to worry
|
||||
* about wide characters and their column widths. A lot of stuff is
|
||||
* done here to figure out the actual number of screen columns used
|
||||
* by the output, and then pad it accordingly so we fill the terminal.
|
||||
*/
|
||||
/* len = opr len + pkgname len (if available) + space + null */
|
||||
len = strlen(opr) + ((pkgname) ? strlen(pkgname) : 0) + 2;
|
||||
wcstr = calloc(len, sizeof(wchar_t));
|
||||
/* print our strings to the alloc'ed memory */
|
||||
wclen = swprintf(wcstr, len, L"%s %s", opr, pkgname);
|
||||
wcwid = wcswidth(wcstr, wclen);
|
||||
padwid = textlen - wcwid;
|
||||
/* if padwid is < 0, we need to trim the string so padwid = 0 */
|
||||
if(padwid < 0) {
|
||||
int i = textlen - 3;
|
||||
wchar_t *p = wcstr;
|
||||
/* grab the max number of char columns we can fill */
|
||||
while(i > 0 && wcwidth(*p) < i) {
|
||||
i -= wcwidth(*p);
|
||||
p++;
|
||||
}
|
||||
/* then add the ellipsis and fill out any extra padding */
|
||||
wcscpy(p, L"...");
|
||||
padwid = i;
|
||||
|
||||
switch (event) {
|
||||
case PM_TRANS_PROGRESS_ADD_START:
|
||||
case PM_TRANS_PROGRESS_UPGRADE_START:
|
||||
case PM_TRANS_PROGRESS_REMOVE_START:
|
||||
printf("(%*d/%*d) %s %-*.*s", digits, remain, digits, howmany,
|
||||
opr, remainlen, remainlen, pkgname);
|
||||
break;
|
||||
case PM_TRANS_PROGRESS_CONFLICTS_START:
|
||||
printf("(%*d/%*d) %s %-*s", digits, remain, digits, howmany,
|
||||
opr, remainlen, "");
|
||||
break;
|
||||
}
|
||||
|
||||
printf("(%*d/%*d) %ls%-*s", digits, remain, digits, howmany,
|
||||
wcstr, padwid, "");
|
||||
|
||||
free(wcstr);
|
||||
|
||||
/* call refactored fill progress function */
|
||||
fill_progress(percent, percent, getcols() - infolen);
|
||||
|
||||
@ -405,7 +420,11 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total,
|
||||
int list_xfered, int list_total)
|
||||
{
|
||||
const int infolen = 50;
|
||||
const int filenamelen = infolen - 27;
|
||||
char *fname, *p;
|
||||
/* used for wide character width determination and printing */
|
||||
int len, wclen, wcwid, padwid;
|
||||
wchar_t *wcfname;
|
||||
|
||||
float rate = 0.0, timediff = 0.0, f_xfered = 0.0;
|
||||
unsigned int eta_h = 0, eta_m = 0, eta_s = 0;
|
||||
@ -485,8 +504,30 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total,
|
||||
if((p = strstr(fname, PKGEXT)) || (p = strstr(fname, DBEXT))) {
|
||||
*p = '\0';
|
||||
}
|
||||
if(strlen(fname) > FILENAME_TRIM_LEN) {
|
||||
strcpy(fname + FILENAME_TRIM_LEN -3,"...");
|
||||
/* In order to deal with characters from all locales, we have to worry
|
||||
* about wide characters and their column widths. A lot of stuff is
|
||||
* done here to figure out the actual number of screen columns used
|
||||
* by the output, and then pad it accordingly so we fill the terminal.
|
||||
*/
|
||||
/* len = filename len + null */
|
||||
len = strlen(filename) + 1;
|
||||
wcfname = calloc(len, sizeof(wchar_t));
|
||||
wclen = mbstowcs(wcfname, fname, len);
|
||||
wcwid = wcswidth(wcfname, wclen);
|
||||
padwid = filenamelen - wcwid;
|
||||
/* if padwid is < 0, we need to trim the string so padwid = 0 */
|
||||
if(padwid < 0) {
|
||||
int i = filenamelen - 3;
|
||||
wchar_t *p = wcfname;
|
||||
/* grab the max number of char columns we can fill */
|
||||
while(i > 0 && wcwidth(*p) < i) {
|
||||
i -= wcwidth(*p);
|
||||
p++;
|
||||
}
|
||||
/* then add the ellipsis and fill out any extra padding */
|
||||
wcscpy(p, L"...");
|
||||
padwid = i;
|
||||
|
||||
}
|
||||
|
||||
/* Awesome formatting for progress bar. We need a mess of Kb->Mb->Gb stuff
|
||||
@ -516,10 +557,12 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total,
|
||||
}
|
||||
}
|
||||
|
||||
printf(" %-*s %6.1f%c %#6.1f%c/s %02u:%02u:%02u", FILENAME_TRIM_LEN, fname,
|
||||
f_xfered, xfered_size, rate, rate_size, eta_h, eta_m, eta_s);
|
||||
printf(" %ls%-*s %6.1f%c %#6.1f%c/s %02u:%02u:%02u", wcfname,
|
||||
padwid, "", f_xfered, xfered_size,
|
||||
rate, rate_size, eta_h, eta_m, eta_s);
|
||||
|
||||
free(fname);
|
||||
free(wcfname);
|
||||
|
||||
/* The progress bar is based on the file percent regardless of the
|
||||
* TotalDownload option. */
|
||||
@ -532,7 +575,7 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total,
|
||||
/* Callback to handle notifications from the library */
|
||||
void cb_log(pmloglevel_t level, char *fmt, va_list args)
|
||||
{
|
||||
if(!strlen(fmt)) {
|
||||
if(!fmt || strlen(fmt) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
@ -48,6 +49,8 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||
char bdatestr[50] = "", idatestr[50] = "";
|
||||
const alpm_list_t *i;
|
||||
alpm_list_t *requiredby = NULL, *depstrings = NULL;
|
||||
wchar_t *wcstr;
|
||||
int len;
|
||||
|
||||
if(pkg == NULL) {
|
||||
return;
|
||||
@ -86,8 +89,6 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||
requiredby = alpm_pkg_compute_requiredby(pkg);
|
||||
}
|
||||
|
||||
descheader = _("Description : ");
|
||||
|
||||
/* actual output */
|
||||
if(level == 0) {
|
||||
string_display(_("Filename :"), alpm_pkg_get_filename(pkg));
|
||||
@ -136,8 +137,16 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||
}
|
||||
|
||||
/* printed using a variable to make i18n safe */
|
||||
descheader = _("Description : ");
|
||||
/* len goes from # bytes -> # chars -> # cols */
|
||||
len = strlen(descheader) + 1;
|
||||
wcstr = calloc(len, sizeof(wchar_t));
|
||||
len = mbstowcs(wcstr, descheader, len);
|
||||
len = wcswidth(wcstr, len);
|
||||
free(wcstr);
|
||||
/* we can finally print the darn thing */
|
||||
printf("%s", descheader);
|
||||
indentprint(alpm_pkg_get_desc(pkg), mbstowcs(NULL, descheader, 0));
|
||||
indentprint(alpm_pkg_get_desc(pkg), len);
|
||||
printf("\n\n");
|
||||
|
||||
/* Print additional package info if info flag passed more than once */
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
@ -219,41 +220,54 @@ char *mdirname(const char *path)
|
||||
*/
|
||||
void indentprint(const char *str, int indent)
|
||||
{
|
||||
const char *p = str;
|
||||
int cidx = indent;
|
||||
wchar_t *wcstr;
|
||||
const wchar_t *p;
|
||||
int len, cidx;
|
||||
|
||||
if(!str) {
|
||||
return;
|
||||
}
|
||||
|
||||
len = strlen(str) + 1;
|
||||
wcstr = calloc(len, sizeof(wchar_t));
|
||||
len = mbstowcs(wcstr, str, len);
|
||||
p = wcstr;
|
||||
cidx = indent;
|
||||
|
||||
if(!p) {
|
||||
return;
|
||||
}
|
||||
|
||||
while(*p) {
|
||||
if(*p == ' ') {
|
||||
const char *next = NULL;
|
||||
int len;
|
||||
if(*p == L' ') {
|
||||
const wchar_t *q, *next;
|
||||
p++;
|
||||
if(p == NULL || *p == ' ') continue;
|
||||
next = strchr(p, ' ');
|
||||
if(p == NULL || *p == L' ') continue;
|
||||
next = wcschr(p, L' ');
|
||||
if(next == NULL) {
|
||||
next = p + mbstowcs(NULL, p, 0);
|
||||
next = p + wcslen(p);
|
||||
}
|
||||
/* len captures # cols */
|
||||
len = 0;
|
||||
q = p;
|
||||
while(q < next) {
|
||||
len += wcwidth(*q++);
|
||||
}
|
||||
len = next - p;
|
||||
if(len > (getcols() - cidx - 1)) {
|
||||
/* newline */
|
||||
int i;
|
||||
fprintf(stdout, "\n");
|
||||
for(i = 0; i < indent; i++) {
|
||||
fprintf(stdout, " ");
|
||||
}
|
||||
/* wrap to a newline and reindent */
|
||||
fprintf(stdout, "\n%-*s", indent, "");
|
||||
cidx = indent;
|
||||
} else {
|
||||
printf(" ");
|
||||
cidx++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
fprintf(stdout, "%c", *p);
|
||||
fprintf(stdout, "%lc", (wint_t)*p);
|
||||
cidx += wcwidth(*p);
|
||||
p++;
|
||||
cidx++;
|
||||
}
|
||||
free(wcstr);
|
||||
}
|
||||
|
||||
/* Convert a string to uppercase
|
||||
@ -393,14 +407,31 @@ void list_display(const char *title, const alpm_list_t *list)
|
||||
{
|
||||
const alpm_list_t *i;
|
||||
int cols, len;
|
||||
wchar_t *wcstr;
|
||||
|
||||
len = mbstowcs(NULL, title, 0);
|
||||
printf("%s ", title);
|
||||
if(title) {
|
||||
/* len goes from # bytes -> # chars -> # cols */
|
||||
len = strlen(title) + 1;
|
||||
wcstr = calloc(len, sizeof(wchar_t));
|
||||
len = mbstowcs(wcstr, title, len);
|
||||
len = wcswidth(wcstr, len);
|
||||
free(wcstr);
|
||||
printf("%s ", title);
|
||||
} else {
|
||||
len = 0;
|
||||
}
|
||||
|
||||
if(list) {
|
||||
for(i = list, cols = len; i; i = alpm_list_next(i)) {
|
||||
char *str = alpm_list_getdata(i);
|
||||
int s = mbstowcs(NULL, str, 0) + 2;
|
||||
/* s goes from # bytes -> # chars -> # cols */
|
||||
int s = strlen(str) + 1;
|
||||
wcstr = calloc(s, sizeof(wchar_t));
|
||||
s = mbstowcs(wcstr, str, s);
|
||||
s = wcswidth(wcstr, s);
|
||||
free(wcstr);
|
||||
/* two additional spaces are added to the length */
|
||||
s += 2;
|
||||
int maxcols = getcols();
|
||||
if(s + cols >= maxcols) {
|
||||
int i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user