gnucash maint: Multiple changes pushed

Frank H.Ellenberger fell at code.gnucash.org
Fri Dec 21 19:26:22 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/294c932e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7f1a7115 (commit)
	from  https://github.com/Gnucash/gnucash/commit/b2e4148d (commit)



commit 294c932e3b945c789dab36962b6c873d3618fc65
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Sat Dec 22 01:20:45 2018 +0100

    de.po: Berichtige ein bisher nicht übersetztes Datum-Format
    
    Follow up of commit 7f1a711

diff --git a/po/de.po b/po/de.po
index 7a9c276..14fc1ca 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8527,7 +8527,7 @@ msgstr "-- Aktienteilung --"
 #: gnucash/register/ledger-core/gncEntryLedgerModel.c:576
 #: gnucash/register/ledger-core/split-register-model.c:980
 msgid "%A %d %B %Y"
-msgstr "%A %d %B %Y"
+msgstr "%A, %d. %B %Y"
 
 #: gnucash/gnome-utils/gnc-tree-util-split-reg.c:479
 msgid ""

commit 7f1a71156745e57e9a2ca2b5a2369ce27d6ce227
Author: YOSHINO Yoshihito <yy.y.ja.jp at gmail.com>
Date:   Sat Dec 22 01:03:49 2018 +0100

    Bug 796989 - some date/time does not honor user locale
    
    because now it looks for the user locale each time when it formats
    datetime, I added Fixme comments.

diff --git a/libgnucash/engine/gnc-datetime.cpp b/libgnucash/engine/gnc-datetime.cpp
index 8561cb0..f5d9916 100644
--- a/libgnucash/engine/gnc-datetime.cpp
+++ b/libgnucash/engine/gnc-datetime.cpp
@@ -428,7 +428,8 @@ GncDateTimeImpl::format(const char* format) const
     std::stringstream ss;
     //The stream destructor frees the facet, so it must be heap-allocated.
     auto output_facet(new Facet(normalize_format(format).c_str()));
-    ss.imbue(std::locale(std::locale(), output_facet));
+    // FIXME Rather than imbueing a locale below we probably should set std::locale::global appropriately somewhere.
+    ss.imbue(std::locale(std::locale(""), output_facet));
     ss << m_time;
     return ss.str();
 }
@@ -439,8 +440,9 @@ GncDateTimeImpl::format_zulu(const char* format) const
     using Facet = boost::posix_time::time_facet;
     std::stringstream ss;
     //The stream destructor frees the facet, so it must be heap-allocated.
-    auto output_facet(new Facet(normalize_format(format).c_str()));
-    ss.imbue(std::locale(std::locale(), output_facet));
+    auto output_facet(new Facet(normalize_format(format).c_str())); 
+    // FIXME Rather than imbueing a locale below we probably should set std::locale::global appropriately somewhere.
+    ss.imbue(std::locale(std::locale(""), output_facet));
     ss << m_time.utc_time();
     return ss.str();
 }
@@ -499,7 +501,8 @@ GncDateImpl::format(const char* format) const
     std::stringstream ss;
     //The stream destructor frees the facet, so it must be heap-allocated.
     auto output_facet(new Facet(normalize_format(format).c_str()));
-    ss.imbue(std::locale(std::locale(), output_facet));
+    // FIXME Rather than imbueing a locale below we probably should set std::locale::global appropriately somewhere.
+    ss.imbue(std::locale(std::locale(""), output_facet));
     ss << m_greg;
     return ss.str();
 }



Summary of changes:
 libgnucash/engine/gnc-datetime.cpp | 11 +++++++----
 po/de.po                           |  2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)



More information about the gnucash-changes mailing list