diff options
Diffstat (limited to 'Swift/Controllers/Translator.cpp')
-rw-r--r-- | Swift/Controllers/Translator.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Swift/Controllers/Translator.cpp b/Swift/Controllers/Translator.cpp index 13230ab..f03c533 100644 --- a/Swift/Controllers/Translator.cpp +++ b/Swift/Controllers/Translator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Isode Limited. + * Copyright (c) 2011-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -8,12 +8,18 @@ #include <cassert> +#include <Swiften/Base/DateTime.h> + namespace Swift { static struct DefaultTranslator : public Translator { - virtual std::string translate(const std::string& text, const std::string&) { - return text; - } + virtual std::string translate(const std::string& text, const std::string&) { + return text; + } + + virtual std::string ptimeToHumanReadableString(const boost::posix_time::ptime& time) { + return dateTimeToLocalString(time); + } } defaultTranslator; Translator* Translator::translator = &defaultTranslator; @@ -22,7 +28,7 @@ Translator::~Translator() { } void Translator::setInstance(Translator* t) { - translator = t; + translator = t; } } |