[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Patch



Jens Seidel schrieb:
Chris Leick wrote:
u.a. mein Versuch ein Patch für dvdbackup zu erstellen. Leider scheint irgendetwas daran nicht zu klappen. Wenn ich zuerst summarization.diff einspiele und dann die beiden anderen bekomme ich bei den zuletzt eingespielten Fehlermeldungen:

chris@host:~/l10n/Patch$ patch -p1 -i missing_separators.diff dvdbackup/src/dvdbackup.c
patching file dvdbackup/src/dvdbackup.c
Hunk #2 FAILED at 971.
1 out of 2 hunks FAILED -- saving rejects to file dvdbackup/src/dvdbackup.c.rej

Das liegt daran, dass man beim Einspielen von Patches eine bestimmte
Reihenfolge beachten muss. Ein Patch vergleicht immer einen alten Stand mit
einem neuen. Spielt man jetzt einen weiteren Patch ein, so ist der vorliegende
Stand schon das Resultat des eingespielten ersten Patches, ...

Mmh. Das soll man hier aber nicht, da der Entwickler evtl. nur einen der Patches einspielen möchte.


Noch eine Anmerkung. So wie von dir vorgegangen ist es richtig, aber diese
Änderungen könnte man eventuell auch in zwei (oder vielleicht sogar nur einem Patch) vereinen, da fehlende Satzzeichen ja eigentlich auch Rechtschreib-
bzw. grammatikalische Fehler sind.

ok. Werde ich das nächste Mal zusammenfassen.

The following patch should add missing separators (:,):

s/should add/adds/

ok

missing_separators.diff:

Der Doppelpunkt macht keinen Sinn, die Erklärung kam ja zuvor.

ok

These strings need to be translated independently and it is possible to
reduce these to single strings to reduce translators work:

summarization.diff


-		fprintf(stderr, _("The Title file %s exists will try to over write it.\n"), targetname);
+		fprintf(stderr, _("The %s file %s exists will try to over write it.\n"), "Title", targetname);

Hier wäre es vielleicht doch sinnvoll, "Title" übersetzbar zu machen. Also
_("Title") im dritten Argument verwenden. Analog für "Menu".
Für "IFO" und "BUP" gilt das nicht unbedingt.
Dieses Patch habe ich ersetzt. Hier nochmal das ganze:

Package: dvdbackup
Version: 0.4
Severity: minor
Tags: patch

Hi,

The following patches should fix some errors and oddities. I've found them while translating dvdbackup.


The following patch adds missing separators (:,):
missing_separators.diff


These strings need to be translated independently and it is possible to
reduce these to single strings to reduce translators work:
summarization.diff


The following patch fixes a grammatical error ("a" instead of "an"):
syntax.diff


Greetings,

Chris
diff -ru dvdbackup.orig/src/dvdbackup.c dvdbackup/src/dvdbackup.c
--- dvdbackup.orig/src/dvdbackup.c	2009-02-20 00:00:52.000000000 +0100
+++ dvdbackup/src/dvdbackup.c	2009-05-25 12:07:17.000000000 +0200
@@ -284,7 +284,7 @@
 			to_read = left;
 		}
 		if ((rbuff = DVDReadBlocks(dvd_file,soffset, to_read, buffer)) < 0) {
-			fprintf(stderr, _("Error reading MENU VOB %d != %d\n"), rbuff, to_read);
+			fprintf(stderr, _("Error reading MENU VOB: %d != %d\n"), rbuff, to_read);
 			free(buffer);
 			DVDCloseFile(dvd_file);
 			close(streamout);
@@ -971,7 +971,7 @@
 
 
 	if (stat(targetname, &fileinfo) == 0) {
-		fprintf(stderr, _("The Title file %s exists will try to over write it.\n"), targetname);
+		fprintf(stderr, _("The Title file %s exists, will try to over write it.\n"), targetname);
 		if (! S_ISREG(fileinfo.st_mode)) {
 			fprintf(stderr,_("The Title %s file is not valid, it may be a directory\n"), targetname);
 			return(1);
diff -ru dvdbackup.orig/src/dvdbackup.c dvdbackup/src/dvdbackup.c
--- dvdbackup.orig/src/dvdbackup.c	2009-02-20 00:00:52.000000000 +0100
+++ dvdbackup/src/dvdbackup.c	2009-05-25 13:43:03.000000000 +0200
@@ -971,9 +971,9 @@
 
 
 	if (stat(targetname, &fileinfo) == 0) {
-		fprintf(stderr, _("The Title file %s exists will try to over write it.\n"), targetname);
+		fprintf(stderr, _("The %s file %s exists will try to over write it.\n"), _("Title"), targetname);
 		if (! S_ISREG(fileinfo.st_mode)) {
-			fprintf(stderr,_("The Title %s file is not valid, it may be a directory\n"), targetname);
+			fprintf(stderr,_("The %s %s file is not valid, it may be a directory\n"), _("Title"), targetname);
 			return(1);
 		} else {
 			if ((streamout = open(targetname, O_WRONLY | O_TRUNC, 0666)) == -1) {
@@ -1049,9 +1049,9 @@
 	sprintf(targetname,"%s/%s/VIDEO_TS/%s",targetdir, title_name, filename);
 
 	if (stat(targetname, &fileinfo) == 0) {
-		fprintf(stderr, _("The Menu file %s exists will try to over write it.\n"), targetname);
+		fprintf(stderr, _("The %s file %s exists will try to over write it.\n"), _("Menu"), targetname);
 		if (! S_ISREG(fileinfo.st_mode)) {
-			fprintf(stderr,_("The Menu %s file is not valid, it may be a directory\n"), targetname);
+			fprintf(stderr,_("The %s %s file is not valid, it may be a directory\n"), _("Menu"), targetname);
 			DVDCloseFile(dvd_file);
 			return(1);
 		} else {
@@ -1121,17 +1121,17 @@
 	}
 
 	if (stat(targetname_ifo, &fileinfo) == 0) {
-		fprintf(stderr, _("The IFO file %s exists will try to over write it.\n"), targetname_ifo);
+		fprintf(stderr, _("The %s file %s exists will try to over write it.\n"), "IFO", targetname_ifo);
 		if (! S_ISREG(fileinfo.st_mode)) {
-			fprintf(stderr,_("The IFO %s file is not valid, it may be a directory\n"), targetname_ifo);
+			fprintf(stderr,_("The %s %s file is not valid, it may be a directory\n"), "IFO", targetname_ifo);
 			return(1);
 		}
 	}
 
 	if (stat(targetname_bup, &fileinfo) == 0) {
-		fprintf(stderr, _("The BUP file %s exists will try to over write it.\n"), targetname_bup);
+		fprintf(stderr, _("The %s file %s exists will try to over write it.\n"), "BUP", targetname_bup);
 		if (! S_ISREG(fileinfo.st_mode)) {
-			fprintf(stderr,_("The BUP %s file is not valid, it may be a directory\n"), targetname_bup);
+			fprintf(stderr,_("The %s %s file is not valid, it may be a directory\n"), "BUP", targetname_bup);
 			return(1);
 		}
 	}
diff -ru dvdbackup.orig/src/main.c dvdbackup/src/main.c
--- dvdbackup.orig/src/main.c	2009-02-20 00:00:52.000000000 +0100
+++ dvdbackup/src/main.c	2009-05-25 12:14:09.000000000 +0200
@@ -403,7 +403,7 @@
 
 	if (stat(targetname, &fileinfo) == 0) {
 		if (! S_ISDIR(fileinfo.st_mode)) {
-			fprintf(stderr,_("The target directory is not valid; it may be a ordinary file\n"));
+			fprintf(stderr,_("The target directory is not valid; it may be an ordinary file\n"));
 		}
 	} else {
 		if (mkdir(targetname, 0777) != 0) {
@@ -419,7 +419,7 @@
 
 	if (stat(targetname, &fileinfo) == 0) {
 		if (! S_ISDIR(fileinfo.st_mode)) {
-			fprintf(stderr,_("The title directory is not valid; it may be a ordinary file\n"));
+			fprintf(stderr,_("The title directory is not valid; it may be an ordinary file\n"));
 		}
 	} else {
 		if (mkdir(targetname, 0777) != 0) {
@@ -434,7 +434,7 @@
 
 	if (stat(targetname, &fileinfo) == 0) {
 		if (! S_ISDIR(fileinfo.st_mode)) {
-			fprintf(stderr,_("The VIDEO_TS directory is not valid; it may be a ordinary file\n"));
+			fprintf(stderr,_("The VIDEO_TS directory is not valid; it may be an ordinary file\n"));
 		}
 	} else {
 		if (mkdir(targetname, 0777) != 0) {

Reply to: