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>
This commit is contained in:
Dan McGee 2011-02-28 17:50:23 -06:00
parent 07538b948a
commit 09ce8b446c
10 changed files with 36 additions and 92 deletions

View File

@ -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\n"), _alpm_db_path(db),
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), _alpm_db_path(db),
archive_error_string(archive));
archive_read_finish(archive);
RET_ERR(PM_ERR_DB_OPEN, 1);

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pacman 3.4.3\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-02-28 11:09-0600\n"
"POT-Creation-Date: 2011-02-28 17:48-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -151,10 +151,6 @@ msgstr ""
msgid "removing invalid file: %s\n"
msgstr ""
#, c-format
msgid "could not open %s: %s\n"
msgstr ""
#, c-format
msgid "database path is undefined\n"
msgstr ""
@ -483,10 +479,6 @@ msgstr ""
msgid "failed to retrieve some files from %s\n"
msgstr ""
#, c-format
msgid "not enough free disk space\n"
msgstr ""
#, c-format
msgid "could not commit removal transaction\n"
msgstr ""
@ -515,10 +507,6 @@ msgstr ""
msgid "could not remove tmpdir %s\n"
msgstr ""
#, c-format
msgid "warning given while extracting %s (%s)\n"
msgstr ""
#, c-format
msgid "could not create pipe (%s)\n"
msgstr ""
@ -531,10 +519,6 @@ msgstr ""
msgid "could not change the root directory (%s)\n"
msgstr ""
#, c-format
msgid "could not change directory to / (%s)\n"
msgstr ""
#, c-format
msgid "call to execv failed (%s)\n"
msgstr ""

View File

@ -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\n");
if(_alpm_check_diskspace(trans, handle->db_local) == -1) {
_alpm_log(PM_LOG_ERROR, _("not enough free disk space\n"));
_alpm_log(PM_LOG_ERROR, "%s\n", _("not enough free disk space"));
goto error;
}

View File

@ -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\n"), archive,
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), 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)\n"),
_alpm_log(PM_LOG_WARNING, _("warning given when extracting %s (%s)\n"),
entryname, archive_error_string(_archive));
} else if(readret != ARCHIVE_OK) {
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)\n"),
@ -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)\n"), strerror(errno));
fprintf(stderr, _("could not change directory to %s (%s)\n"),
"/", strerror(errno));
exit(1);
}
umask(0022);

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pacman 3.4.3\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-02-28 11:09-0600\n"
"POT-Creation-Date: 2011-02-28 17:48-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -685,7 +685,7 @@ msgid "cannot determine real path for '%s': %s\n"
msgstr ""
#, c-format
msgid "Path too long: %s%s\n"
msgid "path too long: %s%s\n"
msgstr ""
#, c-format
@ -700,14 +700,6 @@ msgstr ""
msgid "group \"%s\" was not found\n"
msgstr ""
#, c-format
msgid "root path too long\n"
msgstr ""
#, c-format
msgid "file path too long\n"
msgstr ""
#, c-format
msgid "no usable package repositories configured.\n"
msgstr ""
@ -1016,10 +1008,6 @@ msgstr ""
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>\\n"
msgstr ""
msgid ""
"\tpkgdelta will create a delta file between two packages\\nThis delta file "
"\tpkgdelta will create a delta file between two packages.\\nThis delta file "
"can then be added to a database using repo-add.\\n\\n"
msgstr ""
@ -1641,7 +1610,7 @@ msgid ""
"the extent permitted by law.\\n"
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 ""

View File

@ -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

View File

@ -55,7 +55,7 @@ usage() {
printf "pkgdelta (pacman) %s\n\n" "$myver"
printf "$(gettext "Usage: pkgdelta [-q] <package1> <package2>\n")"
printf "$(gettext "\
pkgdelta will create a delta file between two packages\n\
pkgdelta will create a delta file between two packages.\n\
This delta file can then be added to a database using repo-add.\n\n")"
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
}

View File

@ -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%\n$(basename "$1")\n" >>desc
echo -e "%NAME%\n$pkgname\n" >>desc
[[ -n $pkgbase ]] && echo -e "%BASE%\n$pkgbase\n" >>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

View File

@ -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\n"), root, pkgfile);
pm_fprintf(stderr, PM_LOG_ERROR, _("path too long: %s%s\n"), 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\n"));
pm_fprintf(stderr, PM_LOG_ERROR, _("path too long: %s%s\n"), 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\n"));
pm_fprintf(stderr, PM_LOG_WARNING, _("path too long: %s%s\n"), root, path);
continue;
}
strcpy(f + rootlen, path);

View File

@ -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;