[chronojump] Fixed crash by tilde on translated words on encoder
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed crash by tilde on translated words on encoder
- Date: Wed, 11 Nov 2015 11:52:24 +0000 (UTC)
commit f76efc40f17b580522f6e0260145d4a6d584a237
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Nov 11 12:51:07 2015 +0100
Fixed crash by tilde on translated words on encoder
src/constants.cs | 3 +++
src/utilEncoder.cs | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/constants.cs b/src/constants.cs
index 2e9a977..66a2b07 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -856,8 +856,11 @@ public class Constants
* written here in order to be translated
* Attention: this will be separated by ';', then no ';' sign can be here
* No "\n" can be here also
+ * No "'" can be here also. eg d'inèrcia on catalan
* if translators add one, it will be converted to ','
* if translators add a "\n", it will be converted to " "
+ * if translators add a "'", it will be converted to ' '
+ *
* check that this list has same elements than above list
*/
public static string [] EncoderTranslatedWords = {
diff --git a/src/utilEncoder.cs b/src/utilEncoder.cs
index 207a4ab..c94d3b2 100644
--- a/src/utilEncoder.cs
+++ b/src/utilEncoder.cs
@@ -314,6 +314,7 @@ public class UtilEncoder
if(translate) {
foreach(string etw in Constants.EncoderTranslatedWords) {
temp = Util.ChangeChars(Catalog.GetString(etw), ";", ",");
+ temp = Util.RemoveChar(temp, '\'');
temp = Util.RemoveNewLine(temp, true);
temp = Util.RemoveChar(temp, '#'); //needed to distinguish comments '#' than
normal lines like the EncoderTranslatedWords
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]