FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-28-2011, 10:51 PM
Dan McGee
 
Default Fix some easy to find double translations

A lot of these were places that should have used the same message but
didn't, or were very easy to convert to using the same message and
letting some of the burden off of the translators.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
lib/libalpm/be_sync.c | 2 +-
lib/libalpm/po/libalpm.pot | 18 +--------------
lib/libalpm/sync.c | 2 +-
lib/libalpm/util.c | 7 +++--
po/pacman.pot | 52 +++++--------------------------------------
scripts/makepkg.sh.in | 12 +++++-----
scripts/pkgdelta.sh.in | 4 +-
scripts/repo-add.sh.in | 6 ++--
src/pacman/query.c | 6 ++--
src/pacman/util.c | 19 +++++++--------
10 files changed, 36 insertions(+), 92 deletions(-)

diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 2191494..5faf0b8 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -223,7 +223,7 @@ static int sync_db_populate(pmdb_t *db)

if(archive_read_open_filename(archive, _alpm_db_path(db),
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
- _alpm_log(PM_LOG_ERROR, _("could not open %s: %s
"), _alpm_db_path(db),
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s
"), _alpm_db_path(db),
archive_error_string(archive));
archive_read_finish(archive);
RET_ERR(PM_ERR_DB_OPEN, 1);
diff --git a/lib/libalpm/po/libalpm.pot b/lib/libalpm/po/libalpm.pot
index b3edb22..560b7bf 100644
--- a/lib/libalpm/po/libalpm.pot
+++ b/lib/libalpm/po/libalpm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pacman 3.4.3
"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3
"
-"POT-Creation-Date: 2011-02-28 11:09-0600
"
+"POT-Creation-Date: 2011-02-28 17:48-0600
"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE
"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>
"
"Language-Team: LANGUAGE <LL@li.org>
"
@@ -152,10 +152,6 @@ msgid "removing invalid file: %s
"
msgstr ""

#, c-format
-msgid "could not open %s: %s
"
-msgstr ""
-
-#, c-format
msgid "database path is undefined
"
msgstr ""

@@ -484,10 +480,6 @@ msgid "failed to retrieve some files from %s
"
msgstr ""

#, c-format
-msgid "not enough free disk space
"
-msgstr ""
-
-#, c-format
msgid "could not commit removal transaction
"
msgstr ""

@@ -516,10 +508,6 @@ msgid "could not remove tmpdir %s
"
msgstr ""

#, c-format
-msgid "warning given while extracting %s (%s)
"
-msgstr ""
-
-#, c-format
msgid "could not create pipe (%s)
"
msgstr ""

@@ -532,10 +520,6 @@ msgid "could not change the root directory (%s)
"
msgstr ""

#, c-format
-msgid "could not change directory to / (%s)
"
-msgstr ""
-
-#, c-format
msgid "call to execv failed (%s)
"
msgstr ""

diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index fdd3760..2919780 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -900,7 +900,7 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)

_alpm_log(PM_LOG_DEBUG, "checking available disk space
");
if(_alpm_check_diskspace(trans, handle->db_local) == -1) {
- _alpm_log(PM_LOG_ERROR, _("not enough free disk space
"));
+ _alpm_log(PM_LOG_ERROR, "%s
", _("not enough free disk space"));
goto error;
}

diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 9281f0e..74e1405 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -262,7 +262,7 @@ int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int

if(archive_read_open_filename(_archive, archive,
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
- _alpm_log(PM_LOG_ERROR, _("could not open %s: %s
"), archive,
+ _alpm_log(PM_LOG_ERROR, _("could not open file %s: %s
"), archive,
archive_error_string(_archive));
RET_ERR(PM_ERR_PKG_OPEN, 1);
}
@@ -320,7 +320,7 @@ int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int
int readret = archive_read_extract(_archive, entry, 0);
if(readret == ARCHIVE_WARN) {
/* operation succeeded but a non-critical error was encountered */
- _alpm_log(PM_LOG_WARNING, _("warning given while extracting %s (%s)
"),
+ _alpm_log(PM_LOG_WARNING, _("warning given when extracting %s (%s)
"),
entryname, archive_error_string(_archive));
} else if(readret != ARCHIVE_OK) {
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)
"),
@@ -474,7 +474,8 @@ int _alpm_run_chroot(const char *root, const char *path, char *const argv[])
exit(1);
}
if(chdir("/") != 0) {
- fprintf(stderr, _("could not change directory to / (%s)
"), strerror(errno));
+ fprintf(stderr, _("could not change directory to %s (%s)
"),
+ "/", strerror(errno));
exit(1);
}
umask(0022);
diff --git a/po/pacman.pot b/po/pacman.pot
index 9dd2a53..19f4e07 100644
--- a/po/pacman.pot
+++ b/po/pacman.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pacman 3.4.3
"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3
"
-"POT-Creation-Date: 2011-02-28 11:09-0600
"
+"POT-Creation-Date: 2011-02-28 17:48-0600
"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE
"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>
"
"Language-Team: LANGUAGE <LL@li.org>
"
@@ -685,7 +685,7 @@ msgid "cannot determine real path for '%s': %s
"
msgstr ""

#, c-format
-msgid "Path too long: %s%s
"
+msgid "path too long: %s%s
"
msgstr ""

#, c-format
@@ -701,14 +701,6 @@ msgid "group "%s" was not found
"
msgstr ""

#, c-format
-msgid "root path too long
"
-msgstr ""
-
-#, c-format
-msgid "file path too long
"
-msgstr ""
-
-#, c-format
msgid "no usable package repositories configured.
"
msgstr ""

@@ -1017,10 +1009,6 @@ msgid "warning: %s"
msgstr ""

#, c-format
-msgid "function: %s"
-msgstr ""
-
-#, c-format
msgid "error: "
msgstr ""

@@ -1028,10 +1016,6 @@ msgstr ""
msgid "warning: "
msgstr ""

-#, c-format
-msgid "function: "
-msgstr ""
-
msgid "WARNING:"
msgstr ""

@@ -1260,22 +1244,7 @@ msgstr ""
msgid "requested package %s is not provided in %s"
msgstr ""

-msgid "Determining latest darcs revision..."
-msgstr ""
-
-msgid "Determining latest cvs revision..."
-msgstr ""
-
-msgid "Determining latest git revision..."
-msgstr ""
-
-msgid "Determining latest svn revision..."
-msgstr ""
-
-msgid "Determining latest bzr revision..."
-msgstr ""
-
-msgid "Determining latest hg revision..."
+msgid "Determining latest %s revision..."
msgstr ""

msgid "Version found: %s"
@@ -1628,7 +1597,7 @@ msgid "Usage: pkgdelta [-q] <package1> <package2>
"
msgstr ""

msgid ""
-" pkgdelta will create a delta file between two packages
This delta file "
+" pkgdelta will create a delta file between two packages.
This delta file "
"can then be added to a database using repo-add.

"
msgstr ""

@@ -1641,7 +1610,7 @@ msgid ""
"the extent permitted by law.
"
msgstr ""

-msgid "Invalid package '%s'"
+msgid "Invalid package file '%s'."
msgstr ""

msgid "The package names don't match : '%s' and '%s'"
@@ -1722,24 +1691,15 @@ msgstr ""
msgid "Removing existing entry '%s'..."
msgstr ""

-msgid "Invalid package file '%s'."
-msgstr ""
-
msgid "An entry for '%s' already existed"
msgstr ""

-msgid "Creating 'desc' db entry..."
+msgid "Creating '%s' db entry..."
msgstr ""

msgid "Computing md5 checksums..."
msgstr ""

-msgid "Creating 'depends' db entry..."
-msgstr ""
-
-msgid "Creating 'files' db entry..."
-msgstr ""
-
msgid "Old package file not found: %s"
msgstr ""

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 16dc0b8..23081fe 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1356,27 +1356,27 @@ devel_check() {
oldpkgver=$pkgver
if [[ -n ${_darcstrunk} && -n ${_darcsmod} ]] ; then
type -p darcs >/dev/null || return 0
- msg "$(gettext "Determining latest darcs revision...")"
+ msg "$(gettext "Determining latest %s revision...")" 'darcs'
newpkgver=$(date +%Y%m%d)
elif [[ -n ${_cvsroot} && -n ${_cvsmod} ]] ; then
type -p cvs >/dev/null || return 0
- msg "$(gettext "Determining latest cvs revision...")"
+ msg "$(gettext "Determining latest %s revision...")" 'cvs'
newpkgver=$(date +%Y%m%d)
elif [[ -n ${_gitroot} && -n ${_gitname} ]] ; then
type -p git >/dev/null || return 0
- msg "$(gettext "Determining latest git revision...")"
+ msg "$(gettext "Determining latest %s revision...")" 'git'
newpkgver=$(date +%Y%m%d)
elif [[ -n ${_svntrunk} && -n ${_svnmod} ]] ; then
type -p svn >/dev/null || return 0
- msg "$(gettext "Determining latest svn revision...")"
+ msg "$(gettext "Determining latest %s revision...")" 'svn'
newpkgver=$(LC_ALL=C svn info $_svntrunk | sed -n 's/^Last Changed Rev: ([0-9]*)$/1/p')
elif [[ -n ${_bzrtrunk} && -n ${_bzrmod} ]] ; then
type -p bzr >/dev/null || return 0
- msg "$(gettext "Determining latest bzr revision...")"
+ msg "$(gettext "Determining latest %s revision...")" 'bzr'
newpkgver=$(bzr revno ${_bzrtrunk})
elif [[ -n ${_hgroot} && -n ${_hgrepo} ]] ; then
type -p hg >/dev/null || return 0
- msg "$(gettext "Determining latest hg revision...")"
+ msg "$(gettext "Determining latest %s revision...")" 'hg'
if [[ -d ./src/$_hgrepo ]] ; then
cd ./src/$_hgrepo
hg pull
diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in
index 6bc3f5d..ecca427 100644
--- a/scripts/pkgdelta.sh.in
+++ b/scripts/pkgdelta.sh.in
@@ -55,7 +55,7 @@ usage() {
printf "pkgdelta (pacman) %s

" "$myver"
printf "$(gettext "Usage: pkgdelta [-q] <package1> <package2>
")"
printf "$(gettext "
- pkgdelta will create a delta file between two packages

+ pkgdelta will create a delta file between two packages.

This delta file can then be added to a database using repo-add.

")"
echo "$(gettext "Example: pkgdelta pacman-3.0.0.pkg.tar.gz pacman-3.0.1.pkg.tar.gz")"
}
@@ -85,7 +85,7 @@ read_pkginfo()
fi
done
IFS=$OLDIFS
- error "$(gettext "Invalid package '%s'")" "$1"
+ error "$(gettext "Invalid package file '%s'.")" "$1"
return 1
}

diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 9b79022..dfc9397 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -254,7 +254,7 @@ db_write_entry()
[[ -f ../$pkgname.deltas ]] && mv "../$pkgname.deltas" deltas

# create desc entry
- msg2 "$(gettext "Creating 'desc' db entry...")"
+ msg2 "$(gettext "Creating '%s' db entry...")" 'desc'
echo -e "%FILENAME%
$(basename "$1")
" >>desc
echo -e "%NAME%
$pkgname
" >>desc
[[ -n $pkgbase ]] && echo -e "%BASE%
$pkgbase
" >>desc
@@ -276,7 +276,7 @@ db_write_entry()
write_list_entry "REPLACES" "$_replaces" "desc"

# create depends entry
- msg2 "$(gettext "Creating 'depends' db entry...")"
+ msg2 "$(gettext "Creating '%s' db entry...")" 'depends'
# create the file even if it will remain empty
touch "depends"
write_list_entry "DEPENDS" "$_depends" "depends"
@@ -289,7 +289,7 @@ db_write_entry()

# create files file if wanted
if (( WITHFILES )); then
- msg2 "$(gettext "Creating 'files' db entry...")"
+ msg2 "$(gettext "Creating '%s' db entry...")" 'files'
local files_path="$tmpdir/$pkgname-$pkgver/files"
echo "%FILES%" >$files_path
bsdtar --exclude='.*' -tf "$pkgfile" >>$files_path
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 18c6992..bd23d46 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -184,7 +184,7 @@ static int query_fileowner(alpm_list_t *targets)
}

if(strlen(pkgfile) > max_length) {
- pm_fprintf(stderr, PM_LOG_ERROR, _("Path too long: %s%s
"), root, pkgfile);
+ pm_fprintf(stderr, PM_LOG_ERROR, _("path too long: %s%s
"), root, pkgfile);
}
/* concatenate our file and the root path */
strcpy(append, pkgfile);
@@ -399,7 +399,7 @@ static int check(pmpkg_t *pkg)
rootlen = strlen(root);
if(rootlen + 1 > PATH_MAX) {
/* we are in trouble here */
- pm_fprintf(stderr, PM_LOG_ERROR, _("root path too long
"));
+ pm_fprintf(stderr, PM_LOG_ERROR, _("path too long: %s%s
"), root, "");
return(1);
}
strcpy(f, root);
@@ -410,7 +410,7 @@ static int check(pmpkg_t *pkg)
const char *path = alpm_list_getdata(i);

if(rootlen + 1 + strlen(path) > PATH_MAX) {
- pm_fprintf(stderr, PM_LOG_WARNING, _("file path too long
"));
+ pm_fprintf(stderr, PM_LOG_WARNING, _("path too long: %s%s
"), root, path);
continue;
}
strcpy(f + rootlen, path);
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 2d4ccf3..8336808 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -987,19 +987,20 @@ int pm_vasprintf(char **string, pmloglevel_t level, const char *format, va_list

/* print a prefix to the message */
switch(level) {
- case PM_LOG_DEBUG:
- pm_asprintf(string, "debug: %s", msg);
- break;
case PM_LOG_ERROR:
pm_asprintf(string, _("error: %s"), msg);
break;
case PM_LOG_WARNING:
pm_asprintf(string, _("warning: %s"), msg);
break;
+ case PM_LOG_DEBUG:
+ pm_asprintf(string, "debug: %s", msg);
+ break;
case PM_LOG_FUNCTION:
- pm_asprintf(string, _("function: %s"), msg);
+ pm_asprintf(string, "function: %s", msg);
break;
default:
+ pm_asprintf(string, "%s", msg);
break;
}
free(msg);
@@ -1034,19 +1035,17 @@ int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list ar

/* print a prefix to the message */
switch(level) {
- case PM_LOG_DEBUG:
- fprintf(stream, "debug: ");
- break;
case PM_LOG_ERROR:
fprintf(stream, _("error: "));
break;
case PM_LOG_WARNING:
fprintf(stream, _("warning: "));
break;
+ case PM_LOG_DEBUG:
+ fprintf(stream, "debug: ");
+ break;
case PM_LOG_FUNCTION:
- /* TODO we should increase the indent level when this occurs so we can see
- * program flow easier. It'll be fun */
- fprintf(stream, _("function: "));
+ fprintf(stream, "function: ");
break;
default:
break;
--
1.7.4.1
 

Thread Tools




All times are GMT. The time now is 01:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org