#
# patch "ChangeLog"
# from [83b36cb65870a1137d87053dbaacf5031bcefc04]
# to [b08ec941ec093b474499b565d0b2eb8c889bd847]
#
# patch "sanity.hh"
# from [b9d4b15314f8ce56faec5889cfdf90f6b6de2a05]
# to [4b60e04581e65bb1426c17f8807b37ec0e7775d8]
#
# patch "ui.cc"
# from [cc9ea70c7d0fc57ce2c5457550ac0366310aa61b]
# to [77a48bddc373a115f5ec6cc0077afa17a2a762d0]
#
# patch "ui.hh"
# from [daec74ed24338ff3ee7eda12f14e7deb7aeb6473]
# to [d5866bba3cc59b130fb56ba40e0780801d4314f9]
#
========================================================================
--- ChangeLog 83b36cb65870a1137d87053dbaacf5031bcefc04
+++ ChangeLog b08ec941ec093b474499b565d0b2eb8c889bd847
@@ -1,3 +1,8 @@
+2005-09-07 Benoît Dejean
+
+ * ui.{cc,hh}: Added user_inferface::user_locale.
+ * sanity.hh: Made F() and FP() locale aware.
+
2005-09-06 Benoît Dejean
* monotone.cc: One more i18n string.
========================================================================
--- sanity.hh b9d4b15314f8ce56faec5889cfdf90f6b6de2a05
+++ sanity.hh 4b60e04581e65bb1426c17f8807b37ec0e7775d8
@@ -17,6 +17,7 @@
#include // Required for ENABLE_NLS
#include "i18n.h"
+#include "ui.hh"
#include "quick_alloc.hh" // to get the QA() macro
@@ -91,10 +92,10 @@
extern sanity global_sanity;
// F is for when you want to build a boost formatter for display
-#define F(str) boost::format(gettext(str))
+#define F(str) boost::format(gettext(str), ui.user_locale)
// FP is for when you want to build a boost formatter for displaying a plural
-#define FP(str1, strn, count) boost::format(ngettext(str1, strn, count))
+#define FP(str1, strn, count) boost::format(ngettext(str1, strn, count), ui.user_locale)
// L is for logging, you can log all you want
#define L(fmt) global_sanity.log(fmt, __FILE__, __LINE__)
========================================================================
--- ui.cc cc9ea70c7d0fc57ce2c5457550ac0366310aa61b
+++ ui.cc 77a48bddc373a115f5ec6cc0077afa17a2a762d0
@@ -259,6 +259,7 @@
user_interface::user_interface() :
+ user_locale(""),
last_write_was_a_tick(false),
t_writer(0)
{
========================================================================
--- ui.hh daec74ed24338ff3ee7eda12f14e7deb7aeb6473
+++ ui.hh d5866bba3cc59b130fb56ba40e0780801d4314f9
@@ -85,6 +85,8 @@
void set_tick_writer(tick_writer * t_writer);
void ensure_clean_line();
+ const std::locale user_locale;
+
private:
std::set issued_warnings;