]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
Cleanup bruteFind.
[lyx.git] / src / Text.cpp
index f6c1d392e5ab171ee114289b3e4918d3db20d3b5..f51646e55e681146027bc52d3d15b71ce530f0ae 100644 (file)
 #include "support/lassert.h"
 #include "support/lstrings.h"
 #include "support/lyxalgo.h"
+#include "support/lyxtime.h"
 #include "support/textutils.h"
 
 #include <sstream>
 
 
-// TODO: replace if in Text::readParToken() with compile time switch
-#if 0
-
-#include "support/metahash.h"
-
-typedef boost::mpl::string<'\\end','_lay','out'> end_layout;
-typedef boost::mpl::string<'\\end','in','set'>   end_inset;
-
-void foo()
-{
-       std::string token = "\\end_layout";
-
-       switch (boost::hash_value(token)) {
-               case lyx::support::hash_string<end_layout>::value:
-                       return;
-               case lyx::support::hash_string<end_inset>::value:
-                       return;
-               default: ;
-       };
-
-}
-#endif
-
-
 using namespace std;
 using namespace lyx::support;
 
@@ -1900,13 +1877,11 @@ docstring Text::currentState(Cursor const & cur) const
        Change change = par.lookupChange(cur.pos());
 
        if (change.changed()) {
-               Author const & a = buf.params().authors().get(change.author);
-               os << _("Change: ") << a.name();
-               if (!a.email().empty())
-                       os << " (" << a.email() << ")";
-               // FIXME ctime is english, we should translate that
-               os << _(" at ") << ctime(&change.changetime);
-               os << " : ";
+               docstring const author =
+                       buf.params().authors().get(change.author).nameAndEmail();
+               docstring const date = formatted_datetime(change.changetime);
+               os << bformat(_("Changed by %1$s[[author]] on %2$s[[date]]. "),
+                             author, date);
        }
 
        // I think we should only show changes from the default