From: Guillem Jover Date: Mon, 12 May 2008 17:59:54 +0000 (+0300) Subject: Mark and coalesce similar strings for translation X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2960a07eba3b122ae842345884a466dc0f8f94c5;p=dpkg Mark and coalesce similar strings for translation --- diff --git a/ChangeLog b/ChangeLog index 14c2286a..91b54111 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-12 Guillem Jover + + * src/help.c (do_script): Expand 'maint' to 'maintainer' in string. + (vmaintainer_script_installed): Mark string for translation. Change + strings so that they get merged by gettext with similar ones. + (maintainer_script_new): Likewise. + 2008-05-12 Guillem Jover * dselect/method.cc: Include . Use setup_subproc_signals diff --git a/debian/changelog b/debian/changelog index 970615aa..200d58a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ dpkg (1.15.0) UNRELEASED; urgency=low * Do not suggest manually changing the alternative symlinks on update-alternative's verbose mode. Closes: #412487 * Refactor subprocess signal setup. + * Mark and coalesce similar strings for translation. [ Raphael Hertzog ] * Enhance dpkg-shlibdeps's error message when a library can't be found to diff --git a/src/help.c b/src/help.c index 1a9ea0f0..b7b21213 100644 --- a/src/help.c +++ b/src/help.c @@ -250,7 +250,7 @@ static int do_script(const char *pkg, const char *scriptname, const char *script narglist[0]= scriptexec; if (setenv(MAINTSCRIPTPKGENVVAR, pkg, 1) || setenv(MAINTSCRIPTDPKGENVVAR, PACKAGE_VERSION, 1)) - ohshite(_("unable to setenv for maint script")); + ohshite(_("unable to setenv for maintainer script")); execv(scriptexec,(char * const *)narglist); ohshite(desc,name); } @@ -274,7 +274,7 @@ vmaintainer_script_installed(struct pkginfo *pkg, const char *scriptname, scriptpath= pkgadminfile(pkg,scriptname); arglist= vbuildarglist(scriptname,ap); - sprintf(buf,"%s script",description); + sprintf(buf, _("installed %s script"), description); if (stat(scriptpath,&stab)) { if (errno == ENOENT) { @@ -282,7 +282,7 @@ vmaintainer_script_installed(struct pkginfo *pkg, const char *scriptname, scriptname); return 0; } - ohshite(_("unable to stat installed %s script `%.250s'"),description,scriptpath); + ohshite(_("unable to stat %s `%.250s'"), buf, scriptpath); } do_script(pkg->name, scriptname, scriptpath, &stab, arglist, _("unable to execute %s"), buf, 0); @@ -332,7 +332,7 @@ int maintainer_script_new(const char *pkgname, va_start(ap,cidirrest); arglist= vbuildarglist(scriptname,ap); va_end(ap); - sprintf(buf,"%s script",description); + sprintf(buf, _("new %s script"), description); strcpy(cidirrest,scriptname); if (stat(cidir,&stab)) { @@ -340,9 +340,10 @@ int maintainer_script_new(const char *pkgname, debug(dbg_scripts,"maintainer_script_new nonexistent %s `%s'",scriptname,cidir); return 0; } - ohshite(_("unable to stat new %s script `%.250s'"),description,cidir); + ohshite(_("unable to stat %s `%.250s'"), buf, cidir); } - do_script(pkgname, scriptname, cidir, &stab, arglist, _("unable to execute new %s"), buf, 0); + do_script(pkgname, scriptname, cidir, &stab, arglist, + _("unable to execute %s"), buf, 0); post_script_tasks(); return 1;