Hello,
today, after more than two years of using GnuCash, I noticed that the
register's date help string shown in the status bar displays a total
garbage in Lithuanian. I investigated and discovered that it is simply
not marked for translation.

I understand that we are very close to the GnuCash 2.6 release, but I
would like to fix this anyway.
(0001-Make-the-date-help-string-translatable.patch)

However, if this is not possible, I also send an alternative patch that
makes the string translatable, but replaces it with a string (not ideal)
that is already translated.
(HACK-Make-the-date-help-string-translatable-but-avoid-a-n.patch)
>From f0331945a544dc4f9745d5d360a8db529bfb897b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aurimas=20Fi=C5=A1eras?= <auri...@members.fsf.org>
Date: Tue, 24 Dec 2013 10:11:51 +0200
Subject: Make the date help string translatable

---
 src/business/business-ledger/gncEntryLedgerModel.c | 2 +-
 src/gnome-utils/gnc-tree-util-split-reg.c          | 2 +-
 src/register/ledger-core/split-register-model.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/business/business-ledger/gncEntryLedgerModel.c b/src/business/business-ledger/gncEntryLedgerModel.c
index b4455dd..96a0dca 100644
--- a/src/business/business-ledger/gncEntryLedgerModel.c
+++ b/src/business/business-ledger/gncEntryLedgerModel.c
@@ -591,7 +591,7 @@ static char * get_date_help (VirtualLocation virt_loc, gpointer user_data)
     gnc_date_cell_get_date ((DateCell *) cell, &ts);
     tt = ts.tv_sec;
     gnc_localtime_r (&tt, &tm);
-    qof_strftime (string, sizeof(string), "%A %d %B %Y", &tm);
+    qof_strftime (string, sizeof(string), _("%A %d %B %Y"), &tm);
 
     return g_strdup (string);
 }
diff --git a/src/gnome-utils/gnc-tree-util-split-reg.c b/src/gnome-utils/gnc-tree-util-split-reg.c
index c8d7e09..88c4ee3 100644
--- a/src/gnome-utils/gnc-tree-util-split-reg.c
+++ b/src/gnome-utils/gnc-tree-util-split-reg.c
@@ -457,7 +457,7 @@ gnc_tree_util_split_reg_get_date_help (GDate *date)
         struct tm tm;
         memset (&tm, 0, sizeof (tm));
         g_date_to_struct_tm (date, &tm);
-        qof_strftime (string, sizeof (string), "%A %d %B %Y", &tm);
+        qof_strftime (string, sizeof (string), _("%A %d %B %Y"), &tm);
         return g_strdup (string);
     }
     else
diff --git a/src/register/ledger-core/split-register-model.c b/src/register/ledger-core/split-register-model.c
index 23f00f7..19cb37e 100644
--- a/src/register/ledger-core/split-register-model.c
+++ b/src/register/ledger-core/split-register-model.c
@@ -919,7 +919,7 @@ gnc_split_register_get_date_help (VirtualLocation virt_loc,
 
     gnc_localtime_r (&tt, &tm);
 
-    qof_strftime (string, sizeof (string), "%A %d %B %Y", &tm);
+    qof_strftime (string, sizeof (string), _("%A %d %B %Y"), &tm);
 
     return g_strdup (string);
 }
-- 
1.8.5.2

>From fb6e009216a2367122077e51bc13633f37eaae30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aurimas=20Fi=C5=A1eras?= <auri...@members.fsf.org>
Date: Tue, 24 Dec 2013 10:11:51 +0200
Subject: Make the date help string translatable, but avoid a new string

---
 src/business/business-ledger/gncEntryLedgerModel.c | 2 +-
 src/gnome-utils/gnc-tree-util-split-reg.c          | 2 +-
 src/register/ledger-core/split-register-model.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/business/business-ledger/gncEntryLedgerModel.c b/src/business/business-ledger/gncEntryLedgerModel.c
index b4455dd..14862e9 100644
--- a/src/business/business-ledger/gncEntryLedgerModel.c
+++ b/src/business/business-ledger/gncEntryLedgerModel.c
@@ -591,7 +591,7 @@ static char * get_date_help (VirtualLocation virt_loc, gpointer user_data)
     gnc_date_cell_get_date ((DateCell *) cell, &ts);
     tt = ts.tv_sec;
     gnc_localtime_r (&tt, &tm);
-    qof_strftime (string, sizeof(string), "%A %d %B %Y", &tm);
+    qof_strftime (string, sizeof(string), _("%B %e, %Y"), &tm);
 
     return g_strdup (string);
 }
diff --git a/src/gnome-utils/gnc-tree-util-split-reg.c b/src/gnome-utils/gnc-tree-util-split-reg.c
index c8d7e09..7ffbbb4 100644
--- a/src/gnome-utils/gnc-tree-util-split-reg.c
+++ b/src/gnome-utils/gnc-tree-util-split-reg.c
@@ -457,7 +457,7 @@ gnc_tree_util_split_reg_get_date_help (GDate *date)
         struct tm tm;
         memset (&tm, 0, sizeof (tm));
         g_date_to_struct_tm (date, &tm);
-        qof_strftime (string, sizeof (string), "%A %d %B %Y", &tm);
+        qof_strftime (string, sizeof (string), _("%B %e, %Y"), &tm);
         return g_strdup (string);
     }
     else
diff --git a/src/register/ledger-core/split-register-model.c b/src/register/ledger-core/split-register-model.c
index 23f00f7..af59812 100644
--- a/src/register/ledger-core/split-register-model.c
+++ b/src/register/ledger-core/split-register-model.c
@@ -919,7 +919,7 @@ gnc_split_register_get_date_help (VirtualLocation virt_loc,
 
     gnc_localtime_r (&tt, &tm);
 
-    qof_strftime (string, sizeof (string), "%A %d %B %Y", &tm);
+    qof_strftime (string, sizeof (string), _("%B %e, %Y"), &tm);
 
     return g_strdup (string);
 }
-- 
1.8.5.2

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to