huzheng001/stardict-3

spelling-error-in stardict-tools ,check by Debian lintian, patch

Opened this issue · 0 comments

There are some spelling-error in stardict-tools dir source code.
This is checked out by Debian lintian tool.

The patch is:

diff --git a/tools/src/connector.cpp b/tools/src/connector.cpp
index 592d028..199caa3 100644
--- a/tools/src/connector.cpp
+++ b/tools/src/connector.cpp
@@ -126,7 +126,7 @@ void Connector::fill_key(const std::string& keystr)
 #endif
 			p = end + sizeof("<nu />") - 1;
 		} else {
-			g_critical("Unkown tag here: %s, line: %s\n", q, keystr.c_str());
+			g_critical("Unknown tag here: %s, line: %s\n", q, keystr.c_str());
 			exit(EXIT_FAILURE);
 		}
 	}
diff --git a/tools/src/dsl_parser.cpp b/tools/src/dsl_parser.cpp
index 26ea930..ddd36b0 100644
--- a/tools/src/dsl_parser.cpp
+++ b/tools/src/dsl_parser.cpp
@@ -97,7 +97,7 @@ namespace {
 
 		//this is a real function which parse file,
 		//because of in additition to dsl by itself,
-		//may be need parse file with abbrevations,
+		//may be need parse file with abbreviations,
 		//which have the same format
 		int parse(MapFile& in, bool only_info, bool abr);
 		int print_info();
@@ -356,10 +356,10 @@ namespace {
 			map_file.open(it->c_str());
 
 			if (map_file) {
-				g_critical("Parse file with abbrevations: %s\n", it->c_str());
+				g_critical("Parse file with abbreviations: %s\n", it->c_str());
 				name = index_language = contents_language = from_codeset = "";
 				if (parse(map_file, false, true) != EXIT_SUCCESS) {
-					g_critical("Error during parse abbrevation this file: ");
+					g_critical("Error during parse abbreviation this file: ");
 					g_critical(it->c_str());
 					g_critical("\n");
 					break;
diff --git a/tools/src/jdictionary.cpp b/tools/src/jdictionary.cpp
index 5c48ae9..014c6c4 100644
--- a/tools/src/jdictionary.cpp
+++ b/tools/src/jdictionary.cpp
@@ -23,7 +23,7 @@
 
 // This program was written for jdictionary, http://www.jdictionary.info/
 // But i find its data is too chaos, the GerEng which i want is almost the same as dictd_www.freedict.de_deu-eng.
-// So i have droped this program.
+// So i have dropped this program.
 
 #include <glib.h>
 
diff --git a/tools/src/kingsoft.cpp b/tools/src/kingsoft.cpp
index 245c9a4..37040ca 100644
--- a/tools/src/kingsoft.cpp
+++ b/tools/src/kingsoft.cpp
@@ -56,7 +56,7 @@ gchar *get_cdata(gchar *data)
 {
 	if (!g_str_has_prefix(data, "<![CDATA[")) {
 		if (!g_str_has_prefix(data, "[CDATA[")) {
-			g_print("Error, unknow cdata: %s\n", data);
+			g_print("Error, unknown cdata: %s\n", data);
 			return NULL;
 		} else {
 			g_print("Warning: %s\n", data);
@@ -67,7 +67,7 @@ gchar *get_cdata(gchar *data)
 	}
 	gchar *p = strstr(data, "]]");
 	if (!p) {
-		g_print("Error, unknow cdata end: %s\n", data);
+		g_print("Error, unknown cdata end: %s\n", data);
 		return NULL;
 	}
 	*p='\0';
diff --git a/tools/src/kingsoft2.cpp b/tools/src/kingsoft2.cpp
index 72aa6c6..0a0d244 100644
--- a/tools/src/kingsoft2.cpp
+++ b/tools/src/kingsoft2.cpp
@@ -56,7 +56,7 @@ gchar *get_cdata(gchar *data)
 {
 	if (!g_str_has_prefix(data, "<![CDATA[")) {
 		if (!g_str_has_prefix(data, "[CDATA[")) {
-			g_print("Error, unknow cdata: %s\n", data);
+			g_print("Error, unknown cdata: %s\n", data);
 			return NULL;
 		} else {
 			g_print("Warning: %s\n", data);
@@ -67,7 +67,7 @@ gchar *get_cdata(gchar *data)
 	}
 	gchar *p = strstr(data, "]]");
 	if (!p) {
-		g_print("Error, unknow cdata end: %s\n", data);
+		g_print("Error, unknown cdata end: %s\n", data);
 		return NULL;
 	}
 	*p='\0';
diff --git a/tools/src/libtabfile.cpp b/tools/src/libtabfile.cpp
index 2ee9dfd..c336934 100644
--- a/tools/src/libtabfile.cpp
+++ b/tools/src/libtabfile.cpp
@@ -135,7 +135,7 @@ static bool read_tab_file(gchar *buffer, GArray *array)
 	glong linenum=1;
 	while (true) {
 		if (*p == '\0') {
-			g_message("Convertion is over.");
+			g_message("Conversion is over.");
 			break;
 		}
 		p1 = strchr(p,'\n');
diff --git a/tools/src/olddic2newdic.cpp b/tools/src/olddic2newdic.cpp
index 0ea5c88..e20df52 100644
--- a/tools/src/olddic2newdic.cpp
+++ b/tools/src/olddic2newdic.cpp
@@ -421,12 +421,12 @@ void convert(char *filename,char *idxheadfilename)
 			if ((previous_datasize == pworditem->datasize)&&
 				(memcmp(previous_data,pworditem->data,previous_datasize)==0)) {
 				
-				g_print("word %s is complete duplicated! droped!\n" ,previous_word);				
+				g_print("word %s is complete duplicated! dropped!\n" ,previous_word);				
 				wordcount--;
 				continue;
 			}
 			else {
-				g_print("word %s is duplicated! droped!\n" ,previous_word);				
+				g_print("word %s is duplicated! dropped!\n" ,previous_word);				
 				wordcount--;
 				continue;
 				
diff --git a/tools/src/pydict2dic.c b/tools/src/pydict2dic.c
index 6c9e357..2fbd0a3 100644
--- a/tools/src/pydict2dic.c
+++ b/tools/src/pydict2dic.c
@@ -177,7 +177,7 @@ void convert(char *filename)
 		pworditem = &g_array_index(ecarray, struct _worditem, i);
 		
 		if (strcmp(previous_word,pworditem->word)==0) {
-			g_print("word %s is duplicated! droped!\n" ,previous_word);
+			g_print("word %s is duplicated! dropped!\n" ,previous_word);
 			wordcount--;
 			continue;
 		}
@@ -201,7 +201,7 @@ void convert(char *filename)
 		pworditem = &g_array_index(cearray, struct _worditem, i);
 		
 		if (strcmp(previous_word,pworditem->word)==0) {
-			g_print("word %s is duplicated! droped!\n" ,previous_word);
+			g_print("word %s is duplicated! dropped!\n" ,previous_word);
 			wordcount--;
 			continue;
 		}

spelling-error-in-binary.stardict-tools.patch.txt