summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-19 08:48:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-19 21:29:44 (GMT)
commitb1836ffb49bd7740dbd7c32bfad04d077e81ecb5 (patch)
tree9d0d9b3fad9c2bbd0192696d59e08477b8c22c10
parent2f6c2299c28c9bb03ee1437058a4c7071ff2ac3f (diff)
downloadswift-contrib-b1836ffb49bd7740dbd7c32bfad04d077e81ecb5.zip
swift-contrib-b1836ffb49bd7740dbd7c32bfad04d077e81ecb5.tar.bz2
Make Swift translatable.
-rw-r--r--3rdParty/Boost/src/boost/format.hpp59
-rw-r--r--3rdParty/Boost/src/boost/format/alt_sstream.hpp176
-rw-r--r--3rdParty/Boost/src/boost/format/alt_sstream_impl.hpp313
-rw-r--r--3rdParty/Boost/src/boost/format/detail/compat_workarounds.hpp86
-rw-r--r--3rdParty/Boost/src/boost/format/detail/config_macros.hpp97
-rw-r--r--3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp56
-rw-r--r--3rdParty/Boost/src/boost/format/detail/unset_macros.hpp34
-rw-r--r--3rdParty/Boost/src/boost/format/detail/workarounds_gcc-2_95.hpp162
-rw-r--r--3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp42
-rw-r--r--3rdParty/Boost/src/boost/format/exceptions.hpp103
-rw-r--r--3rdParty/Boost/src/boost/format/feed_args.hpp277
-rw-r--r--3rdParty/Boost/src/boost/format/format_class.hpp168
-rw-r--r--3rdParty/Boost/src/boost/format/format_fwd.hpp49
-rw-r--r--3rdParty/Boost/src/boost/format/format_implementation.hpp329
-rw-r--r--3rdParty/Boost/src/boost/format/free_funcs.hpp70
-rw-r--r--3rdParty/Boost/src/boost/format/group.hpp684
-rw-r--r--3rdParty/Boost/src/boost/format/internals.hpp201
-rw-r--r--3rdParty/Boost/src/boost/format/internals_fwd.hpp60
-rw-r--r--3rdParty/Boost/src/boost/format/parsing.hpp504
-rwxr-xr-x3rdParty/Boost/update.sh1
-rw-r--r--BuildTools/SCons/SConstruct2
-rw-r--r--BuildTools/SCons/Tools/AppBundle.py6
-rw-r--r--BuildTools/SCons/Tools/qt4.py4
-rw-r--r--Slimber/Cocoa/SConscript4
-rw-r--r--Slimber/Qt/SConscript2
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp27
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp50
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp123
-rw-r--r--Swift/Controllers/Chat/MUCSearchController.h1
-rw-r--r--Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp16
-rw-r--r--Swift/Controllers/Intl.h12
-rw-r--r--Swift/Controllers/MainController.cpp69
-rw-r--r--Swift/Controllers/PresenceNotifier.cpp3
-rw-r--r--Swift/Controllers/Roster/RosterController.cpp10
-rw-r--r--Swift/Controllers/SConscript2
-rw-r--r--Swift/Controllers/StatusUtil.cpp25
-rw-r--r--Swift/Controllers/StatusUtil.h16
-rw-r--r--Swift/Controllers/Translator.cpp28
-rw-r--r--Swift/Controllers/Translator.h27
-rw-r--r--Swift/QtUI/ChatList/ChatListModel.cpp2
-rw-r--r--Swift/QtUI/ChatList/QtChatListWindow.cpp8
-rw-r--r--Swift/QtUI/EventViewer/QtEvent.cpp10
-rw-r--r--Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp2
-rw-r--r--Swift/QtUI/MUCSearch/QtMUCSearchWindow.cpp6
-rw-r--r--Swift/QtUI/QtAboutWidget.cpp8
-rw-r--r--Swift/QtUI/QtAvatarWidget.cpp6
-rw-r--r--Swift/QtUI/QtBookmarkDetailWindow.cpp2
-rw-r--r--Swift/QtUI/QtChatView.cpp6
-rw-r--r--Swift/QtUI/QtChatWindow.cpp6
-rw-r--r--Swift/QtUI/QtContactEditWidget.cpp6
-rw-r--r--Swift/QtUI/QtContactEditWindow.cpp12
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp32
-rw-r--r--Swift/QtUI/QtMainWindow.cpp20
-rw-r--r--Swift/QtUI/QtNameWidget.cpp6
-rw-r--r--Swift/QtUI/QtProfileWindow.cpp6
-rw-r--r--Swift/QtUI/QtStatusWidget.cpp15
-rw-r--r--Swift/QtUI/QtStatusWidget.h1
-rw-r--r--Swift/QtUI/QtSubscriptionRequestWindow.cpp12
-rw-r--r--Swift/QtUI/QtSwift.cpp3
-rw-r--r--Swift/QtUI/QtTranslator.h21
-rw-r--r--Swift/QtUI/QtWebView.cpp4
-rw-r--r--Swift/QtUI/QtXMLConsoleWidget.cpp12
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.cpp6
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.h6
-rw-r--r--Swift/QtUI/Roster/QtTreeWidgetItem.h11
-rw-r--r--Swift/QtUI/Roster/RosterModel.cpp3
-rw-r--r--Swift/QtUI/SConscript33
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp17
-rw-r--r--Swift/QtUI/main.cpp35
-rw-r--r--Swift/QtUI/tmp/QtContextMenu.cpp14
-rw-r--r--Swift/QtUI/tmp/QtContextMenu.h17
-rw-r--r--Swift/QtUI/tmp/QtRosterContextMenu.cpp108
-rw-r--r--Swift/QtUI/tmp/QtRosterContextMenu.h32
-rw-r--r--Swift/Translations/Swift.ts1387
-rw-r--r--Swift/Translations/Swift_nl.ts1387
-rw-r--r--Swift/resources/.gitignore1
-rw-r--r--Swiften/Base/format.h18
-rw-r--r--Swiften/Elements/StatusShow.h12
78 files changed, 6759 insertions, 432 deletions
diff --git a/3rdParty/Boost/src/boost/format.hpp b/3rdParty/Boost/src/boost/format.hpp
new file mode 100644
index 0000000..73464a8
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format.hpp
@@ -0,0 +1,59 @@
+// ----------------------------------------------------------------------------
+// format.hpp : primary header
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_HPP
+#define BOOST_FORMAT_HPP
+
+#include <vector>
+#include <string>
+#include <boost/detail/workaround.hpp>
+#include <boost/config.hpp>
+
+#ifndef BOOST_NO_STD_LOCALE
+#include <locale>
+#endif
+
+// *** Compatibility framework
+#include <boost/format/detail/compat_workarounds.hpp>
+
+#ifdef BOOST_NO_LOCALE_ISIDIGIT
+#include <cctype> // we'll use the non-locale <cctype>'s std::isdigit(int)
+#endif
+
+// **** Forward declarations ----------------------------------
+#include <boost/format/format_fwd.hpp> // basic_format<Ch,Tr>, and other frontends
+#include <boost/format/internals_fwd.hpp> // misc forward declarations for internal use
+
+// **** Auxiliary structs (stream_format_state<Ch,Tr> , and format_item<Ch,Tr> )
+#include <boost/format/internals.hpp>
+
+// **** Format class interface --------------------------------
+#include <boost/format/format_class.hpp>
+
+// **** Exceptions -----------------------------------------------
+#include <boost/format/exceptions.hpp>
+
+// **** Implementation -------------------------------------------
+#include <boost/format/format_implementation.hpp> // member functions
+#include <boost/format/group.hpp> // class for grouping arguments
+#include <boost/format/feed_args.hpp> // argument-feeding functions
+#include <boost/format/parsing.hpp> // format-string parsing (member-)functions
+
+// **** Implementation of the free functions ----------------------
+#include <boost/format/free_funcs.hpp>
+
+
+// *** Undefine 'local' macros :
+#include <boost/format/detail/unset_macros.hpp>
+
+#endif // BOOST_FORMAT_HPP
diff --git a/3rdParty/Boost/src/boost/format/alt_sstream.hpp b/3rdParty/Boost/src/boost/format/alt_sstream.hpp
new file mode 100644
index 0000000..e236be3
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/alt_sstream.hpp
@@ -0,0 +1,176 @@
+// ----------------------------------------------------------------------------
+// alt_sstream.hpp : alternative stringstream
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+
+
+#ifndef BOOST_SK_ALT_SSTREAM_HPP
+#define BOOST_SK_ALT_SSTREAM_HPP
+
+#include <string>
+#include <boost/format/detail/compat_workarounds.hpp>
+#include <boost/utility/base_from_member.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/assert.hpp>
+
+namespace boost {
+ namespace io {
+
+ template<class Ch, class Tr=::std::char_traits<Ch>,
+ class Alloc=::std::allocator<Ch> >
+ class basic_altstringbuf;
+
+ template<class Ch, class Tr =::std::char_traits<Ch>,
+ class Alloc=::std::allocator<Ch> >
+ class basic_oaltstringstream;
+
+
+ template<class Ch, class Tr, class Alloc>
+ class basic_altstringbuf
+ : public ::std::basic_streambuf<Ch, Tr>
+ {
+ typedef ::std::basic_streambuf<Ch, Tr> streambuf_t;
+ typedef typename CompatAlloc<Alloc>::compatible_type compat_allocator_type;
+ typedef typename CompatTraits<Tr>::compatible_type compat_traits_type;
+ public:
+ typedef Ch char_type;
+ typedef Tr traits_type;
+ typedef typename compat_traits_type::int_type int_type;
+ typedef typename compat_traits_type::pos_type pos_type;
+ typedef typename compat_traits_type::off_type off_type;
+ typedef Alloc allocator_type;
+ typedef ::std::basic_string<Ch, Tr, Alloc> string_type;
+ typedef typename string_type::size_type size_type;
+
+ typedef ::std::streamsize streamsize;
+
+
+ explicit basic_altstringbuf(std::ios_base::openmode mode
+ = std::ios_base::in | std::ios_base::out)
+ : putend_(NULL), is_allocated_(false), mode_(mode)
+ {}
+ explicit basic_altstringbuf(const string_type& s,
+ ::std::ios_base::openmode mode
+ = ::std::ios_base::in | ::std::ios_base::out)
+ : putend_(NULL), is_allocated_(false), mode_(mode)
+ { dealloc(); str(s); }
+ virtual ~basic_altstringbuf()
+ { dealloc(); }
+ using streambuf_t::pbase;
+ using streambuf_t::pptr;
+ using streambuf_t::epptr;
+ using streambuf_t::eback;
+ using streambuf_t::gptr;
+ using streambuf_t::egptr;
+
+ void clear_buffer();
+ void str(const string_type& s);
+
+ // 0-copy access :
+ Ch * begin() const;
+ size_type size() const;
+ size_type cur_size() const; // stop at current pointer
+ Ch * pend() const // the highest position reached by pptr() since creation
+ { return ((putend_ < pptr()) ? pptr() : putend_); }
+ size_type pcount() const
+ { return static_cast<size_type>( pptr() - pbase()) ;}
+
+ // copy buffer to string :
+ string_type str() const
+ { return string_type(begin(), size()); }
+ string_type cur_str() const
+ { return string_type(begin(), cur_size()); }
+ protected:
+ explicit basic_altstringbuf (basic_altstringbuf * s,
+ ::std::ios_base::openmode mode
+ = ::std::ios_base::in | ::std::ios_base::out)
+ : putend_(NULL), is_allocated_(false), mode_(mode)
+ { dealloc(); str(s); }
+
+ virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way,
+ ::std::ios_base::openmode which
+ = ::std::ios_base::in | ::std::ios_base::out);
+ virtual pos_type seekpos (pos_type pos,
+ ::std::ios_base::openmode which
+ = ::std::ios_base::in | ::std::ios_base::out);
+ virtual int_type underflow();
+ virtual int_type pbackfail(int_type meta = compat_traits_type::eof());
+ virtual int_type overflow(int_type meta = compat_traits_type::eof());
+ void dealloc();
+ private:
+ enum { alloc_min = 256}; // minimum size of allocations
+
+ Ch *putend_; // remembers (over seeks) the highest value of pptr()
+ bool is_allocated_;
+ ::std::ios_base::openmode mode_;
+ compat_allocator_type alloc_; // the allocator object
+ };
+
+
+// --- class basic_oaltstringstream ----------------------------------------
+ template <class Ch, class Tr, class Alloc>
+ class basic_oaltstringstream
+ : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >,
+ public ::std::basic_ostream<Ch, Tr>
+ {
+ class No_Op {
+ // used as no-op deleter for (not-owner) shared_pointers
+ public:
+ template<class T>
+ const T & operator()(const T & arg) { return arg; }
+ };
+ typedef ::std::basic_ostream<Ch, Tr> stream_t;
+ typedef boost::base_from_member<boost::shared_ptr<
+ basic_altstringbuf<Ch,Tr, Alloc> > >
+ pbase_type;
+ typedef ::std::basic_string<Ch, Tr, Alloc> string_type;
+ typedef typename string_type::size_type size_type;
+ typedef basic_altstringbuf<Ch, Tr, Alloc> stringbuf_t;
+ public:
+ typedef Alloc allocator_type;
+ basic_oaltstringstream()
+ : pbase_type(new stringbuf_t), stream_t(rdbuf())
+ { }
+ basic_oaltstringstream(::boost::shared_ptr<stringbuf_t> buf)
+ : pbase_type(buf), stream_t(rdbuf())
+ { }
+ basic_oaltstringstream(stringbuf_t * buf)
+ : pbase_type(buf, No_Op() ), stream_t(rdbuf())
+ { }
+ stringbuf_t * rdbuf() const
+ { return pbase_type::member.get(); }
+ void clear_buffer()
+ { rdbuf()->clear_buffer(); }
+
+ // 0-copy access :
+ Ch * begin() const
+ { return rdbuf()->begin(); }
+ size_type size() const
+ { return rdbuf()->size(); }
+ size_type cur_size() const // stops at current position
+ { return rdbuf()->cur_size(); }
+
+ // copy buffer to string :
+ string_type str() const // [pbase, epptr[
+ { return rdbuf()->str(); }
+ string_type cur_str() const // [pbase, pptr[
+ { return rdbuf()->cur_str(); }
+ void str(const string_type& s)
+ { rdbuf()->str(s); }
+ };
+
+ } // N.S. io
+} // N.S. boost
+
+#include <boost/format/alt_sstream_impl.hpp>
+
+#endif // include guard
+
diff --git a/3rdParty/Boost/src/boost/format/alt_sstream_impl.hpp b/3rdParty/Boost/src/boost/format/alt_sstream_impl.hpp
new file mode 100644
index 0000000..9975e4f
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/alt_sstream_impl.hpp
@@ -0,0 +1,313 @@
+// ----------------------------------------------------------------------------
+// alt_sstream_impl.hpp : alternative stringstream, templates implementation
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_SK_ALT_SSTREAM_IMPL_HPP
+#define BOOST_SK_ALT_SSTREAM_IMPL_HPP
+
+namespace boost {
+ namespace io {
+// --- Implementation ------------------------------------------------------//
+
+ template<class Ch, class Tr, class Alloc>
+ void basic_altstringbuf<Ch, Tr, Alloc>::
+ clear_buffer () {
+ const Ch * p = pptr();
+ const Ch * b = pbase();
+ if(p != NULL && p != b) {
+ seekpos(0, ::std::ios_base::out);
+ }
+ p = gptr();
+ b = eback();
+ if(p != NULL && p != b) {
+ seekpos(0, ::std::ios_base::in);
+ }
+ }
+
+ template<class Ch, class Tr, class Alloc>
+ void basic_altstringbuf<Ch, Tr, Alloc>::
+ str (const string_type& s) {
+ size_type sz=s.size();
+ if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) {
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+ void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+ Ch *new_ptr = static_cast<Ch *>(vd_ptr);
+#else
+ Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+#endif
+ // if this didnt throw, we're safe, update the buffer
+ dealloc();
+ sz = s.copy(new_ptr, sz);
+ putend_ = new_ptr + sz;
+ if(mode_ & ::std::ios_base::in)
+ streambuf_t::setg(new_ptr, new_ptr, new_ptr + sz);
+ if(mode_ & ::std::ios_base::out) {
+ streambuf_t::setp(new_ptr, new_ptr + sz);
+ if(mode_ & (::std::ios_base::app | ::std::ios_base::ate))
+ streambuf_t::pbump(static_cast<int>(sz));
+ if(gptr() == NULL)
+ streambuf_t::setg(new_ptr, NULL, new_ptr);
+ }
+ is_allocated_ = true;
+ }
+ else
+ dealloc();
+ }
+ template<class Ch, class Tr, class Alloc>
+ Ch* basic_altstringbuf<Ch, Tr, Alloc>::
+ begin () const {
+ if(mode_ & ::std::ios_base::out && pptr() != NULL)
+ return pbase();
+ else if(mode_ & ::std::ios_base::in && gptr() != NULL)
+ return eback();
+ return NULL;
+ }
+
+ template<class Ch, class Tr, class Alloc>
+ typename std::basic_string<Ch,Tr,Alloc>::size_type
+ basic_altstringbuf<Ch, Tr, Alloc>::
+ size () const {
+ if(mode_ & ::std::ios_base::out && pptr())
+ return static_cast<size_type>(pend() - pbase());
+ else if(mode_ & ::std::ios_base::in && gptr())
+ return static_cast<size_type>(egptr() - eback());
+ else
+ return 0;
+ }
+
+ template<class Ch, class Tr, class Alloc>
+ typename std::basic_string<Ch,Tr,Alloc>::size_type
+ basic_altstringbuf<Ch, Tr, Alloc>::
+ cur_size () const {
+ if(mode_ & ::std::ios_base::out && pptr())
+ return static_cast<streamsize>( pptr() - pbase());
+ else if(mode_ & ::std::ios_base::in && gptr())
+ return static_cast<streamsize>( gptr() - eback());
+ else
+ return 0;
+ }
+
+ template<class Ch, class Tr, class Alloc>
+ typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type
+ basic_altstringbuf<Ch, Tr, Alloc>::
+ seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) {
+ if(pptr() != NULL && putend_ < pptr())
+ putend_ = pptr();
+ if(which & ::std::ios_base::in && gptr() != NULL) {
+ // get area
+ if(way == ::std::ios_base::end)
+ off += static_cast<off_type>(putend_ - gptr());
+ else if(way == ::std::ios_base::beg)
+ off += static_cast<off_type>(eback() - gptr());
+ else if(way != ::std::ios_base::cur || (which & ::std::ios_base::out) )
+ // (altering in&out is only supported if way is beg or end, not cur)
+ return pos_type(off_type(-1));
+ if(eback() <= off+gptr() && off+gptr() <= putend_ ) {
+ // set gptr
+ streambuf_t::gbump(static_cast<int>(off));
+ if(which & ::std::ios_base::out && pptr() != NULL)
+ // update pptr to match gptr
+ streambuf_t::pbump(static_cast<int>(gptr()-pptr()));
+ }
+ else
+ off = off_type(-1);
+ }
+ else if(which & ::std::ios_base::out && pptr() != NULL) {
+ // put area
+ if(way == ::std::ios_base::end)
+ off += static_cast<off_type>(putend_ - pptr());
+ else if(way == ::std::ios_base::beg)
+ off += static_cast<off_type>(pbase() - pptr());
+ else if(way != ::std::ios_base::beg)
+ return pos_type(off_type(-1));
+ if(pbase() <= off+pptr() && off+pptr() <= putend_)
+ // set pptr
+ streambuf_t::pbump(static_cast<int>(off));
+ else
+ off = off_type(-1);
+ }
+ else // neither in nor out
+ off = off_type(-1);
+ return (pos_type(off));
+ }
+ //- end seekoff(..)
+
+
+ template<class Ch, class Tr, class Alloc>
+ typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type
+ basic_altstringbuf<Ch, Tr, Alloc>::
+ seekpos (pos_type pos, ::std::ios_base::openmode which) {
+ off_type off = off_type(pos); // operation guaranteed by 27.4.3.2 table 88
+ if(pptr() != NULL && putend_ < pptr())
+ putend_ = pptr();
+ if(off != off_type(-1)) {
+ if(which & ::std::ios_base::in && gptr() != NULL) {
+ // get area
+ if(0 <= off && off <= putend_ - eback()) {
+ streambuf_t::gbump(static_cast<int>(eback() - gptr() + off));
+ if(which & ::std::ios_base::out && pptr() != NULL) {
+ // update pptr to match gptr
+ streambuf_t::pbump(static_cast<int>(gptr()-pptr()));
+ }
+ }
+ else
+ off = off_type(-1);
+ }
+ else if(which & ::std::ios_base::out && pptr() != NULL) {
+ // put area
+ if(0 <= off && off <= putend_ - eback())
+ streambuf_t::pbump(static_cast<int>(eback() - pptr() + off));
+ else
+ off = off_type(-1);
+ }
+ else // neither in nor out
+ off = off_type(-1);
+ return (pos_type(off));
+ }
+ else {
+ BOOST_ASSERT(0); // §27.4.3.2 allows undefined-behaviour here
+ return pos_type(off_type(-1));
+ }
+ }
+ // -end seekpos(..)
+
+
+ template<class Ch, class Tr, class Alloc>
+ typename basic_altstringbuf<Ch, Tr, Alloc>::int_type
+ basic_altstringbuf<Ch, Tr, Alloc>::
+ underflow () {
+ if(gptr() == NULL) // no get area -> nothing to get.
+ return (compat_traits_type::eof());
+ else if(gptr() < egptr()) // ok, in buffer
+ return (compat_traits_type::to_int_type(*gptr()));
+ else if(mode_ & ::std::ios_base::in && pptr() != NULL
+ && (gptr() < pptr() || gptr() < putend_) )
+ { // expand get area
+ if(putend_ < pptr())
+ putend_ = pptr(); // remember pptr reached this far
+ streambuf_t::setg(eback(), gptr(), putend_);
+ return (compat_traits_type::to_int_type(*gptr()));
+ }
+ else // couldnt get anything. EOF.
+ return (compat_traits_type::eof());
+ }
+ // -end underflow(..)
+
+
+ template<class Ch, class Tr, class Alloc>
+ typename basic_altstringbuf<Ch, Tr, Alloc>::int_type
+ basic_altstringbuf<Ch, Tr, Alloc>::
+ pbackfail (int_type meta) {
+ if(gptr() != NULL && (eback() < gptr())
+ && (mode_ & (::std::ios_base::out)
+ || compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)
+ || compat_traits_type::eq(compat_traits_type::to_char_type(meta), gptr()[-1]) ) ) {
+ streambuf_t::gbump(-1); // back one character
+ if(!compat_traits_type::eq_int_type(compat_traits_type::eof(), meta))
+ // put-back meta into get area
+ *gptr() = compat_traits_type::to_char_type(meta);
+ return (compat_traits_type::not_eof(meta));
+ }
+ else
+ return (compat_traits_type::eof()); // failed putback
+ }
+ // -end pbackfail(..)
+
+
+ template<class Ch, class Tr, class Alloc>
+ typename basic_altstringbuf<Ch, Tr, Alloc>::int_type
+ basic_altstringbuf<Ch, Tr, Alloc>::
+ overflow (int_type meta) {
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4996)
+#endif
+ if(compat_traits_type::eq_int_type(compat_traits_type::eof(), meta))
+ return compat_traits_type::not_eof(meta); // nothing to do
+ else if(pptr() != NULL && pptr() < epptr()) {
+ streambuf_t::sputc(compat_traits_type::to_char_type(meta));
+ return meta;
+ }
+ else if(! (mode_ & ::std::ios_base::out))
+ // no write position, and cant make one
+ return compat_traits_type::eof();
+ else { // make a write position available
+ std::size_t prev_size = pptr() == NULL ? 0 : epptr() - eback();
+ std::size_t new_size = prev_size;
+ // exponential growth : size *= 1.5
+ std::size_t add_size = new_size / 2;
+ if(add_size < alloc_min)
+ add_size = alloc_min;
+ Ch * newptr = NULL, *oldptr = eback();
+
+ // make sure adding add_size wont overflow size_t
+ while (0 < add_size && ((std::numeric_limits<std::size_t>::max)()
+ - add_size < new_size) )
+ add_size /= 2;
+ if(0 < add_size) {
+ new_size += add_size;
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+ void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+ newptr = static_cast<Ch *>(vdptr);
+#else
+ newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+#endif
+ }
+
+ if(0 < prev_size)
+ compat_traits_type::copy(newptr, oldptr, prev_size);
+ if(is_allocated_)
+ alloc_.deallocate(oldptr, prev_size);
+ is_allocated_=true;
+
+ if(prev_size == 0) { // first allocation
+ putend_ = newptr;
+ streambuf_t::setp(newptr, newptr + new_size);
+ if(mode_ & ::std::ios_base::in)
+ streambuf_t::setg(newptr, newptr, newptr + 1);
+ else
+ streambuf_t::setg(newptr, 0, newptr);
+ }
+ else { // update pointers
+ putend_ = putend_ - oldptr + newptr;
+ int pptr_count = static_cast<int>(pptr()-pbase());
+ int gptr_count = static_cast<int>(gptr()-eback());
+ streambuf_t::setp(pbase() - oldptr + newptr, newptr + new_size);
+ streambuf_t::pbump(pptr_count);
+ if(mode_ & ::std::ios_base::in)
+ streambuf_t::setg(newptr, newptr + gptr_count, pptr() + 1);
+ else
+ streambuf_t::setg(newptr, 0, newptr);
+ }
+ streambuf_t::sputc(compat_traits_type::to_char_type(meta));
+ return meta;
+ }
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+ }
+ // -end overflow(..)
+
+ template<class Ch, class Tr, class Alloc>
+ void basic_altstringbuf<Ch, Tr, Alloc>:: dealloc() {
+ if(is_allocated_)
+ alloc_.deallocate(eback(), (pptr() != NULL ? epptr() : egptr()) - eback());
+ is_allocated_ = false;
+ streambuf_t::setg(0, 0, 0);
+ streambuf_t::setp(0, 0);
+ putend_ = NULL;
+ }
+
+ }// N.S. io
+} // N.S. boost
+
+#endif // include guard
+
diff --git a/3rdParty/Boost/src/boost/format/detail/compat_workarounds.hpp b/3rdParty/Boost/src/boost/format/detail/compat_workarounds.hpp
new file mode 100644
index 0000000..8e51514
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/detail/compat_workarounds.hpp
@@ -0,0 +1,86 @@
+// ----------------------------------------------------------------------------
+// compat_workarounds : general framework for non-conformance workarounds
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// see http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+
+// this file defines wrapper classes to hide non-conforming
+// std::char_traits<> and std::allocator<> traits
+// and Includes : config_macros.hpp (defines config macros
+// and compiler-specific switches)
+
+// Non-conformant Std-libs fail to supply conformant traits (std::char_traits,
+// std::allocator) and/or the std::string doesnt support them.
+// We don't want to have hundreds of #ifdef workarounds, so we define
+// replacement traits.
+// But both char_traits and allocator traits are visible in the interface,
+// (inside the final string type), thus we need to keep both
+// the replacement type (typedefed to 'compatible_type') for real use,
+// and the original stdlib type (typedef to 'type_for_string') for interface
+// visibility. This is what Compat* classes do (as well as be transparent
+// when good allocator and char traits are present)
+
+#ifndef BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP
+#define BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP
+
+namespace boost {
+ namespace io {
+
+ // gcc-2.95 char traits (non-conformantly named string_char_traits)
+ // lack several functions so we extend them in a replacement class.
+ template<class Tr>
+ class CompatTraits;
+
+ // std::allocator<Ch> in gcc-2.95 is ok, but basic_string only works
+ // with plain 'std::alloc' still, alt_stringbuf requires a functionnal
+ // alloc template argument, so we need a replacement allocator
+ template<class Alloc>
+ class CompatAlloc;
+ } // N.S. io
+}// N.S. boost
+
+
+#include <boost/format/detail/config_macros.hpp>
+ // sets-up macros and load compiler-specific workarounds headers.
+
+#if !defined(BOOST_FORMAT_STREAMBUF_DEFINED)
+// workarounds-gcc-2.95 might have defined own streambuf
+#include <streambuf>
+#endif
+
+#if !defined(BOOST_FORMAT_OSTREAM_DEFINED)
+// workarounds-gcc-2.95 might already have included <iostream>
+#include <ostream>
+#endif
+
+
+
+namespace boost {
+ namespace io {
+
+ // **** CompatTraits general definitions : ----------------------------
+ template<class Tr>
+ class CompatTraits
+ { // general case : be transparent
+ public:
+ typedef Tr compatible_type;
+ };
+
+ // **** CompatAlloc general definitions : -----------------------------
+ template<class Alloc>
+ class CompatAlloc
+ { // general case : be transparent
+ public:
+ typedef Alloc compatible_type;
+ };
+
+ } //N.S. io
+} // N.S. boost
+#endif // include guard
diff --git a/3rdParty/Boost/src/boost/format/detail/config_macros.hpp b/3rdParty/Boost/src/boost/format/detail/config_macros.hpp
new file mode 100644
index 0000000..1f01b17
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/detail/config_macros.hpp
@@ -0,0 +1,97 @@
+// -*- C++ -*-
+// ----------------------------------------------------------------------------
+// config_macros.hpp : configuration macros for the format library
+// only BOOST_IO_STD is absolutely needed (it should be 'std::' in general)
+// others are compiler-specific workaround macros used in #ifdef switches
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// see http://www.boost.org/libs/format for library home page
+
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_CONFIG_MACROS_HPP
+#define BOOST_FORMAT_CONFIG_MACROS_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+// make sure our local macros wont override something :
+#if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \
+ || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION ) \
+ || defined(BOOST_NO_TEMPLATE_STD_STREAM) \
+ || defined(BOOST_FORMAT_STREAMBUF_DEFINED) || defined(BOOST_FORMAT_OSTREAM_DEFINED)
+#error "boost::format uses a local macro that is already defined."
+#endif
+
+// specific workarounds. each header can define BOOS_IO_STD if it
+// needs. (e.g. because of IO_NEEDS_USING_DECLARATION)
+#include <boost/format/detail/workarounds_gcc-2_95.hpp>
+#include <boost/format/detail/workarounds_stlport.hpp>
+
+#ifndef BOOST_IO_STD
+# define BOOST_IO_STD ::std::
+#endif
+
+#if defined(BOOST_NO_STD_LOCALE) || \
+ ( BOOST_WORKAROUND(__BORLANDC__, <= 0x564) \
+ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) )
+// some future __BORLANDC__ >0x564 versions might not need this
+// 0x570 is Borland's kylix branch
+#define BOOST_NO_LOCALE_ISDIGIT
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
+#define BOOST_NO_OVERLOAD_FOR_NON_CONST
+#endif
+
+// gcc-2.95's native stringstream is not usable
+#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+#define BOOST_FORMAT_IGNORE_STRINGSTREAM
+#endif
+
+
+// **** Workaround for io streams, stlport and msvc.
+#ifdef BOOST_IO_NEEDS_USING_DECLARATION
+namespace boost {
+ using std::char_traits;
+ using std::basic_ostream;
+ namespace io {
+ using std::basic_ostream;
+ namespace detail {
+ using std::basic_ios;
+ using std::basic_ostream;
+ }
+ }
+#if ! defined(BOOST_NO_STD_LOCALE)
+ using std::locale;
+ namespace io {
+ using std::locale;
+ namespace detail {
+ using std::locale;
+ }
+ }
+#endif // locale
+}
+ // -end N.S. boost
+#endif // needs_using_declaration
+
+
+// *** hide std::locale if it doesnt exist.
+// this typedef is either std::locale or int, avoids placing ifdefs everywhere
+namespace boost { namespace io { namespace detail {
+#if ! defined(BOOST_NO_STD_LOCALE)
+ typedef BOOST_IO_STD locale locale_t;
+#else
+ typedef int locale_t;
+#endif
+} } }
+
+
+// ----------------------------------------------------------------------------
+
+#endif // BOOST_FORMAT_MACROS_DEFAULT_HPP
diff --git a/3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp b/3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp
new file mode 100644
index 0000000..f12e5e9
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp
@@ -0,0 +1,56 @@
+// ----------------------------------------------------------------------------
+// msvc_disambiguater.hpp : msvc workarounds. (for put_{head|last} overloads)
+// the trick was described in boost's list by Aleksey Gurtovoy
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// see http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_MSVC_DISAMBIGUATER_HPP
+#define BOOST_MSVC_DISAMBIGUATER_HPP
+
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \
+ BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
+ // this whole header is specifically for msvc up to 7.0
+
+#include <boost/format/group.hpp>
+#include <ostream>
+
+namespace boost {
+namespace io {
+namespace detail {
+
+template< class Ch, class Tr, class T >
+struct disambiguater
+{
+ template< typename U >
+ static void put_head(BOOST_IO_STD basic_ostream<Ch, Tr>& os, group1<U> const& x, long)
+ {
+ os << group_head(x.a1_);
+ }
+ static void put_head(BOOST_IO_STD basic_ostream<Ch, Tr>& os, T const& x, int)
+ {
+ }
+ template< typename U >
+ static void put_last(BOOST_IO_STD basic_ostream<Ch, Tr>& os, group1<U> const& x, long)
+ {
+ os << group_last(x.a1_);
+ }
+ static void put_last(BOOST_IO_STD basic_ostream<Ch, Tr>& os, T const& x, int)
+ {
+ os << x;
+ }
+};
+
+} // namespace detail
+} // namespace io
+} // namespace boost
+
+#endif // -BOOST_MSVC
+
+#endif // -BOOST_MSVC_DISAMBIGUATER_HPP
diff --git a/3rdParty/Boost/src/boost/format/detail/unset_macros.hpp b/3rdParty/Boost/src/boost/format/detail/unset_macros.hpp
new file mode 100644
index 0000000..b3ac47b
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/detail/unset_macros.hpp
@@ -0,0 +1,34 @@
+// ----------------------------------------------------------------------------
+// unset_macros.hpp
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+// *** Undefine 'local' macros :
+#ifdef BOOST_NO_OVERLOAD_FOR_NON_CONST
+#undef BOOST_NO_OVERLOAD_FOR_NON_CONST
+#endif
+#ifdef BOOST_NO_LOCALE_ISDIGIT
+#undef BOOST_NO_LOCALE_ISDIGIT
+#endif
+#ifdef BOOST_IO_STD
+#undef BOOST_IO_STD
+#endif
+#ifdef BOOST_IO_NEEDS_USING_DECLARATION
+#undef BOOST_IO_NEEDS_USING_DECLARATION
+#endif
+#ifdef BOOST_NO_TEMPLATE_STD_STREAM
+#undef BOOST_NO_TEMPLATE_STD_STREAM
+#endif
+#ifdef BOOST_FORMAT_STREAMBUF_DEFINED
+#undef BOOST_FORMAT_STREAMBUF_DEFINED
+#endif
+#ifdef BOOST_FORMAT_OSTREAM_DEFINED
+#undef BOOST_FORMAT_OSTREAM_DEFINED
+#endif
diff --git a/3rdParty/Boost/src/boost/format/detail/workarounds_gcc-2_95.hpp b/3rdParty/Boost/src/boost/format/detail/workarounds_gcc-2_95.hpp
new file mode 100644
index 0000000..8c49d42
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/detail/workarounds_gcc-2_95.hpp
@@ -0,0 +1,162 @@
+// ----------------------------------------------------------------------------
+// workarounds for gcc < 3.0.
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+
+// ----------------------------------------------------------------------------
+
+// There's a lot to do, the stdlib shipped with gcc prior to 3.x
+// was terribly non-conforming.
+// . defines macros switches
+// . supplies template classes basic_foo<char,Tr> where gcc only supplies foo.
+// i.e :
+// - basic_ios<char, Tr> from ios
+// - basic_ostream<char, Tr> from ostream
+// - basic_srteambuf<char, Tr> from streambuf
+// these can be used transparently. (it obviously does not work for wchar_t)
+// . specialise CompatAlloc and CompatTraits to wrap gcc-2.95's
+// string_char_traits and std::alloc
+
+#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ // only for gcc-2.95's native stdlib
+
+#ifndef BOOST_FORMAT_WORKAROUNDS_GCC295_H
+#define BOOST_FORMAT_WORKAROUNDS_GCC295_H
+
+// SGI STL doesnt have <ostream> and others, so we need iostream.
+#include <iostream>
+#define BOOST_FORMAT_OSTREAM_DEFINED
+
+#include <streambuf.h>
+#define BOOST_FORMAT_STREAMBUF_DEFINED
+
+#define BOOST_NO_TEMPLATE_STD_STREAM
+
+#ifndef BOOST_IO_STD
+# define BOOST_IO_STD std::
+#endif
+
+
+
+// ***
+// gcc's simple classes turned into standard-like template classes :
+
+namespace std {
+
+
+ // gcc has string_char_traits, it's incomplete.
+ // we declare a std::char_traits, and specialize CompatTraits<..> on it
+ // to do what is required
+ template<class Ch>
+ class char_traits; // no definition here, we will just use it as a tag.
+
+ template <class Ch, class Tr>
+ class basic_streambuf;
+
+ template <class Tr>
+ class basic_streambuf<char, Tr> : public streambuf {
+ };
+
+ template <class Ch, class Tr=::std::char_traits<Ch> >
+ class basic_ios;
+
+ template <class Tr>
+ class basic_ios<char, Tr> : public ostream {
+ public:
+ basic_ios(streambuf * p) : ostream(p) {};
+ char fill() const { return ios::fill(); } // gcc returns wchar..
+ char fill(char c) { return ios::fill(c); } // gcc takes wchar..
+ char widen(char c) { return c; }
+ char narrow(char c, char def) { return c; }
+ basic_ios& copyfmt(const ios& right) {
+ fill(right.fill());
+ flags(right.flags() );
+ exceptions(right.exceptions());
+ width(right.width());
+ precision(right.precision());
+ return *this;
+ }
+ };
+
+
+ typedef ios ios_base;
+
+ template <class Ch, class Tr>
+ class basic_ostream;
+
+ template <class Tr>
+ class basic_ostream<char, Tr> : public basic_ios<char, Tr>
+ {
+ public:
+ basic_ostream(streambuf * p) : basic_ios<char,Tr> (p) {}
+ };
+
+} // namespace std
+
+
+namespace boost {
+ namespace io {
+
+
+ // ** CompatTraits gcc2.95 specialisations ----------------------------
+ template<class Ch>
+ class CompatTraits< ::std::string_char_traits<Ch> >
+ : public ::std::string_char_traits<Ch>
+ {
+ public:
+ typedef CompatTraits compatible_type;
+
+ typedef Ch char_type;
+ typedef int int_type;
+ typedef ::std::streampos pos_type;
+ typedef ::std::streamoff off_type;
+
+ static char_type
+ to_char_type(const int_type& meta) {
+ return static_cast<char_type>(meta); }
+ static int_type
+ to_int_type(const char_type& ch) {
+ return static_cast<int_type>(static_cast<unsigned char>(ch) );}
+ static bool
+ eq_int_type(const int_type& left, const int_type& right) {
+ return left == right; }
+ static int_type
+ eof() {
+ return static_cast<int_type>(EOF);
+ }
+ static int_type
+ not_eof(const int_type& meta) {
+ return (meta == eof()) ? 0 : meta;
+ }
+ };
+
+ template<class Ch>
+ class CompatTraits< ::std::char_traits<Ch> > {
+ public:
+ typedef CompatTraits< ::std::string_char_traits<Ch> > compatible_type;
+ };
+
+ // ** CompatAlloc gcc-2.95 specialisations ---------------------------
+ template<>
+ class CompatAlloc< ::std::alloc>
+ {
+ public:
+ typedef ::std::allocator<char> compatible_type;
+ };
+
+ } // N.S. io
+} // N.S. boost
+
+
+
+
+
+#endif // include guard
+
+#endif // if workaround
diff --git a/3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp b/3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp
new file mode 100644
index 0000000..eb35dc1
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp
@@ -0,0 +1,42 @@
+// ----------------------------------------------------------------------------
+// workarounds_stlport.hpp : workaround STLport issues
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// see http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_MACROS_STLPORT_HPP
+#define BOOST_MACROS_STLPORT_HPP
+
+#if defined(_STLPORT_VERSION) && BOOST_WORKAROUND( BOOST_MSVC, <= 1300)
+// msvc-6-stlport fails to find basic_string::append( iterator, iterator) when linking
+// might affect other MSwindows compilers
+#define BOOST_NO_STRING_APPEND
+#endif
+
+// *** This should go to "boost/config/stdlib/stlport.hpp".
+
+// If the streams are not native and there are problems with using templates
+// accross namespaces, we define some macros to enable a workaround for this.
+
+// STLport 4.5
+#if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE)
+# define BOOST_IO_STD
+# define BOOST_IO_NEEDS_USING_DECLARATION
+#endif
+
+// STLport 4.0
+#if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_OWN_NAMESPACE) && defined(BOOST_NO_USING_TEMPLATE)
+# define BOOST_IO_STD
+# define BOOST_IO_NEEDS_USING_DECLARATION
+#endif
+
+
+// ----------------------------------------------------------------------------
+
+#endif // BOOST_MACROS_STLPORT_HPP
diff --git a/3rdParty/Boost/src/boost/format/exceptions.hpp b/3rdParty/Boost/src/boost/format/exceptions.hpp
new file mode 100644
index 0000000..9b2de83
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/exceptions.hpp
@@ -0,0 +1,103 @@
+// ----------------------------------------------------------------------------
+// boost/format/exceptions.hpp
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// See http://www.boost.org/libs/format/ for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_EXCEPTIONS_HPP
+#define BOOST_FORMAT_EXCEPTIONS_HPP
+
+
+#include <stdexcept>
+
+
+namespace boost {
+
+ namespace io {
+
+// **** exceptions -----------------------------------------------
+
+ class format_error : public std::exception
+ {
+ public:
+ format_error() {}
+ virtual const char *what() const throw() {
+ return "boost::format_error: "
+ "format generic failure";
+ }
+ };
+
+ class bad_format_string : public format_error
+ {
+ std::size_t pos_, next_;
+ public:
+ bad_format_string(std::size_t pos, std::size_t size)
+ : pos_(pos), next_(size) {}
+ std::size_t get_pos() const { return pos_; }
+ std::size_t get_next() const { return next_; }
+ virtual const char *what() const throw() {
+ return "boost::bad_format_string: format-string is ill-formed";
+ }
+ };
+
+ class too_few_args : public format_error
+ {
+ std::size_t cur_, expected_;
+ public:
+ too_few_args(std::size_t cur, std::size_t expected)
+ : cur_(cur), expected_(expected) {}
+ std::size_t get_cur() const { return cur_; }
+ std::size_t get_expected() const { return expected_; }
+ virtual const char *what() const throw() {
+ return "boost::too_few_args: "
+ "format-string referred to more arguments than were passed";
+ }
+ };
+
+ class too_many_args : public format_error
+ {
+ std::size_t cur_, expected_;
+ public:
+ too_many_args(std::size_t cur, std::size_t expected)
+ : cur_(cur), expected_(expected) {}
+ std::size_t get_cur() const { return cur_; }
+ std::size_t get_expected() const { return expected_; }
+ virtual const char *what() const throw() {
+ return "boost::too_many_args: "
+ "format-string referred to less arguments than were passed";
+ }
+ };
+
+
+ class out_of_range : public format_error
+ {
+ int index_, beg_, end_; // range is [ beg, end [
+ public:
+ out_of_range(int index, int beg, int end)
+ : index_(index), beg_(beg), end_(end) {}
+ int get_index() const { return index_; }
+ int get_beg() const { return beg_; }
+ int get_end() const { return end_; }
+ virtual const char *what() const throw() {
+ return "boost::out_of_range: "
+ "tried to refer to an argument (or item) number which"
+ " is out of range, according to the format string";
+ }
+ };
+
+
+ } // namespace io
+
+} // namespace boost
+
+
+#endif // BOOST_FORMAT_EXCEPTIONS_HPP
diff --git a/3rdParty/Boost/src/boost/format/feed_args.hpp b/3rdParty/Boost/src/boost/format/feed_args.hpp
new file mode 100644
index 0000000..53243dc
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/feed_args.hpp
@@ -0,0 +1,277 @@
+// ----------------------------------------------------------------------------
+// feed_args.hpp : functions for processing each argument
+// (feed, feed_manip, and distribute)
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_FEED_ARGS_HPP
+#define BOOST_FORMAT_FEED_ARGS_HPP
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
+
+#include <boost/format/format_class.hpp>
+#include <boost/format/group.hpp>
+#include <boost/format/detail/msvc_disambiguater.hpp>
+
+namespace boost {
+namespace io {
+namespace detail {
+
+ template<class Ch, class Tr, class Alloc>
+ void mk_str( std::basic_string<Ch,Tr, Alloc> & res,
+ const Ch * beg,
+ typename std::basic_string<Ch,Tr,Alloc>::size_type size,
+ std::streamsize w,
+ const Ch fill_char,
+ std::ios_base::fmtflags f,
+ const Ch prefix_space, // 0 if no space-padding
+ bool center)
+ // applies centered/left/right padding to the string [beg, beg+size[
+ // Effects : the result is placed in res.
+ {
+ typedef typename std::basic_string<Ch,Tr,Alloc>::size_type size_type;
+ res.resize(0);
+ if(w<=0 || static_cast<size_type>(w) <=size) {
+ // no need to pad.
+ res.reserve(size + !!prefix_space);
+ if(prefix_space)
+ res.append(1, prefix_space);
+ if (size)
+ res.append(beg, size);
+ }
+ else {
+ std::streamsize n=static_cast<std::streamsize>(w-size-!!prefix_space);
+ std::streamsize n_after = 0, n_before = 0;
+ res.reserve(static_cast<size_type>(w)); // allocate once for the 2 inserts
+ if(center)
+ n_after = n/2, n_before = n - n_after;
+ else
+ if(f & std::ios_base::left)
+ n_after = n;
+ else
+ n_before = n;
+ // now make the res string :
+ if(n_before) res.append(static_cast<size_type>(n_before), fill_char);
+ if(prefix_space)
+ res.append(1, prefix_space);
+ if (size)
+ res.append(beg, size);
+ if(n_after) res.append(static_cast<size_type>(n_after), fill_char);
+ }
+ } // -mk_str(..)
+
+
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \
+ BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
+// MSVC needs to be tricked to disambiguate this simple overload..
+// the trick is in "boost/format/msvc_disambiguater.hpp"
+
+ template< class Ch, class Tr, class T> inline
+ void put_head (BOOST_IO_STD basic_ostream<Ch, Tr> & os, const T& x ) {
+ disambiguater<Ch, Tr, T>::put_head(os, x, 1L);
+ }
+ template< class Ch, class Tr, class T> inline
+ void put_last (BOOST_IO_STD basic_ostream<Ch, Tr> & os, const T& x ) {
+ disambiguater<Ch, Tr, T>::put_last(os, x, 1L);
+ }
+
+#else
+
+ template< class Ch, class Tr, class T> inline
+ void put_head (BOOST_IO_STD basic_ostream<Ch, Tr> &, const T& ) {
+ }
+
+ template< class Ch, class Tr, class T> inline
+ void put_head( BOOST_IO_STD basic_ostream<Ch, Tr> & os, const group1<T>& x ) {
+ os << group_head(x.a1_); // send the first N-1 items, not the last
+ }
+
+ template< class Ch, class Tr, class T> inline
+ void put_last( BOOST_IO_STD basic_ostream<Ch, Tr> & os, const T& x ) {
+ os << x ;
+ }
+
+ template< class Ch, class Tr, class T> inline
+ void put_last( BOOST_IO_STD basic_ostream<Ch, Tr> & os, const group1<T>& x ) {
+ os << group_last(x.a1_); // this selects the last element
+ }
+
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
+ template< class Ch, class Tr, class T> inline
+ void put_head( BOOST_IO_STD basic_ostream<Ch, Tr> &, T& ) {
+ }
+
+ template< class Ch, class Tr, class T> inline
+ void put_last( BOOST_IO_STD basic_ostream<Ch, Tr> & os, T& x) {
+ os << x ;
+ }
+#endif
+#endif // -msvc workaround
+
+
+ template< class Ch, class Tr, class Alloc, class T>
+ void put( T x,
+ const format_item<Ch, Tr, Alloc>& specs,
+ typename basic_format<Ch, Tr, Alloc>::string_type& res,
+ typename basic_format<Ch, Tr, Alloc>::internal_streambuf_t & buf,
+ io::detail::locale_t *loc_p = NULL)
+ {
+#ifdef BOOST_MSVC
+ // If std::min<unsigned> or std::max<unsigned> are already instantiated
+ // at this point then we get a blizzard of warning messages when we call
+ // those templates with std::size_t as arguments. Weird and very annoyning...
+#pragma warning(push)
+#pragma warning(disable:4267)
+#endif
+ // does the actual conversion of x, with given params, into a string
+ // using the supplied stringbuf.
+
+ typedef typename basic_format<Ch, Tr, Alloc>::string_type string_type;
+ typedef typename basic_format<Ch, Tr, Alloc>::format_item_t format_item_t;
+ typedef typename string_type::size_type size_type;
+
+ basic_oaltstringstream<Ch, Tr, Alloc> oss( &buf);
+ specs.fmtstate_.apply_on(oss, loc_p);
+
+ // the stream format state can be modified by manipulators in the argument :
+ put_head( oss, x );
+ // in case x is a group, apply the manip part of it,
+ // in order to find width
+
+ const std::ios_base::fmtflags fl=oss.flags();
+ const bool internal = (fl & std::ios_base::internal) != 0;
+ const std::streamsize w = oss.width();
+ const bool two_stepped_padding= internal && (w!=0);
+
+ res.resize(0);
+ if(! two_stepped_padding) {
+ if(w>0) // handle padding via mk_str, not natively in stream
+ oss.width(0);
+ put_last( oss, x);
+ const Ch * res_beg = buf.pbase();
+ Ch prefix_space = 0;
+ if(specs.pad_scheme_ & format_item_t::spacepad)
+ if(buf.pcount()== 0 ||
+ (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') ))
+ prefix_space = oss.widen(' ');
+ size_type res_size = (std::min)(
+ static_cast<size_type>(specs.truncate_ - !!prefix_space),
+ buf.pcount() );
+ mk_str(res, res_beg, res_size, w, oss.fill(), fl,
+ prefix_space, (specs.pad_scheme_ & format_item_t::centered) !=0 );
+ }
+ else { // 2-stepped padding
+ // internal can be implied by zeropad, or user-set.
+ // left, right, and centered alignment overrule internal,
+ // but spacepad or truncate might be mixed with internal (using manipulator)
+ put_last( oss, x); // may pad
+ const Ch * res_beg = buf.pbase();
+ size_type res_size = buf.pcount();
+ bool prefix_space=false;
+ if(specs.pad_scheme_ & format_item_t::spacepad)
+ if(buf.pcount()== 0 ||
+ (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') ))
+ prefix_space = true;
+ if(res_size == static_cast<size_type>(w) && w<=specs.truncate_ && !prefix_space) {
+ // okay, only one thing was printed and padded, so res is fine
+ res.assign(res_beg, res_size);
+ }
+ else { // length w exceeded
+ // either it was multi-output with first output padding up all width..
+ // either it was one big arg and we are fine.
+ // Note that res_size<w is possible (in case of bad user-defined formatting)
+ res.assign(res_beg, res_size);
+ res_beg=NULL; // invalidate pointers.
+
+ // make a new stream, to start re-formatting from scratch :
+ buf.clear_buffer();
+ basic_oaltstringstream<Ch, Tr, Alloc> oss2( &buf);
+ specs.fmtstate_.apply_on(oss2, loc_p);
+ put_head( oss2, x );
+
+ oss2.width(0);
+ if(prefix_space)
+ oss2 << ' ';
+ put_last(oss2, x );
+ if(buf.pcount()==0 && specs.pad_scheme_ & format_item_t::spacepad) {
+ prefix_space =true;
+ oss2 << ' ';
+ }
+ // we now have the minimal-length output
+ const Ch * tmp_beg = buf.pbase();
+ size_type tmp_size = (std::min)(static_cast<size_type>(specs.truncate_),
+ buf.pcount() );
+
+
+ if(static_cast<size_type>(w) <= tmp_size) {
+ // minimal length is already >= w, so no padding (cool!)
+ res.assign(tmp_beg, tmp_size);
+ }
+ else { // hum.. we need to pad (multi_output, or spacepad present)
+ //find where we should pad
+ size_type sz = (std::min)(res_size + (prefix_space ? 1 : 0), tmp_size);
+ size_type i = prefix_space;
+ for(; i<sz && tmp_beg[i] == res[i - (prefix_space ? 1 : 0)]; ++i) {}
+ if(i>=tmp_size) i=prefix_space;
+ res.assign(tmp_beg, i);
+ std::streamsize d = w - static_cast<std::streamsize>(tmp_size);
+ BOOST_ASSERT(d>0);
+ res.append(static_cast<size_type>( d ), oss2.fill());
+ res.append(tmp_beg+i, tmp_size-i);
+ BOOST_ASSERT(i+(tmp_size-i)+(std::max)(d,(std::streamsize)0)
+ == static_cast<size_type>(w));
+ BOOST_ASSERT(res.size() == static_cast<size_type>(w));
+ }
+ }
+ }
+ buf.clear_buffer();
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+ } // end- put(..)
+
+
+ template< class Ch, class Tr, class Alloc, class T>
+ void distribute (basic_format<Ch,Tr, Alloc>& self, T x) {
+ // call put(x, ..) on every occurence of the current argument :
+ if(self.cur_arg_ >= self.num_args_) {
+ if( self.exceptions() & too_many_args_bit )
+ boost::throw_exception(too_many_args(self.cur_arg_, self.num_args_));
+ else return;
+ }
+ for(unsigned long i=0; i < self.items_.size(); ++i) {
+ if(self.items_[i].argN_ == self.cur_arg_) {
+ put<Ch, Tr, Alloc, T> (x, self.items_[i], self.items_[i].res_,
+ self.buf_, boost::get_pointer(self.loc_) );
+ }
+ }
+ }
+
+ template<class Ch, class Tr, class Alloc, class T>
+ basic_format<Ch, Tr, Alloc>&
+ feed (basic_format<Ch,Tr, Alloc>& self, T x) {
+ if(self.dumped_) self.clear();
+ distribute<Ch, Tr, Alloc, T> (self, x);
+ ++self.cur_arg_;
+ if(self.bound_.size() != 0) {
+ while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] )
+ ++self.cur_arg_;
+ }
+ return self;
+ }
+
+} // namespace detail
+} // namespace io
+} // namespace boost
+
+
+#endif // BOOST_FORMAT_FEED_ARGS_HPP
diff --git a/3rdParty/Boost/src/boost/format/format_class.hpp b/3rdParty/Boost/src/boost/format/format_class.hpp
new file mode 100644
index 0000000..4555e56
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/format_class.hpp
@@ -0,0 +1,168 @@
+// ----------------------------------------------------------------------------
+// format_class.hpp : class interface
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_CLASS_HPP
+#define BOOST_FORMAT_CLASS_HPP
+
+
+#include <vector>
+#include <string>
+
+#include <boost/optional.hpp> // to store locale when needed
+
+#include <boost/format/format_fwd.hpp>
+#include <boost/format/internals_fwd.hpp>
+#include <boost/format/internals.hpp>
+#include <boost/format/alt_sstream.hpp>
+
+namespace boost {
+
+ template<class Ch, class Tr, class Alloc>
+ class basic_format
+ {
+ typedef typename io::CompatTraits<Tr>::compatible_type compat_traits;
+ public:
+ typedef Ch CharT; // borland fails in operator% if we use Ch and Tr directly
+ typedef std::basic_string<Ch, Tr, Alloc> string_type;
+ typedef typename string_type::size_type size_type;
+ typedef io::detail::format_item<Ch, Tr, Alloc> format_item_t;
+ typedef io::basic_altstringbuf<Ch, Tr, Alloc> internal_streambuf_t;
+
+
+ explicit basic_format(const Ch* str=NULL);
+ explicit basic_format(const string_type& s);
+ basic_format(const basic_format& x);
+ basic_format& operator= (const basic_format& x);
+ void swap(basic_format& x);
+
+#if !defined(BOOST_NO_STD_LOCALE)
+ explicit basic_format(const Ch* str, const std::locale & loc);
+ explicit basic_format(const string_type& s, const std::locale & loc);
+#endif
+ io::detail::locale_t getloc() const;
+
+ basic_format& clear(); // empty all converted string buffers (except bound items)
+ basic_format& clear_binds(); // unbind all bound items, and call clear()
+ basic_format& parse(const string_type&); // resets buffers and parse a new format string
+
+ // ** formatted result ** //
+ size_type size() const; // sum of the current string pieces sizes
+ string_type str() const; // final string
+
+ // ** arguments passing ** //
+ template<class T>
+ basic_format& operator%(const T& x)
+ { return io::detail::feed<CharT, Tr, Alloc, const T&>(*this,x); }
+
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
+ template<class T> basic_format& operator%(T& x)
+ { return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); }
+#endif
+
+#if defined(__GNUC__)
+ // GCC can't handle anonymous enums without some help
+ // ** arguments passing ** //
+ basic_format& operator%(const int& x)
+ { return io::detail::feed<CharT, Tr, Alloc, const int&>(*this,x); }
+
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
+ basic_format& operator%(int& x)
+ { return io::detail::feed<CharT, Tr, Alloc, int&>(*this,x); }
+#endif
+#endif
+
+ // The total number of arguments expected to be passed to the format objectt
+ int expected_args() const
+ { return num_args_; }
+ // The number of arguments currently bound (see bind_arg(..) )
+ int bound_args() const;
+ // The number of arguments currently fed to the format object
+ int fed_args() const;
+ // The index (1-based) of the current argument (i.e. next to be formatted)
+ int cur_arg() const;
+ // The number of arguments still required to be fed
+ int remaining_args() const; // same as expected_args() - bound_args() - fed_args()
+
+
+ // ** object modifying **//
+ template<class T>
+ basic_format& bind_arg(int argN, const T& val)
+ { return io::detail::bind_arg_body(*this, argN, val); }
+ basic_format& clear_bind(int argN);
+ template<class T>
+ basic_format& modify_item(int itemN, T manipulator)
+ { return io::detail::modify_item_body<Ch,Tr, Alloc, T> (*this, itemN, manipulator);}
+
+ // Choosing which errors will throw exceptions :
+ unsigned char exceptions() const;
+ unsigned char exceptions(unsigned char newexcept);
+
+#if !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS ) \
+ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x570) \
+ && !BOOST_WORKAROUND( _CRAYC, != 0) \
+ && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
+ // use friend templates and private members only if supported
+
+#ifndef BOOST_NO_TEMPLATE_STD_STREAM
+ template<class Ch2, class Tr2, class Alloc2>
+ friend std::basic_ostream<Ch2, Tr2> &
+ operator<<( std::basic_ostream<Ch2, Tr2> & ,
+ const basic_format<Ch2, Tr2, Alloc2>& );
+#else
+ template<class Ch2, class Tr2, class Alloc2>
+ friend std::ostream &
+ operator<<( std::ostream & ,
+ const basic_format<Ch2, Tr2, Alloc2>& );
+#endif
+
+ template<class Ch2, class Tr2, class Alloc2, class T>
+ friend basic_format<Ch2, Tr2, Alloc2>&
+ io::detail::feed (basic_format<Ch2, Tr2, Alloc2>&, T);
+
+ template<class Ch2, class Tr2, class Alloc2, class T> friend
+ void io::detail::distribute (basic_format<Ch2, Tr2, Alloc2>&, T);
+
+ template<class Ch2, class Tr2, class Alloc2, class T> friend
+ basic_format<Ch2, Tr2, Alloc2>&
+ io::detail::modify_item_body (basic_format<Ch2, Tr2, Alloc2>&, int, T);
+
+ template<class Ch2, class Tr2, class Alloc2, class T> friend
+ basic_format<Ch2, Tr2, Alloc2>&
+ io::detail::bind_arg_body (basic_format<Ch2, Tr2, Alloc2>&, int, const T&);
+
+ private:
+#endif
+ typedef io::detail::stream_format_state<Ch, Tr> stream_format_state;
+ // flag bits, used for style_
+ enum style_values { ordered = 1, // set only if all directives are positional
+ special_needs = 4 };
+
+ void make_or_reuse_data(std::size_t nbitems);// used for (re-)initialisation
+
+ // member data --------------------------------------------//
+ std::vector<format_item_t> items_; // each '%..' directive leads to a format_item
+ std::vector<bool> bound_; // stores which arguments were bound. size() == 0 || num_args
+
+ int style_; // style of format-string : positional or not, etc
+ int cur_arg_; // keep track of wich argument is current
+ int num_args_; // number of expected arguments
+ mutable bool dumped_; // true only after call to str() or <<
+ string_type prefix_; // piece of string to insert before first item
+ unsigned char exceptions_;
+ internal_streambuf_t buf_; // the internal stream buffer.
+ boost::optional<io::detail::locale_t> loc_;
+ }; // class basic_format
+
+} // namespace boost
+
+
+#endif // BOOST_FORMAT_CLASS_HPP
diff --git a/3rdParty/Boost/src/boost/format/format_fwd.hpp b/3rdParty/Boost/src/boost/format/format_fwd.hpp
new file mode 100644
index 0000000..be3228a
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/format_fwd.hpp
@@ -0,0 +1,49 @@
+// ----------------------------------------------------------------------------
+// format_fwd.hpp : forward declarations
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_FWD_HPP
+#define BOOST_FORMAT_FWD_HPP
+
+#include <string>
+#include <iosfwd>
+
+#include <boost/format/detail/compat_workarounds.hpp>
+
+namespace boost {
+
+ template <class Ch,
+#if !( BOOST_WORKAROUND(__GNUC__, <3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) )
+ // gcc-2.95's native stdlid needs special treatment
+ class Tr = BOOST_IO_STD char_traits<Ch>, class Alloc = std::allocator<Ch> >
+#else
+ class Tr = std::string_char_traits<Ch>, class Alloc = std::alloc >
+#endif
+ class basic_format;
+
+ typedef basic_format<char > format;
+
+#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF) \
+ && !defined(BOOST_FORMAT_IGNORE_STRINGSTREAM)
+ typedef basic_format<wchar_t > wformat;
+#endif
+
+ namespace io {
+ enum format_error_bits { bad_format_string_bit = 1,
+ too_few_args_bit = 2, too_many_args_bit = 4,
+ out_of_range_bit = 8,
+ all_error_bits = 255, no_error_bits=0 };
+
+ } // namespace io
+
+} // namespace boost
+
+#endif // BOOST_FORMAT_FWD_HPP
diff --git a/3rdParty/Boost/src/boost/format/format_implementation.hpp b/3rdParty/Boost/src/boost/format/format_implementation.hpp
new file mode 100644
index 0000000..2abb5c4
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/format_implementation.hpp
@@ -0,0 +1,329 @@
+// ----------------------------------------------------------------------------
+// format_implementation.hpp Implementation of the basic_format class
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_IMPLEMENTATION_HPP
+#define BOOST_FORMAT_IMPLEMENTATION_HPP
+
+#include <boost/config.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/assert.hpp>
+#include <boost/format/format_class.hpp>
+#include <algorithm> // std::swap
+
+namespace boost {
+
+// --- basic_format implementation -----------------------------------------//
+
+ template< class Ch, class Tr, class Alloc>
+ basic_format<Ch, Tr, Alloc>:: basic_format(const Ch* s)
+ : style_(0), cur_arg_(0), num_args_(0), dumped_(false),
+ exceptions_(io::all_error_bits)
+ {
+ if( s)
+ parse( s );
+ }
+
+#if !defined(BOOST_NO_STD_LOCALE)
+ template< class Ch, class Tr, class Alloc>
+ basic_format<Ch, Tr, Alloc>:: basic_format(const Ch* s, const std::locale & loc)
+ : style_(0), cur_arg_(0), num_args_(0), dumped_(false),
+ exceptions_(io::all_error_bits), loc_(loc)
+ {
+ if(s) parse( s );
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ basic_format<Ch, Tr, Alloc>:: basic_format(const string_type& s, const std::locale & loc)
+ : style_(0), cur_arg_(0), num_args_(0), dumped_(false),
+ exceptions_(io::all_error_bits), loc_(loc)
+ {
+ parse(s);
+ }
+#endif // ! BOOST_NO_STD_LOCALE
+ template< class Ch, class Tr, class Alloc>
+ io::detail::locale_t basic_format<Ch, Tr, Alloc>::
+ getloc() const {
+ return loc_ ? loc_.get() : io::detail::locale_t();
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ basic_format<Ch, Tr, Alloc>:: basic_format(const string_type& s)
+ : style_(0), cur_arg_(0), num_args_(0), dumped_(false),
+ exceptions_(io::all_error_bits)
+ {
+ parse(s);
+ }
+
+ template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member
+ basic_format<Ch, Tr, Alloc>:: basic_format(const basic_format& x)
+ : items_(x.items_), bound_(x.bound_), style_(x.style_),
+ cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(x.dumped_),
+ prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_)
+ {
+ }
+
+ template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member
+ basic_format<Ch, Tr, Alloc>& basic_format<Ch, Tr, Alloc>::
+ operator= (const basic_format& x) {
+ if(this == &x)
+ return *this;
+ (basic_format<Ch, Tr, Alloc>(x)).swap(*this);
+ return *this;
+ }
+ template< class Ch, class Tr, class Alloc>
+ void basic_format<Ch, Tr, Alloc>::
+ swap (basic_format & x) {
+ std::swap(exceptions_, x.exceptions_);
+ std::swap(style_, x.style_);
+ std::swap(cur_arg_, x.cur_arg_);
+ std::swap(num_args_, x.num_args_);
+ std::swap(dumped_, x.dumped_);
+
+ items_.swap(x.items_);
+ prefix_.swap(x.prefix_);
+ bound_.swap(x.bound_);
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ unsigned char basic_format<Ch,Tr, Alloc>:: exceptions() const {
+ return exceptions_;
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ unsigned char basic_format<Ch,Tr, Alloc>:: exceptions(unsigned char newexcept) {
+ unsigned char swp = exceptions_;
+ exceptions_ = newexcept;
+ return swp;
+ }
+
+ template<class Ch, class Tr, class Alloc>
+ void basic_format<Ch, Tr, Alloc>::
+ make_or_reuse_data (std::size_t nbitems) {
+#if !defined(BOOST_NO_STD_LOCALE)
+ Ch fill = ( BOOST_USE_FACET(std::ctype<Ch>, getloc()) ). widen(' ');
+#else
+ Ch fill = ' ';
+#endif
+ if(items_.size() == 0)
+ items_.assign( nbitems, format_item_t(fill) );
+ else {
+ if(nbitems>items_.size())
+ items_.resize(nbitems, format_item_t(fill));
+ bound_.resize(0);
+ for(std::size_t i=0; i < nbitems; ++i)
+ items_[i].reset(fill); // strings are resized, instead of reallocated
+ }
+ prefix_.resize(0);
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>::
+ clear () {
+ // empty the string buffers (except bound arguments)
+ // and make the format object ready for formatting a new set of arguments
+
+ BOOST_ASSERT( bound_.size()==0 || num_args_ == static_cast<int>(bound_.size()) );
+
+ for(unsigned long i=0; i<items_.size(); ++i) {
+ // clear converted strings only if the corresponding argument is not bound :
+ if( bound_.size()==0 || items_[i].argN_<0 || !bound_[ items_[i].argN_ ] )
+ items_[i].res_.resize(0);
+ }
+ cur_arg_=0; dumped_=false;
+ // maybe first arg is bound:
+ if(bound_.size() != 0) {
+ for(; cur_arg_ < num_args_ && bound_[cur_arg_]; ++cur_arg_)
+ {}
+ }
+ return *this;
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>::
+ clear_binds () {
+ // remove all binds, then clear()
+ bound_.resize(0);
+ clear();
+ return *this;
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>::
+ clear_bind (int argN) {
+ // remove the bind of ONE argument then clear()
+ if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] ) {
+ if( exceptions() & io::out_of_range_bit)
+ boost::throw_exception(io::out_of_range(argN, 1, num_args_+1 ) );
+ else return *this;
+ }
+ bound_[argN-1]=false;
+ clear();
+ return *this;
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ int basic_format<Ch,Tr, Alloc>::
+ bound_args() const {
+ if(bound_.size()==0)
+ return 0;
+ int n=0;
+ for(int i=0; i<num_args_ ; ++i)
+ if(bound_[i])
+ ++n;
+ return n;
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ int basic_format<Ch,Tr, Alloc>::
+ fed_args() const {
+ if(bound_.size()==0)
+ return cur_arg_;
+ int n=0;
+ for(int i=0; i<cur_arg_ ; ++i)
+ if(!bound_[i])
+ ++n;
+ return n;
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ int basic_format<Ch,Tr, Alloc>::
+ cur_arg() const {
+ return cur_arg_+1; }
+
+ template< class Ch, class Tr, class Alloc>
+ int basic_format<Ch,Tr, Alloc>::
+ remaining_args() const {
+ if(bound_.size()==0)
+ return num_args_-cur_arg_;
+ int n=0;
+ for(int i=cur_arg_; i<num_args_ ; ++i)
+ if(!bound_[i])
+ ++n;
+ return n;
+ }
+
+ template< class Ch, class Tr, class Alloc>
+ typename basic_format<Ch, Tr, Alloc>::string_type
+ basic_format<Ch,Tr, Alloc>::
+ str () const {
+ if(items_.size()==0)
+ return prefix_;
+ if( cur_arg_ < num_args_)
+ if( exceptions() & io::too_few_args_bit )
+ // not enough variables supplied
+ boost::throw_exception(io::too_few_args(cur_arg_, num_args_));
+
+ unsigned long i;
+ string_type res;
+ res.reserve(size());
+ res += prefix_;
+ for(i=0; i < items_.size(); ++i) {
+ const format_item_t& item = items_[i];
+ res += item.res_;
+ if( item.argN_ == format_item_t::argN_tabulation) {
+ BOOST_ASSERT( item.pad_scheme_ & format_item_t::tabulation);
+ if( static_cast<size_type>(item.fmtstate_.width_) > res.size() )
+ res.append( static_cast<size_type>(item.fmtstate_.width_) - res.size(),
+ item.fmtstate_.fill_ );
+ }
+ res += item.appendix_;
+ }
+ dumped_=true;
+ return res;
+ }
+ template< class Ch, class Tr, class Alloc>
+ typename std::basic_string<Ch, Tr, Alloc>::size_type basic_format<Ch,Tr, Alloc>::
+ size () const {
+#ifdef BOOST_MSVC
+ // If std::min<unsigned> or std::max<unsigned> are already instantiated
+ // at this point then we get a blizzard of warning messages when we call
+ // those templates with std::size_t as arguments. Weird and very annoyning...
+#pragma warning(push)
+#pragma warning(disable:4267)
+#endif
+ BOOST_USING_STD_MAX();
+ size_type sz = prefix_.size();
+ unsigned long i;
+ for(i=0; i < items_.size(); ++i) {
+ const format_item_t& item = items_[i];
+ sz += item.res_.size();
+ if( item.argN_ == format_item_t::argN_tabulation)
+ sz = max BOOST_PREVENT_MACRO_SUBSTITUTION (sz,
+ static_cast<size_type>(item.fmtstate_.width_) );
+ sz += item.appendix_.size();
+ }
+ return sz;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+ }
+
+namespace io {
+namespace detail {
+
+ template<class Ch, class Tr, class Alloc, class T>
+ basic_format<Ch, Tr, Alloc>&
+ bind_arg_body (basic_format<Ch, Tr, Alloc>& self, int argN, const T& val) {
+ // bind one argument to a fixed value
+ // this is persistent over clear() calls, thus also over str() and <<
+ if(self.dumped_)
+ self.clear(); // needed because we will modify cur_arg_
+ if(argN<1 || argN > self.num_args_) {
+ if( self.exceptions() & io::out_of_range_bit )
+ boost::throw_exception(io::out_of_range(argN, 1, self.num_args_+1 ) );
+ else return self;
+ }
+ if(self.bound_.size()==0)
+ self.bound_.assign(self.num_args_,false);
+ else
+ BOOST_ASSERT( self.num_args_ == static_cast<signed int>(self.bound_.size()) );
+ int o_cur_arg = self.cur_arg_;
+ self.cur_arg_ = argN-1; // arrays begin at 0
+
+ self.bound_[self.cur_arg_]=false; // if already set, we unset and re-sets..
+ self.operator%(val); // put val at the right place, because cur_arg is set
+
+
+ // Now re-position cur_arg before leaving :
+ self.cur_arg_ = o_cur_arg;
+ self.bound_[argN-1]=true;
+ if(self.cur_arg_ == argN-1 ) {
+ // hum, now this arg is bound, so move to next free arg
+ while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_])
+ ++self.cur_arg_;
+ }
+ // In any case, we either have all args, or are on an unbound arg :
+ BOOST_ASSERT( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]);
+ return self;
+ }
+
+ template<class Ch, class Tr, class Alloc, class T> basic_format<Ch, Tr, Alloc>&
+ modify_item_body (basic_format<Ch, Tr, Alloc>& self, int itemN, T manipulator) {
+ // applies a manipulator to the format_item describing a given directive.
+ // this is a permanent change, clear or reset won't cancel that.
+ if(itemN<1 || itemN > static_cast<signed int>(self.items_.size() )) {
+ if( self.exceptions() & io::out_of_range_bit )
+ boost::throw_exception(io::out_of_range(itemN, 1, static_cast<int>(self.items_.size()) ));
+ else return self;
+ }
+ self.items_[itemN-1].fmtstate_. template apply_manip<T> ( manipulator );
+ return self;
+ }
+
+} // namespace detail
+} // namespace io
+} // namespace boost
+
+
+
+#endif // BOOST_FORMAT_IMPLEMENTATION_HPP
diff --git a/3rdParty/Boost/src/boost/format/free_funcs.hpp b/3rdParty/Boost/src/boost/format/free_funcs.hpp
new file mode 100644
index 0000000..3a51545
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/free_funcs.hpp
@@ -0,0 +1,70 @@
+// ----------------------------------------------------------------------------
+// free_funcs.hpp : implementation of the free functions of boost::format
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_FUNCS_HPP
+#define BOOST_FORMAT_FUNCS_HPP
+
+#include <boost/format/format_class.hpp>
+#include <boost/throw_exception.hpp>
+
+namespace boost {
+
+ template<class Ch, class Tr, class Alloc> inline
+ std::basic_string<Ch, Tr, Alloc> str(const basic_format<Ch, Tr, Alloc>& f) {
+ // adds up all pieces of strings and converted items, and return the formatted string
+ return f.str();
+ }
+ namespace io {
+ using ::boost::str; // keep compatibility with when it was defined in this N.S.
+ } // - namespace io
+
+#ifndef BOOST_NO_TEMPLATE_STD_STREAM
+ template<class Ch, class Tr, class Alloc>
+ std::basic_ostream<Ch, Tr> &
+ operator<<( std::basic_ostream<Ch, Tr> & os,
+ const basic_format<Ch, Tr, Alloc>& f)
+#else
+ template<class Ch, class Tr, class Alloc>
+ std::ostream &
+ operator<<( std::ostream & os,
+ const basic_format<Ch, Tr, Alloc>& f)
+#endif
+ // effect: "return os << str(f);" but we can do it faster
+ {
+ typedef boost::basic_format<Ch, Tr, Alloc> format_t;
+ if(f.items_.size()==0)
+ os << f.prefix_;
+ else {
+ if(f.cur_arg_ < f.num_args_)
+ if( f.exceptions() & io::too_few_args_bit )
+ // not enough variables supplied
+ boost::throw_exception(io::too_few_args(f.cur_arg_, f.num_args_));
+ if(f.style_ & format_t::special_needs)
+ os << f.str();
+ else {
+ // else we dont have to count chars output, so we dump directly to os :
+ os << f.prefix_;
+ for(unsigned long i=0; i<f.items_.size(); ++i) {
+ const typename format_t::format_item_t& item = f.items_[i];
+ os << item.res_;
+ os << item.appendix_;
+ }
+ }
+ }
+ f.dumped_=true;
+ return os;
+ }
+
+} // namespace boost
+
+
+#endif // BOOST_FORMAT_FUNCS_HPP
diff --git a/3rdParty/Boost/src/boost/format/group.hpp b/3rdParty/Boost/src/boost/format/group.hpp
new file mode 100644
index 0000000..c586b2a
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/group.hpp
@@ -0,0 +1,684 @@
+
+// ----------------------------------------------------------------------------
+// group.hpp : encapsulates a group of manipulators along with an argument
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+
+// group_head : cut the last element of a group out.
+// (is overloaded below on each type of group)
+
+// group_last : returns the last element of a group
+// (is overloaded below on each type of group)
+// ----------------------------------------------------------------------------
+
+
+#ifndef BOOST_FORMAT_GROUP_HPP
+#define BOOST_FORMAT_GROUP_HPP
+
+#include <boost/config.hpp>
+
+
+namespace boost {
+namespace io {
+
+
+namespace detail {
+
+
+// empty group, but useful even though.
+struct group0
+{
+ group0() {}
+};
+
+template <class Ch, class Tr>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << ( BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group0& )
+{
+ return os;
+}
+
+template <class T1>
+struct group1
+{
+ T1 a1_;
+ group1(T1 a1)
+ : a1_(a1)
+ {}
+private:
+ group1& operator=(const group1&);
+};
+
+template <class Ch, class Tr, class T1>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group1<T1>& x)
+{
+ os << x.a1_;
+ return os;
+}
+
+
+
+
+template <class T1,class T2>
+struct group2
+{
+ T1 a1_;
+ T2 a2_;
+ group2(T1 a1,T2 a2)
+ : a1_(a1),a2_(a2)
+ {}
+private:
+ group2& operator=(const group2&);
+};
+
+template <class Ch, class Tr, class T1,class T2>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group2<T1,T2>& x)
+{
+ os << x.a1_<< x.a2_;
+ return os;
+}
+
+template <class T1,class T2,class T3>
+struct group3
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ group3(T1 a1,T2 a2,T3 a3)
+ : a1_(a1),a2_(a2),a3_(a3)
+ {}
+private:
+ group3& operator=(const group3&);
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group3<T1,T2,T3>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_;
+ return os;
+}
+
+template <class T1,class T2,class T3,class T4>
+struct group4
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ T4 a4_;
+ group4(T1 a1,T2 a2,T3 a3,T4 a4)
+ : a1_(a1),a2_(a2),a3_(a3),a4_(a4)
+ {}
+private:
+ group4& operator=(const group4&);
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3,class T4>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group4<T1,T2,T3,T4>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_<< x.a4_;
+ return os;
+}
+
+template <class T1,class T2,class T3,class T4,class T5>
+struct group5
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ T4 a4_;
+ T5 a5_;
+ group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5)
+ : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5)
+ {}
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group5<T1,T2,T3,T4,T5>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_;
+ return os;
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6>
+struct group6
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ T4 a4_;
+ T5 a5_;
+ T6 a6_;
+ group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6)
+ : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6)
+ {}
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group6<T1,T2,T3,T4,T5,T6>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_;
+ return os;
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
+struct group7
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ T4 a4_;
+ T5 a5_;
+ T6 a6_;
+ T7 a7_;
+ group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7)
+ : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7)
+ {}
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group7<T1,T2,T3,T4,T5,T6,T7>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_;
+ return os;
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
+struct group8
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ T4 a4_;
+ T5 a5_;
+ T6 a6_;
+ T7 a7_;
+ T8 a8_;
+ group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
+ : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8)
+ {}
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group8<T1,T2,T3,T4,T5,T6,T7,T8>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_;
+ return os;
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
+struct group9
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ T4 a4_;
+ T5 a5_;
+ T6 a6_;
+ T7 a7_;
+ T8 a8_;
+ T9 a9_;
+ group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9)
+ : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9)
+ {}
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group9<T1,T2,T3,T4,T5,T6,T7,T8,T9>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_;
+ return os;
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
+struct group10
+{
+ T1 a1_;
+ T2 a2_;
+ T3 a3_;
+ T4 a4_;
+ T5 a5_;
+ T6 a6_;
+ T7 a7_;
+ T8 a8_;
+ T9 a9_;
+ T10 a10_;
+ group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10)
+ : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10)
+ {}
+};
+
+template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
+inline
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>& x)
+{
+ os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_;
+ return os;
+}
+
+
+
+
+template <class T1,class T2>
+inline
+group1<T1>
+group_head( group2<T1,T2> const& x)
+{
+ return group1<T1> (x.a1_);
+}
+
+template <class T1,class T2>
+inline
+group1<T2>
+group_last( group2<T1,T2> const& x)
+{
+ return group1<T2> (x.a2_);
+}
+
+
+
+template <class T1,class T2,class T3>
+inline
+group2<T1,T2>
+group_head( group3<T1,T2,T3> const& x)
+{
+ return group2<T1,T2> (x.a1_,x.a2_);
+}
+
+template <class T1,class T2,class T3>
+inline
+group1<T3>
+group_last( group3<T1,T2,T3> const& x)
+{
+ return group1<T3> (x.a3_);
+}
+
+
+
+template <class T1,class T2,class T3,class T4>
+inline
+group3<T1,T2,T3>
+group_head( group4<T1,T2,T3,T4> const& x)
+{
+ return group3<T1,T2,T3> (x.a1_,x.a2_,x.a3_);
+}
+
+template <class T1,class T2,class T3,class T4>
+inline
+group1<T4>
+group_last( group4<T1,T2,T3,T4> const& x)
+{
+ return group1<T4> (x.a4_);
+}
+
+
+
+template <class T1,class T2,class T3,class T4,class T5>
+inline
+group4<T1,T2,T3,T4>
+group_head( group5<T1,T2,T3,T4,T5> const& x)
+{
+ return group4<T1,T2,T3,T4> (x.a1_,x.a2_,x.a3_,x.a4_);
+}
+
+template <class T1,class T2,class T3,class T4,class T5>
+inline
+group1<T5>
+group_last( group5<T1,T2,T3,T4,T5> const& x)
+{
+ return group1<T5> (x.a5_);
+}
+
+
+
+template <class T1,class T2,class T3,class T4,class T5,class T6>
+inline
+group5<T1,T2,T3,T4,T5>
+group_head( group6<T1,T2,T3,T4,T5,T6> const& x)
+{
+ return group5<T1,T2,T3,T4,T5> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_);
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6>
+inline
+group1<T6>
+group_last( group6<T1,T2,T3,T4,T5,T6> const& x)
+{
+ return group1<T6> (x.a6_);
+}
+
+
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
+inline
+group6<T1,T2,T3,T4,T5,T6>
+group_head( group7<T1,T2,T3,T4,T5,T6,T7> const& x)
+{
+ return group6<T1,T2,T3,T4,T5,T6> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_);
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
+inline
+group1<T7>
+group_last( group7<T1,T2,T3,T4,T5,T6,T7> const& x)
+{
+ return group1<T7> (x.a7_);
+}
+
+
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
+inline
+group7<T1,T2,T3,T4,T5,T6,T7>
+group_head( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x)
+{
+ return group7<T1,T2,T3,T4,T5,T6,T7> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_);
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
+inline
+group1<T8>
+group_last( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x)
+{
+ return group1<T8> (x.a8_);
+}
+
+
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
+inline
+group8<T1,T2,T3,T4,T5,T6,T7,T8>
+group_head( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x)
+{
+ return group8<T1,T2,T3,T4,T5,T6,T7,T8> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_);
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
+inline
+group1<T9>
+group_last( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x)
+{
+ return group1<T9> (x.a9_);
+}
+
+
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
+inline
+group9<T1,T2,T3,T4,T5,T6,T7,T8,T9>
+group_head( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x)
+{
+ return group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_);
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
+inline
+group1<T10>
+group_last( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x)
+{
+ return group1<T10> (x.a10_);
+}
+
+
+
+
+
+} // namespace detail
+
+
+
+// helper functions
+
+
+inline detail::group1< detail::group0 >
+group() { return detail::group1< detail::group0 > ( detail::group0() ); }
+
+template <class T1, class Var>
+inline
+detail::group1< detail::group2<T1, Var const&> >
+ group(T1 a1, Var const& var)
+{
+ return detail::group1< detail::group2<T1, Var const&> >
+ ( detail::group2<T1, Var const&>
+ (a1, var)
+ );
+}
+
+template <class T1,class T2, class Var>
+inline
+detail::group1< detail::group3<T1,T2, Var const&> >
+ group(T1 a1,T2 a2, Var const& var)
+{
+ return detail::group1< detail::group3<T1,T2, Var const&> >
+ ( detail::group3<T1,T2, Var const&>
+ (a1,a2, var)
+ );
+}
+
+template <class T1,class T2,class T3, class Var>
+inline
+detail::group1< detail::group4<T1,T2,T3, Var const&> >
+ group(T1 a1,T2 a2,T3 a3, Var const& var)
+{
+ return detail::group1< detail::group4<T1,T2,T3, Var const&> >
+ ( detail::group4<T1,T2,T3, Var const&>
+ (a1,a2,a3, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4, class Var>
+inline
+detail::group1< detail::group5<T1,T2,T3,T4, Var const&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var)
+{
+ return detail::group1< detail::group5<T1,T2,T3,T4, Var const&> >
+ ( detail::group5<T1,T2,T3,T4, Var const&>
+ (a1,a2,a3,a4, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5, class Var>
+inline
+detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var)
+{
+ return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> >
+ ( detail::group6<T1,T2,T3,T4,T5, Var const&>
+ (a1,a2,a3,a4,a5, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6, class Var>
+inline
+detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var)
+{
+ return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> >
+ ( detail::group7<T1,T2,T3,T4,T5,T6, Var const&>
+ (a1,a2,a3,a4,a5,a6, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var>
+inline
+detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var)
+{
+ return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> >
+ ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&>
+ (a1,a2,a3,a4,a5,a6,a7, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var>
+inline
+detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var)
+{
+ return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> >
+ ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&>
+ (a1,a2,a3,a4,a5,a6,a7,a8, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var>
+inline
+detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var)
+{
+ return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> >
+ ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&>
+ (a1,a2,a3,a4,a5,a6,a7,a8,a9, var)
+ );
+}
+
+
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
+
+template <class T1, class Var>
+inline
+detail::group1< detail::group2<T1, Var&> >
+ group(T1 a1, Var& var)
+{
+ return detail::group1< detail::group2<T1, Var&> >
+ ( detail::group2<T1, Var&>
+ (a1, var)
+ );
+}
+
+template <class T1,class T2, class Var>
+inline
+detail::group1< detail::group3<T1,T2, Var&> >
+ group(T1 a1,T2 a2, Var& var)
+{
+ return detail::group1< detail::group3<T1,T2, Var&> >
+ ( detail::group3<T1,T2, Var&>
+ (a1,a2, var)
+ );
+}
+
+template <class T1,class T2,class T3, class Var>
+inline
+detail::group1< detail::group4<T1,T2,T3, Var&> >
+ group(T1 a1,T2 a2,T3 a3, Var& var)
+{
+ return detail::group1< detail::group4<T1,T2,T3, Var&> >
+ ( detail::group4<T1,T2,T3, Var&>
+ (a1,a2,a3, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4, class Var>
+inline
+detail::group1< detail::group5<T1,T2,T3,T4, Var&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var)
+{
+ return detail::group1< detail::group5<T1,T2,T3,T4, Var&> >
+ ( detail::group5<T1,T2,T3,T4, Var&>
+ (a1,a2,a3,a4, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5, class Var>
+inline
+detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var)
+{
+ return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> >
+ ( detail::group6<T1,T2,T3,T4,T5, Var&>
+ (a1,a2,a3,a4,a5, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6, class Var>
+inline
+detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var)
+{
+ return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> >
+ ( detail::group7<T1,T2,T3,T4,T5,T6, Var&>
+ (a1,a2,a3,a4,a5,a6, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var>
+inline
+detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var)
+{
+ return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> >
+ ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&>
+ (a1,a2,a3,a4,a5,a6,a7, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var>
+inline
+detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var)
+{
+ return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> >
+ ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&>
+ (a1,a2,a3,a4,a5,a6,a7,a8, var)
+ );
+}
+
+template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var>
+inline
+detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> >
+ group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var)
+{
+ return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> >
+ ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&>
+ (a1,a2,a3,a4,a5,a6,a7,a8,a9, var)
+ );
+}
+
+
+#endif // - BOOST_NO_OVERLOAD_FOR_NON_CONST
+
+
+} // namespace io
+
+} // namespace boost
+
+
+#endif // BOOST_FORMAT_GROUP_HPP
diff --git a/3rdParty/Boost/src/boost/format/internals.hpp b/3rdParty/Boost/src/boost/format/internals.hpp
new file mode 100644
index 0000000..b0d874a
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/internals.hpp
@@ -0,0 +1,201 @@
+// ----------------------------------------------------------------------------
+// internals.hpp : internal structs : stream_format_state, format_item.
+// included by format.hpp
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_INTERNALS_HPP
+#define BOOST_FORMAT_INTERNALS_HPP
+
+
+#include <string>
+#include <boost/assert.hpp>
+#include <boost/optional.hpp>
+#include <boost/limits.hpp>
+#include <boost/format/detail/compat_workarounds.hpp>
+#include <boost/format/alt_sstream.hpp> // used as a dummy stream
+
+namespace boost {
+namespace io {
+namespace detail {
+
+
+//---- stream_format_state --------------------------------------------------//
+
+// set of params that define the format state of a stream
+ template<class Ch, class Tr>
+ struct stream_format_state
+ {
+ typedef BOOST_IO_STD basic_ios<Ch, Tr> basic_ios;
+
+ stream_format_state(Ch fill) { reset(fill); }
+// stream_format_state(const basic_ios& os) { set_by_stream(os); }
+
+ void reset(Ch fill); //- sets to default state.
+ void set_by_stream(const basic_ios& os); //- sets to os's state.
+ void apply_on(basic_ios & os, //- applies format_state to the stream
+ boost::io::detail::locale_t * loc_default = 0) const;
+ template<class T>
+ void apply_manip(T manipulator) //- modifies state by applying manipulator
+ { apply_manip_body<Ch, Tr, T>( *this, manipulator) ; }
+
+ // --- data ---
+ std::streamsize width_;
+ std::streamsize precision_;
+ Ch fill_;
+ std::ios_base::fmtflags flags_;
+ std::ios_base::iostate rdstate_;
+ std::ios_base::iostate exceptions_;
+ boost::optional<boost::io::detail::locale_t> loc_;
+ };
+
+
+//---- format_item ---------------------------------------------------------//
+
+// stores all parameters that can be specified in format strings
+ template<class Ch, class Tr, class Alloc>
+ struct format_item
+ {
+ enum pad_values { zeropad = 1, spacepad =2, centered=4, tabulation = 8 };
+ // 1. if zeropad is set, all other bits are not,
+ // 2. if tabulation is set, all others are not.
+ // centered and spacepad can be mixed freely.
+ enum arg_values { argN_no_posit = -1, // non-positional directive. will set argN later
+ argN_tabulation = -2, // tabulation directive. (no argument read)
+ argN_ignored = -3 // ignored directive. (no argument read)
+ };
+ typedef BOOST_IO_STD basic_ios<Ch, Tr> basic_ios;
+ typedef detail::stream_format_state<Ch, Tr> stream_format_state;
+ typedef ::std::basic_string<Ch, Tr, Alloc> string_type;
+
+ format_item(Ch fill) :argN_(argN_no_posit), fmtstate_(fill),
+ truncate_(max_streamsize()), pad_scheme_(0) {}
+ void reset(Ch fill);
+ void compute_states(); // sets states according to truncate and pad_scheme.
+
+ static std::streamsize max_streamsize() {
+ return (std::numeric_limits<std::streamsize>::max)();
+ }
+
+ // --- data ---
+ int argN_; //- argument number (starts at 0, eg : %1 => argN=0)
+ // negative values for items that don't process an argument
+ string_type res_; //- result of the formatting of this item
+ string_type appendix_; //- piece of string between this item and the next
+
+ stream_format_state fmtstate_;// set by parsing, is only affected by modify_item
+
+ std::streamsize truncate_;//- is set for directives like %.5s that ask truncation
+ unsigned int pad_scheme_;//- several possible padding schemes can mix. see pad_values
+ };
+
+
+
+//--- Definitions ------------------------------------------------------------
+
+// - stream_format_state:: -------------------------------------------------
+ template<class Ch, class Tr>
+ void stream_format_state<Ch,Tr>:: apply_on (basic_ios & os,
+ boost::io::detail::locale_t * loc_default) const {
+ // set the state of this stream according to our params
+ if(width_ != -1)
+ os.width(width_);
+ if(precision_ != -1)
+ os.precision(precision_);
+ if(fill_ != 0)
+ os.fill(fill_);
+ os.flags(flags_);
+ os.clear(rdstate_);
+ os.exceptions(exceptions_);
+#if !defined(BOOST_NO_STD_LOCALE)
+ if(loc_)
+ os.imbue(loc_.get());
+ else if(loc_default)
+ os.imbue(*loc_default);
+#else
+ (void) loc_default; // keep compiler quiet if we don't support locales
+#endif
+ }
+
+ template<class Ch, class Tr>
+ void stream_format_state<Ch,Tr>:: set_by_stream(const basic_ios& os) {
+ // set our params according to the state of this stream
+ flags_ = os.flags();
+ width_ = os.width();
+ precision_ = os.precision();
+ fill_ = os.fill();
+ rdstate_ = os.rdstate();
+ exceptions_ = os.exceptions();
+ }
+
+
+ template<class Ch, class Tr, class T>
+ void apply_manip_body( stream_format_state<Ch, Tr>& self,
+ T manipulator) {
+ // modify our params according to the manipulator
+ basic_oaltstringstream<Ch, Tr> ss;
+ self.apply_on( ss );
+ ss << manipulator;
+ self.set_by_stream( ss );
+ }
+
+ template<class Ch, class Tr> inline
+ void stream_format_state<Ch,Tr>:: reset(Ch fill) {
+ // set our params to standard's default state. cf 27.4.4.1 of the C++ norm
+ width_=0; precision_=6;
+ fill_=fill; // default is widen(' '), but we cant compute it without the locale
+ flags_ = std::ios_base::dec | std::ios_base::skipws;
+ // the adjust_field part is left equal to 0, which means right.
+ exceptions_ = std::ios_base::goodbit;
+ rdstate_ = std::ios_base::goodbit;
+ }
+
+
+// --- format_item:: --------------------------------------------------------
+
+ template<class Ch, class Tr, class Alloc>
+ void format_item<Ch, Tr, Alloc>::
+ reset (Ch fill) {
+ argN_=argN_no_posit; truncate_ = max_streamsize(); pad_scheme_ =0;
+ res_.resize(0); appendix_.resize(0);
+ fmtstate_.reset(fill);
+ }
+
+ template<class Ch, class Tr, class Alloc>
+ void format_item<Ch, Tr, Alloc>::
+ compute_states() {
+ // reflect pad_scheme_ on fmt_state_
+ // because some pad_schemes has complex consequences on several state params.
+ if(pad_scheme_ & zeropad) {
+ // ignore zeropad in left alignment :
+ if(fmtstate_.flags_ & std::ios_base::left) {
+ BOOST_ASSERT(!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left)));
+ // only left bit might be set. (not right, nor internal)
+ pad_scheme_ = pad_scheme_ & (~zeropad);
+ }
+ else {
+ pad_scheme_ &= ~spacepad; // printf ignores spacepad when zeropadding
+ fmtstate_.fill_='0';
+ fmtstate_.flags_ = (fmtstate_.flags_ & ~std::ios_base::adjustfield)
+ | std::ios_base::internal;
+ // removes all adjustfield bits, and adds internal.
+ }
+ }
+ if(pad_scheme_ & spacepad) {
+ if(fmtstate_.flags_ & std::ios_base::showpos)
+ pad_scheme_ &= ~spacepad;
+ }
+ }
+
+
+} } } // namespaces boost :: io :: detail
+
+
+#endif // BOOST_FORMAT_INTERNALS_HPP
diff --git a/3rdParty/Boost/src/boost/format/internals_fwd.hpp b/3rdParty/Boost/src/boost/format/internals_fwd.hpp
new file mode 100644
index 0000000..e44eb3c
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/internals_fwd.hpp
@@ -0,0 +1,60 @@
+// ----------------------------------------------------------------------------
+// internals_fwd.hpp : forward declarations, for internal headers
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_INTERNAL_FWD_HPP
+#define BOOST_FORMAT_INTERNAL_FWD_HPP
+
+#include <boost/format/format_fwd.hpp>
+#include <boost/config.hpp>
+
+
+namespace boost {
+namespace io {
+
+namespace detail {
+ template<class Ch, class Tr> struct stream_format_state;
+ template<class Ch, class Tr, class Alloc> struct format_item;
+
+
+ // these functions were intended as methods,
+ // but MSVC have problems with template member functions :
+ // defined in format_implementation.hpp :
+ template<class Ch, class Tr, class Alloc, class T>
+ basic_format<Ch, Tr, Alloc>&
+ modify_item_body (basic_format<Ch, Tr, Alloc>& self,
+ int itemN, T manipulator);
+
+ template<class Ch, class Tr, class Alloc, class T>
+ basic_format<Ch, Tr, Alloc>&
+ bind_arg_body (basic_format<Ch, Tr, Alloc>& self,
+ int argN, const T& val);
+
+ // in internals.hpp :
+ template<class Ch, class Tr, class T>
+ void apply_manip_body (stream_format_state<Ch, Tr>& self,
+ T manipulator);
+
+ // argument feeding (defined in feed_args.hpp ) :
+ template<class Ch, class Tr, class Alloc, class T>
+ void distribute (basic_format<Ch,Tr, Alloc>& self, T x);
+
+ template<class Ch, class Tr, class Alloc, class T>
+ basic_format<Ch, Tr, Alloc>&
+ feed (basic_format<Ch,Tr, Alloc>& self, T x);
+
+} // namespace detail
+
+} // namespace io
+} // namespace boost
+
+
+#endif // BOOST_FORMAT_INTERNAL_FWD_HPP
diff --git a/3rdParty/Boost/src/boost/format/parsing.hpp b/3rdParty/Boost/src/boost/format/parsing.hpp
new file mode 100644
index 0000000..b14ca82
--- /dev/null
+++ b/3rdParty/Boost/src/boost/format/parsing.hpp
@@ -0,0 +1,504 @@
+// ----------------------------------------------------------------------------
+// parsing.hpp : implementation of the parsing member functions
+// ( parse, parse_printf_directive)
+// ----------------------------------------------------------------------------
+
+// Copyright Samuel Krempp 2003. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// see http://www.boost.org/libs/format for library home page
+
+// ----------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_PARSING_HPP
+#define BOOST_FORMAT_PARSING_HPP
+
+
+#include <boost/format/format_class.hpp>
+#include <boost/format/exceptions.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/assert.hpp>
+
+
+namespace boost {
+namespace io {
+namespace detail {
+
+#if defined(BOOST_NO_STD_LOCALE)
+ // streams will be used for narrow / widen. but these methods are not const
+ template<class T>
+ T& const_or_not(const T& x) {
+ return const_cast<T&> (x);
+ }
+#else
+ template<class T>
+ const T& const_or_not(const T& x) {
+ return x;
+ }
+#endif
+
+ template<class Ch, class Facet> inline
+ char wrap_narrow(const Facet& fac, Ch c, char deflt) {
+ return const_or_not(fac).narrow(c, deflt);
+ }
+
+ template<class Ch, class Facet> inline
+ bool wrap_isdigit(const Facet& fac, Ch c) {
+#if ! defined( BOOST_NO_LOCALE_ISDIGIT )
+ return fac.is(std::ctype<Ch>::digit, c);
+# else
+ (void) fac; // remove "unused parameter" warning
+ using namespace std;
+ return isdigit(c);
+#endif
+ }
+
+ template<class Iter, class Facet>
+ Iter wrap_scan_notdigit(const Facet & fac, Iter beg, Iter end) {
+ using namespace std;
+ for( ; beg!=end && wrap_isdigit(fac, *beg); ++beg) ;
+ return beg;
+ }
+
+
+ // Input : [start, last) iterators range and a
+ // a Facet to use its widen/narrow member function
+ // Effects : read sequence and convert digits into integral n, of type Res
+ // Returns : n
+ template<class Res, class Iter, class Facet>
+ Iter str2int (const Iter & start, const Iter & last, Res & res,
+ const Facet& fac)
+ {
+ using namespace std;
+ Iter it;
+ res=0;
+ for(it=start; it != last && wrap_isdigit(fac, *it); ++it ) {
+ char cur_ch = wrap_narrow(fac, *it, 0); // cant fail.
+ res *= 10;
+ res += cur_ch - '0'; // 22.2.1.1.2.13 of the C++ standard
+ }
+ return it;
+ }
+
+ // skip printf's "asterisk-fields" directives in the format-string buf
+ // Input : char string, with starting index *pos_p
+ // a Facet merely to use its widen/narrow member function
+ // Effects : advance *pos_p by skipping printf's asterisk fields.
+ // Returns : nothing
+ template<class Iter, class Facet>
+ Iter skip_asterisk(Iter start, Iter last, const Facet& fac)
+ {
+ using namespace std;
+ ++ start;
+ start = wrap_scan_notdigit(fac, start, last);
+ if(start!=last && *start== const_or_not(fac).widen( '$') )
+ ++start;
+ return start;
+ }
+
+
+ // auxiliary func called by parse_printf_directive
+ // for centralising error handling
+ // it either throws if user sets the corresponding flag, or does nothing.
+ inline void maybe_throw_exception(unsigned char exceptions,
+ std::size_t pos, std::size_t size)
+ {
+ if(exceptions & io::bad_format_string_bit)
+ boost::throw_exception(io::bad_format_string(pos, size) );
+ }
+
+
+ // Input: the position of a printf-directive in the format-string
+ // a basic_ios& merely to use its widen/narrow member function
+ // a bitset'exceptions' telling whether to throw exceptions on errors.
+ // Returns:
+ // true if parse succeeded (ignore some errors if exceptions disabled)
+ // false if it failed so bad that the directive should be printed verbatim
+ // Effects:
+ // start is incremented so that *start is the first char after
+ // this directive
+ // *fpar is set with the parameters read in the directive
+ template<class Ch, class Tr, class Alloc, class Iter, class Facet>
+ bool parse_printf_directive(Iter & start, const Iter& last,
+ detail::format_item<Ch, Tr, Alloc> * fpar,
+ const Facet& fac,
+ std::size_t offset, unsigned char exceptions)
+ {
+ typedef typename basic_format<Ch, Tr, Alloc>::format_item_t format_item_t;
+
+ fpar->argN_ = format_item_t::argN_no_posit; // if no positional-directive
+ bool precision_set = false;
+ bool in_brackets=false;
+ Iter start0 = start;
+ std::size_t fstring_size = last-start0+offset;
+
+ if(start>= last) { // empty directive : this is a trailing %
+ maybe_throw_exception(exceptions, start-start0 + offset, fstring_size);
+ return false;
+ }
+
+ if(*start== const_or_not(fac).widen( '|')) {
+ in_brackets=true;
+ if( ++start >= last ) {
+ maybe_throw_exception(exceptions, start-start0 + offset, fstring_size);
+ return false;
+ }
+ }
+
+ // the flag '0' would be picked as a digit for argument order, but here it's a flag :
+ if(*start== const_or_not(fac).widen( '0'))
+ goto parse_flags;
+
+ // handle argument order (%2$d) or possibly width specification: %2d
+ if(wrap_isdigit(fac, *start)) {
+ int n;
+ start = str2int(start, last, n, fac);
+ if( start >= last ) {
+ maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ return false;
+ }
+
+ // %N% case : this is already the end of the directive
+ if( *start == const_or_not(fac).widen( '%') ) {
+ fpar->argN_ = n-1;
+ ++start;
+ if( in_brackets)
+ maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ // but don't return. maybe "%" was used in lieu of '$', so we go on.
+ else
+ return true;
+ }
+
+ if ( *start== const_or_not(fac).widen( '$') ) {
+ fpar->argN_ = n-1;
+ ++start;
+ }
+ else {
+ // non-positionnal directive
+ fpar->fmtstate_.width_ = n;
+ fpar->argN_ = format_item_t::argN_no_posit;
+ goto parse_precision;
+ }
+ }
+
+ parse_flags:
+ // handle flags
+ while ( start != last) { // as long as char is one of + - = _ # 0 l h or ' '
+ // misc switches
+ switch ( wrap_narrow(fac, *start, 0)) {
+ case '\'' : break; // no effect yet. (painful to implement)
+ case 'l':
+ case 'h': // short/long modifier : for printf-comaptibility (no action needed)
+ break;
+ case '-':
+ fpar->fmtstate_.flags_ |= std::ios_base::left;
+ break;
+ case '=':
+ fpar->pad_scheme_ |= format_item_t::centered;
+ break;
+ case '_':
+ fpar->fmtstate_.flags_ |= std::ios_base::internal;
+ break;
+ case ' ':
+ fpar->pad_scheme_ |= format_item_t::spacepad;
+ break;
+ case '+':
+ fpar->fmtstate_.flags_ |= std::ios_base::showpos;
+ break;
+ case '0':
+ fpar->pad_scheme_ |= format_item_t::zeropad;
+ // need to know alignment before really setting flags,
+ // so just add 'zeropad' flag for now, it will be processed later.
+ break;
+ case '#':
+ fpar->fmtstate_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase;
+ break;
+ default:
+ goto parse_width;
+ }
+ ++start;
+ } // loop on flag.
+
+ if( start>=last) {
+ maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ return true;
+ }
+ parse_width:
+ // handle width spec
+ // first skip 'asterisk fields' : *, or *N$
+ if(*start == const_or_not(fac).widen( '*') )
+ start = skip_asterisk(start, last, fac);
+ if(start!=last && wrap_isdigit(fac, *start))
+ start = str2int(start, last, fpar->fmtstate_.width_, fac);
+
+ parse_precision:
+ if( start>= last) {
+ maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ return true;
+ }
+ // handle precision spec
+ if (*start== const_or_not(fac).widen( '.')) {
+ ++start;
+ if(start != last && *start == const_or_not(fac).widen( '*') )
+ start = skip_asterisk(start, last, fac);
+ if(start != last && wrap_isdigit(fac, *start)) {
+ start = str2int(start, last, fpar->fmtstate_.precision_, fac);
+ precision_set = true;
+ }
+ else
+ fpar->fmtstate_.precision_ =0;
+ }
+
+ // handle formatting-type flags :
+ while( start != last && ( *start== const_or_not(fac).widen( 'l')
+ || *start== const_or_not(fac).widen( 'L')
+ || *start== const_or_not(fac).widen( 'h')) )
+ ++start;
+ if( start>=last) {
+ maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ return true;
+ }
+
+ if( in_brackets && *start== const_or_not(fac).widen( '|') ) {
+ ++start;
+ return true;
+ }
+ switch ( wrap_narrow(fac, *start, 0) ) {
+ case 'X':
+ fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
+ case 'p': // pointer => set hex.
+ case 'x':
+ fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
+ fpar->fmtstate_.flags_ |= std::ios_base::hex;
+ break;
+
+ case 'o':
+ fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
+ fpar->fmtstate_.flags_ |= std::ios_base::oct;
+ break;
+
+ case 'E':
+ fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
+ case 'e':
+ fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
+ fpar->fmtstate_.flags_ |= std::ios_base::scientific;
+
+ fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
+ fpar->fmtstate_.flags_ |= std::ios_base::dec;
+ break;
+
+ case 'f':
+ fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
+ fpar->fmtstate_.flags_ |= std::ios_base::fixed;
+ case 'u':
+ case 'd':
+ case 'i':
+ fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
+ fpar->fmtstate_.flags_ |= std::ios_base::dec;
+ break;
+
+ case 'T':
+ ++start;
+ if( start >= last)
+ maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ else
+ fpar->fmtstate_.fill_ = *start;
+ fpar->pad_scheme_ |= format_item_t::tabulation;
+ fpar->argN_ = format_item_t::argN_tabulation;
+ break;
+ case 't':
+ fpar->fmtstate_.fill_ = const_or_not(fac).widen( ' ');
+ fpar->pad_scheme_ |= format_item_t::tabulation;
+ fpar->argN_ = format_item_t::argN_tabulation;
+ break;
+
+ case 'G':
+ fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
+ break;
+ case 'g': // 'g' conversion is default for floats.
+ fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
+ fpar->fmtstate_.flags_ |= std::ios_base::dec;
+
+ // CLEAR all floatield flags, so stream will CHOOSE
+ fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
+ break;
+
+ case 'C':
+ case 'c':
+ fpar->truncate_ = 1;
+ break;
+ case 'S':
+ case 's':
+ if(precision_set) // handle truncation manually, with own parameter.
+ fpar->truncate_ = fpar->fmtstate_.precision_;
+ fpar->fmtstate_.precision_ = 6; // default stream precision.
+ break;
+ case 'n' :
+ fpar->argN_ = format_item_t::argN_ignored;
+ break;
+ default:
+ maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ }
+ ++start;
+
+ if( in_brackets ) {
+ if( start != last && *start== const_or_not(fac).widen( '|') ) {
+ ++start;
+ return true;
+ }
+ else maybe_throw_exception(exceptions, start-start0+offset, fstring_size);
+ }
+ return true;
+ }
+ // -end parse_printf_directive()
+
+ template<class String, class Facet>
+ int upper_bound_from_fstring(const String& buf,
+ const typename String::value_type arg_mark,
+ const Facet& fac,
+ unsigned char exceptions)
+ {
+ // quick-parsing of the format-string to count arguments mark (arg_mark, '%')
+ // returns : upper bound on the number of format items in the format strings
+ using namespace boost::io;
+ typename String::size_type i1=0;
+ int num_items=0;
+ while( (i1=buf.find(arg_mark,i1)) != String::npos ) {
+ if( i1+1 >= buf.size() ) {
+ if(exceptions & bad_format_string_bit)
+ boost::throw_exception(bad_format_string(i1, buf.size() )); // must not end in ".. %"
+ else {
+ ++num_items;
+ break;
+ }
+ }
+ if(buf[i1+1] == buf[i1] ) {// escaped "%%"
+ i1+=2; continue;
+ }
+
+ ++i1;
+ // in case of %N% directives, dont count it double (wastes allocations..) :
+ i1 = detail::wrap_scan_notdigit(fac, buf.begin()+i1, buf.end()) - buf.begin();
+ if( i1 < buf.size() && buf[i1] == arg_mark )
+ ++i1;
+ ++num_items;
+ }
+ return num_items;
+ }
+ template<class String> inline
+ void append_string(String& dst, const String& src,
+ const typename String::size_type beg,
+ const typename String::size_type end) {
+#if !defined(BOOST_NO_STRING_APPEND)
+ dst.append(src.begin()+beg, src.begin()+end);
+#else
+ dst += src.substr(beg, end-beg);
+#endif
+ }
+
+} // detail namespace
+} // io namespace
+
+
+
+// -----------------------------------------------
+// format :: parse(..)
+
+ template<class Ch, class Tr, class Alloc>
+ basic_format<Ch, Tr, Alloc>& basic_format<Ch, Tr, Alloc>::
+ parse (const string_type& buf) {
+ // parse the format-string
+ using namespace std;
+#if !defined(BOOST_NO_STD_LOCALE)
+ const std::ctype<Ch> & fac = BOOST_USE_FACET( std::ctype<Ch>, getloc());
+#else
+ io::basic_oaltstringstream<Ch, Tr, Alloc> fac;
+ //has widen and narrow even on compilers without locale
+#endif
+
+ const Ch arg_mark = io::detail::const_or_not(fac).widen( '%');
+ bool ordered_args=true;
+ int max_argN=-1;
+
+ // A: find upper_bound on num_items and allocates arrays
+ int num_items = io::detail::upper_bound_from_fstring(buf, arg_mark, fac, exceptions());
+ make_or_reuse_data(num_items);
+
+ // B: Now the real parsing of the format string :
+ num_items=0;
+ typename string_type::size_type i0=0, i1=0;
+ typename string_type::const_iterator it;
+ bool special_things=false;
+ int cur_item=0;
+ while( (i1=buf.find(arg_mark,i1)) != string_type::npos ) {
+ string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_;
+ if( buf[i1+1] == buf[i1] ) { // escaped mark, '%%'
+ io::detail::append_string(piece, buf, i0, i1+1);
+ i1+=2; i0=i1;
+ continue;
+ }
+ BOOST_ASSERT( static_cast<unsigned int>(cur_item) < items_.size() || cur_item==0);
+
+ if(i1!=i0) {
+ io::detail::append_string(piece, buf, i0, i1);
+ i0=i1;
+ }
+ ++i1;
+ it = buf.begin()+i1;
+ bool parse_ok = io::detail::parse_printf_directive(
+ it, buf.end(), &items_[cur_item], fac, i1, exceptions());
+ i1 = it - buf.begin();
+ if( ! parse_ok ) // the directive will be printed verbatim
+ continue;
+ i0=i1;
+ items_[cur_item].compute_states(); // process complex options, like zeropad, into params
+
+ int argN=items_[cur_item].argN_;
+ if(argN == format_item_t::argN_ignored)
+ continue;
+ if(argN ==format_item_t::argN_no_posit)
+ ordered_args=false;
+ else if(argN == format_item_t::argN_tabulation) special_things=true;
+ else if(argN > max_argN) max_argN = argN;
+ ++num_items;
+ ++cur_item;
+ } // loop on %'s
+ BOOST_ASSERT(cur_item == num_items);
+
+ // store the final piece of string
+ {
+ string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_;
+ io::detail::append_string(piece, buf, i0, buf.size());
+ }
+
+ if( !ordered_args) {
+ if(max_argN >= 0 ) { // dont mix positional with non-positionnal directives
+ if(exceptions() & io::bad_format_string_bit)
+ boost::throw_exception(io::bad_format_string(max_argN, 0));
+ // else do nothing. => positionnal arguments are processed as non-positionnal
+ }
+ // set things like it would have been with positional directives :
+ int non_ordered_items = 0;
+ for(int i=0; i< num_items; ++i)
+ if(items_[i].argN_ == format_item_t::argN_no_posit) {
+ items_[i].argN_ = non_ordered_items;
+ ++non_ordered_items;
+ }
+ max_argN = non_ordered_items-1;
+ }
+
+ // C: set some member data :
+ items_.resize(num_items, format_item_t(io::detail::const_or_not(fac).widen( ' ')) );
+
+ if(special_things) style_ |= special_needs;
+ num_args_ = max_argN + 1;
+ if(ordered_args) style_ |= ordered;
+ else style_ &= ~ordered;
+ return *this;
+ }
+
+} // namespace boost
+
+
+#endif // BOOST_FORMAT_PARSING_HPP
diff --git a/3rdParty/Boost/update.sh b/3rdParty/Boost/update.sh
index 4be35df..9af5258 100755
--- a/3rdParty/Boost/update.sh
+++ b/3rdParty/Boost/update.sh
@@ -32,6 +32,7 @@ fi
regex.hpp \
boost/unordered_map.hpp \
boost/algorithm/string.hpp \
+ boost/format.hpp \
$TARGET_DIR
rm -rf $TARGET_DIR/libs/config
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 86ec719..69dbe19 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -281,6 +281,8 @@ if int(ARGUMENTS.get("V", 0)) == 0:
env["QT4_UICCOMSTR"] = colorize("UIC", "$TARGET", "blue")
env["QT4_MOCFROMHCOMSTR"] = colorize("MOC", "$TARGET", "blue")
env["QT4_MOCFROMCXXCOMSTR"] = colorize("MOC", "$TARGET", "blue")
+ env["QT4_LRELEASECOMSTR"] = colorize("LRELEASE", "$TARGET", "blue")
+ env["QT4_LUPDATECOMSTR"] = colorize("LUPDATE", "$TARGET", "blue")
env["GENCOMSTR"] = colorize("GEN", "$TARGET", "blue")
env["RCCOMSTR"] = colorize("RC", "$TARGET", "blue")
env["BUNDLECOMSTR"] = colorize("BUNDLE", "$TARGET", "blue")
diff --git a/BuildTools/SCons/Tools/AppBundle.py b/BuildTools/SCons/Tools/AppBundle.py
index 92ab814..c271575 100644
--- a/BuildTools/SCons/Tools/AppBundle.py
+++ b/BuildTools/SCons/Tools/AppBundle.py
@@ -1,4 +1,4 @@
-import SCons.Util
+import SCons.Util, os.path
def generate(env) :
def createAppBundle(env, bundle, version = "1.0", resources = [], frameworks = [], info = {}) :
@@ -37,8 +37,8 @@ def generate(env) :
"""
env.WriteVal(bundleContentsDir + "/Info.plist", env.Value(plist))
- for resource in resources :
- env.Install(resourcesDir, resource)
+ for (target, resource) in resources.items() :
+ env.Install(os.path.join(resourcesDir, target), resource)
for framework in frameworks :
env.Install(frameworksDir, framework)
diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py
index e735fe9..0f2e976 100644
--- a/BuildTools/SCons/Tools/qt4.py
+++ b/BuildTools/SCons/Tools/qt4.py
@@ -291,7 +291,7 @@ def generate(env):
'$QT4_MOC $QT4_MOCFROMCXXFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
Action(checkMocIncluded,None)],
QT4_LUPDATECOM = '$QT4_LUPDATE $SOURCE -ts $TARGET',
- QT4_LRELEASECOM = '$QT4_LRELEASE $SOURCE',
+ QT4_LRELEASECOM = '$QT4_LRELEASE -silent $SOURCE -qm $TARGET',
QT4_RCCCOM = '$QT4_RCC $QT4_QRCFLAGS -name $SOURCE $SOURCE -o $TARGET',
)
if len(env["QTDIR"]) > 0 :
@@ -304,7 +304,7 @@ def generate(env):
)
env.Append( BUILDERS = { 'Ts': tsbuilder } )
qmbuilder = Builder(
- action = SCons.Action.Action('$QT4_LRELEASECOM'),# , '$QT4_LRELEASECOMSTR'),
+ action = SCons.Action.Action('$QT4_LRELEASECOM', cmdstr = '$QT4_LRELEASECOMSTR'),
src_suffix = '.ts',
suffix = '.qm',
single_source = True
diff --git a/Slimber/Cocoa/SConscript b/Slimber/Cocoa/SConscript
index 01dff1b..e2d8221 100644
--- a/Slimber/Cocoa/SConscript
+++ b/Slimber/Cocoa/SConscript
@@ -21,7 +21,7 @@ myenv.Program("Slimber", [
myenv.Nib("MainMenu")
-myenv.AppBundle("Slimber", resources = [
+myenv.AppBundle("Slimber", resources = { "": [
"MainMenu.nib",
"../Resources/Slimber.icns",
"../Resources/Credits.html",
@@ -29,7 +29,7 @@ myenv.AppBundle("Slimber", resources = [
"../Resources/Offline.png",
"../Resources/UsersOnline.png",
"../Resources/UsersOffline.png"
- ], info = {
+ ]}, info = {
"NSMainNibFile" : "MainMenu",
"LSUIElement" : "1",
})
diff --git a/Slimber/Qt/SConscript b/Slimber/Qt/SConscript
index cd77950..c71d480 100644
--- a/Slimber/Qt/SConscript
+++ b/Slimber/Qt/SConscript
@@ -44,7 +44,7 @@ else :
if env["PLATFORM"] == "win32" :
if "dist" in COMMAND_LINE_TARGETS or env.GetOption("clean") :
- myenv.WindowsBundle("Slimber", resources = [], qtlibs = ["QtCore4", "QtGui4"])
+ myenv.WindowsBundle("Slimber", resources = {}, qtlibs = ["QtCore4", "QtGui4"])
myenv.Append(NSIS_OPTIONS = [
"/DmsvccRedistributableDir=\"" + env["vcredist"] + "\"",
"/DbuildDate=" + datetime.date.today().strftime("%Y%m%d")
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index e4ad9c8..6e7825f 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -9,6 +9,8 @@
#include <boost/bind.hpp>
#include <stdio.h>
+#include <Swift/Controllers/Intl.h>
+#include <Swiften/Base/format.h>
#include "Swiften/Avatars/AvatarManager.h"
#include "Swiften/Chat/ChatStateNotifier.h"
#include "Swiften/Chat/ChatStateTracker.h"
@@ -18,6 +20,7 @@
#include "Swift/Controllers/UIInterfaces/ChatWindowFactory.h"
#include "Swiften/Client/NickResolver.h"
#include "Swift/Controllers/XMPPEvents/EventController.h"
+#include <Swift/Controllers/StatusUtil.h>
namespace Swift {
@@ -37,16 +40,16 @@ ChatController::ChatController(const JID& self, StanzaChannel* stanzaChannel, IQ
nickResolver_->onNickChanged.connect(boost::bind(&ChatController::handleContactNickChanged, this, _1, _2));
std::string nick = nickResolver_->jidToNick(toJID_);
chatWindow_->setName(nick);
- std::string startMessage("Starting chat with " + nick);
+ std::string startMessage;
Presence::ref theirPresence;
if (isInMUC) {
- startMessage += " in chatroom " + contact.toBare().toString();
+ startMessage = str(format(QT_TRANSLATE_NOOP("", "Starting chat with %1% in chatroom %2%")) % nick % contact.toBare().toString());
theirPresence = presenceOracle->getLastPresence(contact);
} else {
- startMessage += " - " + contact.toBare().toString();
+ startMessage = str(format(QT_TRANSLATE_NOOP("", "Starting chat with %1% - %2%")) % nick % contact.toBare().toString());
theirPresence = contact.isBare() ? presenceOracle->getHighestPriorityPresence(contact.toBare()) : presenceOracle->getLastPresence(contact);
}
- startMessage += ": " + StatusShow::typeToFriendlyName(theirPresence ? theirPresence->getShow() : StatusShow::None);
+ startMessage += ": " + statusShowTypeToFriendlyName(theirPresence ? theirPresence->getShow() : StatusShow::None);
if (theirPresence && !theirPresence->getStatus().empty()) {
startMessage += " (" + theirPresence->getStatus() + ")";
}
@@ -109,7 +112,7 @@ void ChatController::preSendMessageRequest(boost::shared_ptr<Message> message) {
}
void ChatController::postSendMessage(const std::string& body, boost::shared_ptr<Stanza> sentStanza) {
- std::string id = addMessage(body, "me", true, labelsEnabled_ ? chatWindow_->getSelectedSecurityLabel() : boost::optional<SecurityLabel>(), std::string(avatarManager_->getAvatarPath(selfJID_).string()), boost::posix_time::microsec_clock::universal_time());
+ std::string id = addMessage(body, QT_TRANSLATE_NOOP("", "me"), true, labelsEnabled_ ? chatWindow_->getSelectedSecurityLabel() : boost::optional<SecurityLabel>(), std::string(avatarManager_->getAvatarPath(selfJID_).string()), boost::posix_time::microsec_clock::universal_time());
if (stanzaChannel_->getStreamManagementEnabled()) {
chatWindow_->setAckState(id, ChatWindow::Pending);
unackedStanzas_[sentStanza] = id;
@@ -148,19 +151,23 @@ std::string ChatController::senderDisplayNameFromMessage(const JID& from) {
std::string ChatController::getStatusChangeString(boost::shared_ptr<Presence> presence) {
std::string nick = senderDisplayNameFromMessage(presence->getFrom());
- std::string response = nick;
+ std::string response;
if (!presence || presence->getType() == Presence::Unavailable || presence->getType() == Presence::Error) {
- response += " has gone offline";
+ response = QT_TRANSLATE_NOOP("", "%1% has gone offline");
} else if (presence->getType() == Presence::Available) {
StatusShow::Type show = presence->getShow();
if (show == StatusShow::Online || show == StatusShow::FFC) {
- response += " has become available";
+ response = QT_TRANSLATE_NOOP("", "%1% has become available");
} else if (show == StatusShow::Away || show == StatusShow::XA) {
- response += " has gone away";
+ response = QT_TRANSLATE_NOOP("", "%1% has gone away");
} else if (show == StatusShow::DND) {
- response += " is now busy";
+ response = QT_TRANSLATE_NOOP("", "%1% is now busy");
}
}
+ if (!response.empty()) {
+ response = str(format(response) % nick);
+ }
+
if (!presence->getStatus().empty()) {
response += " (" + presence->getStatus() + ")";
}
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index f70ec81..a970d88 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -13,6 +13,8 @@
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/algorithm/string.hpp>
+#include <Swift/Controllers/Intl.h>
+#include <Swiften/Base/format.h>
#include "Swiften/Base/String.h"
#include "Swiften/Client/StanzaChannel.h"
#include "Swiften/Elements/Delay.h"
@@ -51,7 +53,7 @@ void ChatControllerBase::createDayChangeTimer() {
void ChatControllerBase::handleDayChangeTick() {
dateChangeTimer_->stop();
boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
- chatWindow_->addSystemMessage("The day is now " + std::string(boost::posix_time::to_iso_extended_string(now)).substr(0,10));
+ chatWindow_->addSystemMessage(str(format(QT_TRANSLATE_NOOP("", "The day is now %1%")) % std::string(boost::posix_time::to_iso_extended_string(now)).substr(0,10)));
dayTicked();
createDayChangeTimer();
}
@@ -188,34 +190,34 @@ void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> m
}
std::string ChatControllerBase::getErrorMessage(boost::shared_ptr<ErrorPayload> error) {
- std::string defaultMessage = "Error sending message";
+ std::string defaultMessage = QT_TRANSLATE_NOOP("", "Error sending message");
if (!error->getText().empty()) {
return error->getText();
}
else {
switch (error->getCondition()) {
- case ErrorPayload::BadRequest: return "Bad request"; break;
- case ErrorPayload::Conflict: return "Conflict"; break;
- case ErrorPayload::FeatureNotImplemented: return "This feature is not implemented"; break;
- case ErrorPayload::Forbidden: return "Forbidden"; break;
- case ErrorPayload::Gone: return "Recipient can no longer be contacted"; break;
- case ErrorPayload::InternalServerError: return "Internal server error"; break;
- case ErrorPayload::ItemNotFound: return "Item not found"; break;
- case ErrorPayload::JIDMalformed: return "JID Malformed"; break;
- case ErrorPayload::NotAcceptable: return "Message was rejected"; break;
- case ErrorPayload::NotAllowed: return "Not allowed"; break;
- case ErrorPayload::NotAuthorized: return "Not authorized"; break;
- case ErrorPayload::PaymentRequired: return "Payment is required"; break;
- case ErrorPayload::RecipientUnavailable: return "Recipient is unavailable."; break;
- case ErrorPayload::Redirect: return "Redirect"; break;
- case ErrorPayload::RegistrationRequired: return "Registration required"; break;
- case ErrorPayload::RemoteServerNotFound: return "Recipient's server not found."; break;
- case ErrorPayload::RemoteServerTimeout: return "Remote server timeout"; break;
- case ErrorPayload::ResourceConstraint: return "The server is low on resources"; break;
- case ErrorPayload::ServiceUnavailable: return "The service is unavailable"; break;
- case ErrorPayload::SubscriptionRequired: return "A subscription is required"; break;
- case ErrorPayload::UndefinedCondition: return "Undefined condition"; break;
- case ErrorPayload::UnexpectedRequest: return "Unexpected request"; break;
+ case ErrorPayload::BadRequest: return QT_TRANSLATE_NOOP("", "Bad request"); break;
+ case ErrorPayload::Conflict: return QT_TRANSLATE_NOOP("", "Conflict"); break;
+ case ErrorPayload::FeatureNotImplemented: return QT_TRANSLATE_NOOP("", "This feature is not implemented"); break;
+ case ErrorPayload::Forbidden: return QT_TRANSLATE_NOOP("", "Forbidden"); break;
+ case ErrorPayload::Gone: return QT_TRANSLATE_NOOP("", "Recipient can no longer be contacted"); break;
+ case ErrorPayload::InternalServerError: return QT_TRANSLATE_NOOP("", "Internal server error"); break;
+ case ErrorPayload::ItemNotFound: return QT_TRANSLATE_NOOP("", "Item not found"); break;
+ case ErrorPayload::JIDMalformed: return QT_TRANSLATE_NOOP("", "JID Malformed"); break;
+ case ErrorPayload::NotAcceptable: return QT_TRANSLATE_NOOP("", "Message was rejected"); break;
+ case ErrorPayload::NotAllowed: return QT_TRANSLATE_NOOP("", "Not allowed"); break;
+ case ErrorPayload::NotAuthorized: return QT_TRANSLATE_NOOP("", "Not authorized"); break;
+ case ErrorPayload::PaymentRequired: return QT_TRANSLATE_NOOP("", "Payment is required"); break;
+ case ErrorPayload::RecipientUnavailable: return QT_TRANSLATE_NOOP("", "Recipient is unavailable"); break;
+ case ErrorPayload::Redirect: return QT_TRANSLATE_NOOP("", "Redirect"); break;
+ case ErrorPayload::RegistrationRequired: return QT_TRANSLATE_NOOP("", "Registration required"); break;
+ case ErrorPayload::RemoteServerNotFound: return QT_TRANSLATE_NOOP("", "Recipient's server not found"); break;
+ case ErrorPayload::RemoteServerTimeout: return QT_TRANSLATE_NOOP("", "Remote server timeout"); break;
+ case ErrorPayload::ResourceConstraint: return QT_TRANSLATE_NOOP("", "The server is low on resources"); break;
+ case ErrorPayload::ServiceUnavailable: return QT_TRANSLATE_NOOP("", "The service is unavailable"); break;
+ case ErrorPayload::SubscriptionRequired: return QT_TRANSLATE_NOOP("", "A subscription is required"); break;
+ case ErrorPayload::UndefinedCondition: return QT_TRANSLATE_NOOP("", "Undefined condition"); break;
+ case ErrorPayload::UnexpectedRequest: return QT_TRANSLATE_NOOP("", "Unexpected request"); break;
}
}
return defaultMessage;
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 765c49d..ce8c946 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -10,6 +10,8 @@
#include <boost/regex.hpp>
#include <boost/algorithm/string.hpp>
+#include <Swift/Controllers/Intl.h>
+#include <Swiften/Base/format.h>
#include "Swiften/Network/Timer.h"
#include "Swiften/Network/TimerFactory.h"
#include "Swiften/Base/foreach.h"
@@ -109,7 +111,7 @@ void MUCController::rejoin() {
void MUCController::handleJoinTimeoutTick() {
receivedActivity();
- chatWindow_->addSystemMessage("Room " + toJID_.toString() + " is not responding. This operation may never complete");
+ chatWindow_->addSystemMessage(str(format(QT_TRANSLATE_NOOP("", "Room %1% is not responding. This operation may never complete.")) % toJID_.toString()));
}
void MUCController::receivedActivity() {
@@ -120,17 +122,38 @@ void MUCController::receivedActivity() {
void MUCController::handleJoinFailed(boost::shared_ptr<ErrorPayload> error) {
receivedActivity();
- std::string errorMessage = "Unable to join this room";
+ std::string errorMessage = QT_TRANSLATE_NOOP("", "Unable to join this room");
std::string rejoinNick;
if (error) {
switch (error->getCondition()) {
- case ErrorPayload::Conflict: rejoinNick = nick_ + "_"; errorMessage += " as " + nick_ + ", retrying as " + rejoinNick; break;
- case ErrorPayload::JIDMalformed: errorMessage += ", no nickname specified";break;
- case ErrorPayload::NotAuthorized: errorMessage += ", a password needed";break;
- case ErrorPayload::RegistrationRequired: errorMessage += ", only members may join"; break;
- case ErrorPayload::Forbidden: errorMessage += ", you are banned from the room"; break;
- case ErrorPayload::ServiceUnavailable: errorMessage += ", the room is full";break;
- case ErrorPayload::ItemNotFound: errorMessage += ", the room does not exist";break;
+ case ErrorPayload::Conflict:
+ rejoinNick = nick_ + "_";
+ errorMessage = str(format(QT_TRANSLATE_NOOP("", "Unable to join this room as %1%, retrying as %2%")) % nick_ % rejoinNick);
+ break;
+ case ErrorPayload::JIDMalformed:
+ errorMessage += ": ";
+ errorMessage += QT_TRANSLATE_NOOP("", "No nickname specified");
+ break;
+ case ErrorPayload::NotAuthorized:
+ errorMessage += ": ";
+ errorMessage += QT_TRANSLATE_NOOP("", "A password needed");
+ break;
+ case ErrorPayload::RegistrationRequired:
+ errorMessage += ": ";
+ errorMessage += QT_TRANSLATE_NOOP("", "Only members may join");
+ break;
+ case ErrorPayload::Forbidden:
+ errorMessage += ": ";
+ errorMessage += QT_TRANSLATE_NOOP("", "You are banned from the room");
+ break;
+ case ErrorPayload::ServiceUnavailable:
+ errorMessage += ": ";
+ errorMessage += QT_TRANSLATE_NOOP("", "The room is full");
+ break;
+ case ErrorPayload::ItemNotFound:
+ errorMessage += ": ";
+ errorMessage += QT_TRANSLATE_NOOP("", "The room does not exist");
+ break;
default: break;
}
@@ -147,7 +170,7 @@ void MUCController::handleJoinFailed(boost::shared_ptr<ErrorPayload> error) {
void MUCController::handleJoinComplete(const std::string& nick) {
receivedActivity();
joined_ = true;
- std::string joinMessage = "You have joined room " + toJID_.toString() + " as " + nick;
+ std::string joinMessage = str(format(QT_TRANSLATE_NOOP("", "You have joined room %1% as %2%")) % toJID_.toString() % nick);
nick_ = nick;
chatWindow_->addSystemMessage(joinMessage);
clearPresenceQueue();
@@ -185,13 +208,14 @@ void MUCController::handleOccupantJoined(const MUCOccupant& occupant) {
appendToJoinParts(joinParts_, event);
roster_->addContact(jid, realJID, occupant.getNick(), roleToGroupName(occupant.getRole()), avatarManager_->getAvatarPath(jid).string());
if (joined_) {
- std::string joinString = occupant.getNick() + " has joined the room";
+ std::string joinString;
MUCOccupant::Role role = occupant.getRole();
if (role != MUCOccupant::NoRole && role != MUCOccupant::Participant) {
- joinString += " as a " + roleToFriendlyName(role);
-
+ joinString = str(format(QT_TRANSLATE_NOOP("", "%1% has joined the room as a %2%.")) % occupant.getNick() % roleToFriendlyName(role));
+ }
+ else {
+ joinString = str(format(QT_TRANSLATE_NOOP("", "%1% has joined the room.")) % occupant.getNick());
}
- joinString += ".";
if (shouldUpdateJoinParts()) {
updateJoinParts();
} else {
@@ -216,9 +240,9 @@ void MUCController::clearPresenceQueue() {
std::string MUCController::roleToFriendlyName(MUCOccupant::Role role) {
switch (role) {
- case MUCOccupant::Moderator: return "moderator";
- case MUCOccupant::Participant: return "participant";
- case MUCOccupant::Visitor: return "visitor";
+ case MUCOccupant::Moderator: return QT_TRANSLATE_NOOP("", "moderator");
+ case MUCOccupant::Participant: return QT_TRANSLATE_NOOP("", "participant");
+ case MUCOccupant::Visitor: return QT_TRANSLATE_NOOP("", "visitor");
case MUCOccupant::NoRole: return "";
}
return "";
@@ -257,7 +281,7 @@ void MUCController::preHandleIncomingMessage(boost::shared_ptr<MessageEvent> mes
joined_ = true;
if (!message->getSubject().empty() && message->getBody().empty()) {
- chatWindow_->addSystemMessage("The room subject is now: " + message->getSubject());
+ chatWindow_->addSystemMessage(str(format(QT_TRANSLATE_NOOP("", "The room subject is now: %1%")) % message->getSubject()));;
doneGettingHistory_ = true;
}
@@ -280,16 +304,16 @@ void MUCController::handleOccupantRoleChanged(const std::string& nick, const MUC
realJID = occupant.getRealJID().get();
}
roster_->addContact(jid, realJID, nick, roleToGroupName(occupant.getRole()), avatarManager_->getAvatarPath(jid).string());
- chatWindow_->addSystemMessage(nick + " is now a " + roleToFriendlyName(occupant.getRole()));
+ chatWindow_->addSystemMessage(str(format(QT_TRANSLATE_NOOP("", "%1% is now a %2%")) % nick % roleToFriendlyName(occupant.getRole())));
}
std::string MUCController::roleToGroupName(MUCOccupant::Role role) {
std::string result;
switch (role) {
- case MUCOccupant::Moderator: result = "Moderators"; break;
- case MUCOccupant::Participant: result = "Participants"; break;
- case MUCOccupant::Visitor: result = "Visitors"; break;
- case MUCOccupant::NoRole: result = "Occupants"; break;
+ case MUCOccupant::Moderator: result = QT_TRANSLATE_NOOP("", "Moderators"); break;
+ case MUCOccupant::Participant: result = QT_TRANSLATE_NOOP("", "Participants"); break;
+ case MUCOccupant::Visitor: result = QT_TRANSLATE_NOOP("", "Visitors"); break;
+ case MUCOccupant::NoRole: result = QT_TRANSLATE_NOOP("", "Occupants"); break;
default: assert(false);
}
return result;
@@ -303,7 +327,7 @@ void MUCController::setOnline(bool online) {
processUserPart();
} else {
if (shouldJoinOnReconnect_) {
- chatWindow_->addSystemMessage("Trying to join room " + toJID_.toString());
+ chatWindow_->addSystemMessage(str(format(QT_TRANSLATE_NOOP("", "Trying to join room %1%")) % toJID_.toString()));
if (loginCheckTimer_) {
loginCheckTimer_->start();
}
@@ -332,7 +356,7 @@ void MUCController::handleOccupantLeft(const MUCOccupant& occupant, MUC::Leaving
appendToJoinParts(joinParts_, event);
currentOccupants_.erase(occupant.getNick());
completer_->removeWord(occupant.getNick());
- std::string partMessage = (occupant.getNick() != nick_) ? occupant.getNick() + " has left the room" : "You have left the room";
+ std::string partMessage = (occupant.getNick() != nick_) ? str(format(QT_TRANSLATE_NOOP("", "%1% has left the room")) % occupant.getNick()) : QT_TRANSLATE_NOOP("", "You have left the room");
if (!reason.empty()) {
partMessage += " (" + reason + ")";
}
@@ -406,7 +430,7 @@ std::string MUCController::concatenateListOfNames(const std::vector<NickJoinPart
if (i < joinParts.size() - 1) {
result += ", ";
} else {
- result += " and ";
+ result += QT_TRANSLATE_NOOP("", " and ");
}
}
NickJoinPart event = joinParts[i];
@@ -424,17 +448,45 @@ std::string MUCController::generateJoinPartString(const std::vector<NickJoinPart
std::string result;
std::vector<JoinPart> populatedEvents;
for (size_t i = 0; i < 4; i++) {
- std::string eventString = concatenateListOfNames(sorted[i]);
- if (!eventString.empty()) {
- std::string haveHas = sorted[i].size() > 1 ? " have" : " has";
+ std::string names = concatenateListOfNames(sorted[i]);
+ if (!names.empty()) {
+ std::string eventString;
switch (i) {
- case Join: eventString += haveHas + " joined";break;
- case Part: eventString += haveHas + " left";break;
- case JoinThenPart: eventString += " joined then left";break;
- case PartThenJoin: eventString += " left then rejoined";break;
+ case Join:
+ if (sorted[i].size() > 1) {
+ eventString = QT_TRANSLATE_NOOP("", "%1% have joined the room");
+ }
+ else {
+ eventString = QT_TRANSLATE_NOOP("", "%1% has joined the room");
+ }
+ break;
+ case Part:
+ if (sorted[i].size() > 1) {
+ eventString = QT_TRANSLATE_NOOP("", "%1% have left the room");
+ }
+ else {
+ eventString = QT_TRANSLATE_NOOP("", "%1% has left the room");
+ }
+ break;
+ case JoinThenPart:
+ if (sorted[i].size() > 1) {
+ eventString = QT_TRANSLATE_NOOP("", "%1% have joined then left the room");
+ }
+ else {
+ eventString = QT_TRANSLATE_NOOP("", "%1% has joined then left the room");
+ }
+ break;
+ case PartThenJoin:
+ if (sorted[i].size() > 1) {
+ eventString = QT_TRANSLATE_NOOP("", "%1% have left then rejoined the room");
+ }
+ else {
+ eventString = QT_TRANSLATE_NOOP("", "%1% has left then rejoined the room");
+ }
+ break;
}
populatedEvents.push_back(static_cast<JoinPart>(i));
- eventStrings[i] = eventString;
+ eventStrings[i] = str(boost::format(eventString) % names);
}
}
for (size_t i = 0; i < populatedEvents.size(); i++) {
@@ -442,12 +494,11 @@ std::string MUCController::generateJoinPartString(const std::vector<NickJoinPart
if (i < populatedEvents.size() - 1) {
result += ", ";
} else {
- result += " and ";
+ result += QT_TRANSLATE_NOOP("", " and ");
}
}
result += eventStrings[populatedEvents[i]];
}
- result += " the room.";
return result;
}
diff --git a/Swift/Controllers/Chat/MUCSearchController.h b/Swift/Controllers/Chat/MUCSearchController.h
index b348886..c8040ed 100644
--- a/Swift/Controllers/Chat/MUCSearchController.h
+++ b/Swift/Controllers/Chat/MUCSearchController.h
@@ -16,7 +16,6 @@
#include "Swiften/JID/JID.h"
#include "Swift/Controllers/UIEvents/UIEvent.h"
-#include "Swift/Controllers/Chat/MUCSearchController.h"
#include "Swift/Controllers/Settings/SettingsProvider.h"
#include "Swiften/Elements/DiscoInfo.h"
#include "Swiften/Elements/DiscoItems.h"
diff --git a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
index 7c7a8b9..e66fa9e 100644
--- a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp
@@ -200,25 +200,25 @@ public:
void testJoinPartStringContructionSimple() {
std::vector<NickJoinPart> list;
list.push_back(NickJoinPart("Kev", Join));
- CPPUNIT_ASSERT_EQUAL(std::string("Kev has joined the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Kev has joined the room"), MUCController::generateJoinPartString(list));
list.push_back(NickJoinPart("Remko", Part));
- CPPUNIT_ASSERT_EQUAL(std::string("Kev has joined and Remko has left the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Kev has joined the room and Remko has left the room"), MUCController::generateJoinPartString(list));
list.push_back(NickJoinPart("Bert", Join));
- CPPUNIT_ASSERT_EQUAL(std::string("Kev and Bert have joined and Remko has left the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Kev and Bert have joined the room and Remko has left the room"), MUCController::generateJoinPartString(list));
list.push_back(NickJoinPart("Ernie", Join));
- CPPUNIT_ASSERT_EQUAL(std::string("Kev, Bert and Ernie have joined and Remko has left the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Kev, Bert and Ernie have joined the room and Remko has left the room"), MUCController::generateJoinPartString(list));
}
void testJoinPartStringContructionMixed() {
std::vector<NickJoinPart> list;
list.push_back(NickJoinPart("Kev", JoinThenPart));
- CPPUNIT_ASSERT_EQUAL(std::string("Kev joined then left the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Kev has joined then left the room"), MUCController::generateJoinPartString(list));
list.push_back(NickJoinPart("Remko", Part));
- CPPUNIT_ASSERT_EQUAL(std::string("Remko has left and Kev joined then left the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Remko has left the room and Kev has joined then left the room"), MUCController::generateJoinPartString(list));
list.push_back(NickJoinPart("Bert", PartThenJoin));
- CPPUNIT_ASSERT_EQUAL(std::string("Remko has left, Kev joined then left and Bert left then rejoined the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Remko has left the room, Kev has joined then left the room and Bert has left then rejoined the room"), MUCController::generateJoinPartString(list));
list.push_back(NickJoinPart("Ernie", JoinThenPart));
- CPPUNIT_ASSERT_EQUAL(std::string("Remko has left, Kev and Ernie joined then left and Bert left then rejoined the room."), MUCController::generateJoinPartString(list));
+ CPPUNIT_ASSERT_EQUAL(std::string("Remko has left the room, Kev and Ernie have joined then left the room and Bert has left then rejoined the room"), MUCController::generateJoinPartString(list));
}
private:
diff --git a/Swift/Controllers/Intl.h b/Swift/Controllers/Intl.h
new file mode 100644
index 0000000..3ed664d
--- /dev/null
+++ b/Swift/Controllers/Intl.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <Swift/Controllers/Translator.h>
+
+#define QT_TRANSLATE_NOOP(context, text) \
+ Swift::Translator::getInstance()->translate(text, context)
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 1257845..6263636 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -10,8 +10,11 @@
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared.hpp>
+#include <string>
#include <stdlib.h>
+#include <Swiften/Base/format.h>
+#include <Swift/Controllers/Intl.h>
#include <Swift/Controllers/UIInterfaces/UIFactory.h>
#include "Swiften/Network/TimerFactory.h"
#include "Swift/Controllers/BuildVersion.h"
@@ -41,7 +44,6 @@
#include "SwifTools/Dock/Dock.h"
#include "SwifTools/Notifier/TogglableNotifier.h"
#include "Swiften/Base/foreach.h"
-#include <string>
#include "Swiften/Client/Client.h"
#include "Swiften/Presence/PresenceSender.h"
#include "Swiften/Elements/ChatState.h"
@@ -432,36 +434,35 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro
std::string message;
std::string certificateErrorMessage;
switch(error->getType()) {
- case ClientError::UnknownError: message = "Unknown Error"; break;
- case ClientError::DomainNameResolveError: message = "Unable to find server"; break;
- case ClientError::ConnectionError: message = "Error connecting to server"; break;
- case ClientError::ConnectionReadError: message = "Error while receiving server data"; break;
- case ClientError::ConnectionWriteError: message = "Error while sending data to the server"; break;
- case ClientError::XMLError: message = "Error parsing server data"; break;
- case ClientError::AuthenticationFailedError: message = "Login/password invalid"; break;
- case ClientError::CompressionFailedError: message = "Error while compressing stream"; break;
- case ClientError::ServerVerificationFailedError: message = "Server verification failed"; break;
- case ClientError::NoSupportedAuthMechanismsError: message = "Authentication mechanisms not supported"; break;
- case ClientError::UnexpectedElementError: message = "Unexpected response"; break;
- case ClientError::ResourceBindError: message = "Error binding resource"; break;
- case ClientError::SessionStartError: message = "Error starting session"; break;
- case ClientError::StreamError: message = "Stream error"; break;
- case ClientError::TLSError: message = "Encryption error"; break;
- case ClientError::ClientCertificateLoadError: message = "Error loading certificate (Invalid password?)"; break;
- case ClientError::ClientCertificateError: message = "Certificate not authorized"; break;
-
- case ClientError::UnknownCertificateError: certificateErrorMessage = "Unknown certificate"; break;
- case ClientError::CertificateExpiredError: certificateErrorMessage = "Certificate has expired"; break;
- case ClientError::CertificateNotYetValidError: certificateErrorMessage = "Certificate is not yet valid"; break;
- case ClientError::CertificateSelfSignedError: certificateErrorMessage = "Certificate is self-signed"; break;
- case ClientError::CertificateRejectedError: certificateErrorMessage = "Certificate has been rejected"; break;
- case ClientError::CertificateUntrustedError: certificateErrorMessage = "Certificate is not trusted"; break;
- case ClientError::InvalidCertificatePurposeError: certificateErrorMessage = "Certificate cannot be used for encryptig your connection"; break;
- case ClientError::CertificatePathLengthExceededError: certificateErrorMessage = "Certificate path length constraint exceeded"; break;
- case ClientError::InvalidCertificateSignatureError: certificateErrorMessage = "Invalid certificate signature"; break;
- case ClientError::InvalidCAError: certificateErrorMessage = "Invalid Certificate Authority"; break;
- case ClientError::InvalidServerIdentityError: certificateErrorMessage = "Certificate does not match the host identity"; break;
-
+ case ClientError::UnknownError: message = QT_TRANSLATE_NOOP("", "Unknown Error"); break;
+ case ClientError::DomainNameResolveError: message = QT_TRANSLATE_NOOP("", "Unable to find server"); break;
+ case ClientError::ConnectionError: message = QT_TRANSLATE_NOOP("", "Error connecting to server"); break;
+ case ClientError::ConnectionReadError: message = QT_TRANSLATE_NOOP("", "Error while receiving server data"); break;
+ case ClientError::ConnectionWriteError: message = QT_TRANSLATE_NOOP("", "Error while sending data to the server"); break;
+ case ClientError::XMLError: message = QT_TRANSLATE_NOOP("", "Error parsing server data"); break;
+ case ClientError::AuthenticationFailedError: message = QT_TRANSLATE_NOOP("", "Login/password invalid"); break;
+ case ClientError::CompressionFailedError: message = QT_TRANSLATE_NOOP("", "Error while compressing stream"); break;
+ case ClientError::ServerVerificationFailedError: message = QT_TRANSLATE_NOOP("", "Server verification failed"); break;
+ case ClientError::NoSupportedAuthMechanismsError: message = QT_TRANSLATE_NOOP("", "Authentication mechanisms not supported"); break;
+ case ClientError::UnexpectedElementError: message = QT_TRANSLATE_NOOP("", "Unexpected response"); break;
+ case ClientError::ResourceBindError: message = QT_TRANSLATE_NOOP("", "Error binding resource"); break;
+ case ClientError::SessionStartError: message = QT_TRANSLATE_NOOP("", "Error starting session"); break;
+ case ClientError::StreamError: message = QT_TRANSLATE_NOOP("", "Stream error"); break;
+ case ClientError::TLSError: message = QT_TRANSLATE_NOOP("", "Encryption error"); break;
+ case ClientError::ClientCertificateLoadError: message = QT_TRANSLATE_NOOP("", "Error loading certificate (Invalid password?)"); break;
+ case ClientError::ClientCertificateError: message = QT_TRANSLATE_NOOP("", "Certificate not authorized"); break;
+
+ case ClientError::UnknownCertificateError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Unknown certificate"); break;
+ case ClientError::CertificateExpiredError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate has expired"); break;
+ case ClientError::CertificateNotYetValidError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate is not yet valid"); break;
+ case ClientError::CertificateSelfSignedError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate is self-signed"); break;
+ case ClientError::CertificateRejectedError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate has been rejected"); break;
+ case ClientError::CertificateUntrustedError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate is not trusted"); break;
+ case ClientError::InvalidCertificatePurposeError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate cannot be used for encryptig your connection"); break;
+ case ClientError::CertificatePathLengthExceededError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate path length constraint exceeded"); break;
+ case ClientError::InvalidCertificateSignatureError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Invalid certificate signature"); break;
+ case ClientError::InvalidCAError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Invalid Certificate Authority"); break;
+ case ClientError::InvalidServerIdentityError: certificateErrorMessage = QT_TRANSLATE_NOOP("", "Certificate does not match the host identity"); break;
}
bool forceReconnectAfterCertificateTrust = false;
if (!certificateErrorMessage.empty()) {
@@ -471,7 +472,7 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro
forceReconnectAfterCertificateTrust = true;
}
else {
- message = "Certificate error";
+ message = QT_TRANSLATE_NOOP("", "Certificate error");
}
}
@@ -485,10 +486,10 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro
logout();
setReconnectTimer();
if (lastDisconnectError_) {
- message = "Reconnect to " + jid_.getDomain() + " failed: " + message + ". Will retry in " + boost::lexical_cast<std::string>(timeBeforeNextReconnect_) + " seconds.";
+ message = str(format(QT_TRANSLATE_NOOP("", "Reconnect to %1% failed: %2%. Will retry in %3% seconds.")) % jid_.getDomain() % message % boost::lexical_cast<std::string>(timeBeforeNextReconnect_));
lastDisconnectError_->conclude();
} else {
- message = "Disconnected from " + jid_.getDomain() + ": " + message;
+ message = str(format(QT_TRANSLATE_NOOP("", "Disconnected from %1%: %2%.")) % jid_.getDomain() % message);
}
lastDisconnectError_ = boost::shared_ptr<ErrorEvent>(new ErrorEvent(JID(jid_.getDomain()), message));
eventController_->handleIncomingEvent(lastDisconnectError_);
diff --git a/Swift/Controllers/PresenceNotifier.cpp b/Swift/Controllers/PresenceNotifier.cpp
index 3d5d71e..e7b25bf 100644
--- a/Swift/Controllers/PresenceNotifier.cpp
+++ b/Swift/Controllers/PresenceNotifier.cpp
@@ -15,6 +15,7 @@
#include "Swiften/Presence/PresenceOracle.h"
#include "Swiften/Network/TimerFactory.h"
#include "Swiften/Client/NickResolver.h"
+#include <Swift/Controllers/StatusUtil.h>
namespace Swift {
@@ -98,7 +99,7 @@ void PresenceNotifier::handleNotificationActivated(JID jid) {
std::string PresenceNotifier::getStatusType(const JID& jid) const {
Presence::ref presence = presenceOracle->getLastPresence(jid);
if (presence) {
- return StatusShow::typeToFriendlyName(presence->getShow());
+ return statusShowTypeToFriendlyName(presence->getShow());
}
else {
return "Unavailable";
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp
index e03a8d4..8a0fd53 100644
--- a/Swift/Controllers/Roster/RosterController.cpp
+++ b/Swift/Controllers/Roster/RosterController.cpp
@@ -37,6 +37,8 @@
#include "Swift/Controllers/UIEvents/RenameGroupUIEvent.h"
#include "Swift/Controllers/UIEvents/ToggleShowOfflineUIEvent.h"
#include <Swiften/Client/NickManager.h>
+#include <Swift/Controllers/Intl.h>
+#include <Swiften/Base/format.h>
namespace Swift {
@@ -121,7 +123,7 @@ void RosterController::handleOnJIDAdded(const JID& jid) {
}
}
else {
- roster_->addContact(jid, jid, name, "Contacts", avatarManager_->getAvatarPath(jid).string());
+ roster_->addContact(jid, jid, name, QT_TRANSLATE_NOOP("", "Contacts"), avatarManager_->getAvatarPath(jid).string());
}
applyAllPresenceTo(jid);
}
@@ -147,7 +149,7 @@ void RosterController::handleOnJIDUpdated(const JID& jid, const std::string& old
std::vector<std::string> groups = xmppRoster_->getGroupsForJID(jid);
std::vector<std::string> oldGroups = passedOldGroups;
std::string name = nickResolver_->jidToNick(jid);
- std::string contactsGroup = "Contacts";
+ std::string contactsGroup = QT_TRANSLATE_NOOP("", "Contacts");
if (oldGroups.empty()) {
oldGroups.push_back(contactsGroup);
}
@@ -208,7 +210,7 @@ void RosterController::handleUIEvent(boost::shared_ptr<UIEvent> event) {
std::vector<XMPPRosterItem> items = xmppRoster_->getItems();
std::string group = renameGroupEvent->getGroup();
// FIXME: We should handle contacts groups specially to avoid clashes
- if (group == "Contacts") {
+ if (group == QT_TRANSLATE_NOOP("", "Contacts")) {
group = "";
}
foreach(XMPPRosterItem& item, items) {
@@ -245,7 +247,7 @@ void RosterController::handleRosterSetError(ErrorPayload::ref error, boost::shar
if (!error) {
return;
}
- std::string text = "Server " + myJID_.getDomain() + " rejected roster change to item '" + rosterPayload->getItems()[0].getJID().toString() + "'";
+ std::string text = str(format(QT_TRANSLATE_NOOP("", "Server %1% rejected roster change to item '%2%'")) % myJID_.getDomain() % rosterPayload->getItems()[0].getJID().toString());
if (!error->getText().empty()) {
text += ": " + error->getText();
}
diff --git a/Swift/Controllers/SConscript b/Swift/Controllers/SConscript
index c563c7b..61da9fb 100644
--- a/Swift/Controllers/SConscript
+++ b/Swift/Controllers/SConscript
@@ -52,6 +52,8 @@ if env["SCONS_STAGE"] == "build" :
"CertificateStorageFactory.cpp",
"CertificateStorage.cpp",
"CertificateFileStorage.cpp",
+ "StatusUtil.cpp",
+ "Translator.cpp",
])
env.Append(UNITTEST_SOURCES = [
diff --git a/Swift/Controllers/StatusUtil.cpp b/Swift/Controllers/StatusUtil.cpp
new file mode 100644
index 0000000..fd1fea3
--- /dev/null
+++ b/Swift/Controllers/StatusUtil.cpp
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include <Swift/Controllers/StatusUtil.h>
+
+#include <Swift/Controllers/Intl.h>
+
+namespace Swift {
+
+std::string statusShowTypeToFriendlyName(StatusShow::Type type) {
+ switch (type) {
+ case StatusShow::Online: return QT_TRANSLATE_NOOP("", "Available");
+ case StatusShow::FFC: return QT_TRANSLATE_NOOP("", "Available");
+ case StatusShow::Away: return QT_TRANSLATE_NOOP("", "Away");
+ case StatusShow::XA: return QT_TRANSLATE_NOOP("", "Away");
+ case StatusShow::DND: return QT_TRANSLATE_NOOP("", "Busy");
+ case StatusShow::None: return QT_TRANSLATE_NOOP("", "Offline");
+ }
+ return "";
+}
+
+}
diff --git a/Swift/Controllers/StatusUtil.h b/Swift/Controllers/StatusUtil.h
new file mode 100644
index 0000000..dddee92
--- /dev/null
+++ b/Swift/Controllers/StatusUtil.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <string>
+
+#include <Swiften/Elements/StatusShow.h>
+
+namespace Swift {
+ std::string statusShowTypeToFriendlyName(StatusShow::Type type);
+}
+
diff --git a/Swift/Controllers/Translator.cpp b/Swift/Controllers/Translator.cpp
new file mode 100644
index 0000000..82fc46e
--- /dev/null
+++ b/Swift/Controllers/Translator.cpp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include <Swift/Controllers/Translator.h>
+
+#include <cassert>
+
+namespace Swift {
+
+struct DefaultTranslator : public Translator {
+ virtual std::string translate(const std::string& text, const std::string&) {
+ return text;
+ }
+} defaultTranslator;
+
+Translator* Translator::translator = &defaultTranslator;
+
+Translator::~Translator() {
+}
+
+void Translator::setInstance(Translator* t) {
+ translator = t;
+}
+
+}
diff --git a/Swift/Controllers/Translator.h b/Swift/Controllers/Translator.h
new file mode 100644
index 0000000..ac4407d
--- /dev/null
+++ b/Swift/Controllers/Translator.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <string>
+
+namespace Swift {
+ class Translator {
+ public:
+ virtual ~Translator();
+
+ virtual std::string translate(const std::string& text, const std::string& context) = 0;
+
+ static void setInstance(Translator* translator);
+
+ static Translator* getInstance() {
+ return translator;
+ }
+
+ private:
+ static Translator* translator;
+ };
+}
diff --git a/Swift/QtUI/ChatList/ChatListModel.cpp b/Swift/QtUI/ChatList/ChatListModel.cpp
index 39b6a3c..ba7b766 100644
--- a/Swift/QtUI/ChatList/ChatListModel.cpp
+++ b/Swift/QtUI/ChatList/ChatListModel.cpp
@@ -12,7 +12,7 @@ namespace Swift {
ChatListModel::ChatListModel() {
root_ = new ChatListGroupItem("", NULL);
- mucBookmarks_ = new ChatListGroupItem("Bookmarked Rooms", root_);
+ mucBookmarks_ = new ChatListGroupItem(tr("Bookmarked Rooms"), root_);
root_->addItem(mucBookmarks_);
}
diff --git a/Swift/QtUI/ChatList/QtChatListWindow.cpp b/Swift/QtUI/ChatList/QtChatListWindow.cpp
index 48ccf7f..b532cdb 100644
--- a/Swift/QtUI/ChatList/QtChatListWindow.cpp
+++ b/Swift/QtUI/ChatList/QtChatListWindow.cpp
@@ -59,11 +59,11 @@ void QtChatListWindow::handleClicked(const QModelIndex& index) {
void QtChatListWindow::setupContextMenus() {
mucMenu_ = new QMenu();
- mucMenu_->addAction("Add New Bookmark", this, SLOT(handleAddBookmark()));
- mucMenu_->addAction("Edit Bookmark", this, SLOT(handleEditBookmark()));
- mucMenu_->addAction("Remove Bookmark", this, SLOT(handleRemoveBookmark()));
+ mucMenu_->addAction(tr("Add New Bookmark"), this, SLOT(handleAddBookmark()));
+ mucMenu_->addAction(tr("Edit Bookmark"), this, SLOT(handleEditBookmark()));
+ mucMenu_->addAction(tr("Remove Bookmark"), this, SLOT(handleRemoveBookmark()));
emptyMenu_ = new QMenu();
- emptyMenu_->addAction("Add New Bookmark", this, SLOT(handleAddBookmark()));
+ emptyMenu_->addAction(tr("Add New Bookmark"), this, SLOT(handleAddBookmark()));
}
diff --git a/Swift/QtUI/EventViewer/QtEvent.cpp b/Swift/QtUI/EventViewer/QtEvent.cpp
index f0bc276..05080d8 100644
--- a/Swift/QtUI/EventViewer/QtEvent.cpp
+++ b/Swift/QtUI/EventViewer/QtEvent.cpp
@@ -58,8 +58,14 @@ QString QtEvent::text() {
boost::shared_ptr<SubscriptionRequestEvent> subscriptionRequestEvent = boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event_);
if (subscriptionRequestEvent) {
std::string reason = subscriptionRequestEvent->getReason();
- std::string message = subscriptionRequestEvent->getJID().toBare().toString() + " would like to add you to their roster" + (reason.empty() ? "." : ", saying '" + reason + "'.");
- return P2QSTRING(message);
+ QString message;
+ if (reason.empty()) {
+ message = QString("%1 would like to add you to their roster.").arg(subscriptionRequestEvent->getJID().toBare().toString().c_str());
+ }
+ else {
+ message = QString("%1 would like to add you to their roster, saying '%2'").arg(subscriptionRequestEvent->getJID().toBare().toString().c_str()).arg(reason.c_str());
+ }
+ return message;
}
boost::shared_ptr<ErrorEvent> errorEvent = boost::dynamic_pointer_cast<ErrorEvent>(event_);
if (errorEvent) {
diff --git a/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp b/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp
index b1b4175..f392859 100644
--- a/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp
+++ b/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp
@@ -22,7 +22,7 @@ MUCSearchServiceItem* MUCSearchEmptyItem::getParent() {
QVariant MUCSearchEmptyItem::data(int role) {
switch (role) {
case Qt::DisplayRole:
- return QVariant("No rooms found");
+ return QVariant(QObject::tr("No rooms found"));
case Qt::FontRole: {
QFont font;
font.setItalic(true);
diff --git a/Swift/QtUI/MUCSearch/QtMUCSearchWindow.cpp b/Swift/QtUI/MUCSearch/QtMUCSearchWindow.cpp
index 1e624b3..618ed65 100644
--- a/Swift/QtUI/MUCSearch/QtMUCSearchWindow.cpp
+++ b/Swift/QtUI/MUCSearch/QtMUCSearchWindow.cpp
@@ -27,7 +27,7 @@ QtMUCSearchWindow::QtMUCSearchWindow() {
setWindowIcon(QIcon(":/logo-icon-16.png"));
#endif
setModal(true);
- setWindowTitle("Search Room");
+ setWindowTitle(tr("Search Room"));
ui_.filter_->hide();
model_ = new MUCSearchModel();
delegate_ = new MUCSearchDelegate();
@@ -47,9 +47,9 @@ QtMUCSearchWindow::QtMUCSearchWindow() {
ui_.okButton->setEnabled(false);
connect(ui_.cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
- throbber_ = new QLabel("Searching", ui_.results_);
+ throbber_ = new QLabel(tr("Searching"), ui_.results_);
throbber_->setMovie(new QMovie(":/icons/throbber.gif", QByteArray(), throbber_));
- throbber_->setToolTip("Searching");
+ throbber_->setToolTip(tr("Searching"));
hasHadScrollBars_ = false;
updateThrobberPosition();
diff --git a/Swift/QtUI/QtAboutWidget.cpp b/Swift/QtUI/QtAboutWidget.cpp
index 38a4a8c..2f68769 100644
--- a/Swift/QtUI/QtAboutWidget.cpp
+++ b/Swift/QtUI/QtAboutWidget.cpp
@@ -20,7 +20,7 @@ namespace Swift {
QtAboutWidget::QtAboutWidget() : QDialog() {
#ifndef Q_WS_MAC
- setWindowTitle("About Swift");
+ setWindowTitle(QString(tr("About %1")).arg("Swift"));
#endif
setWindowIcon(QIcon(":/logo-icon-16.png"));
@@ -39,13 +39,13 @@ QtAboutWidget::QtAboutWidget() : QDialog() {
QLabel* versionLabel = new QLabel(QString("<center><font size='-1'>Version ") + QCoreApplication::applicationVersion() + "</font></center>", this);
mainLayout->addWidget(versionLabel);
- QString buildString = QString("<center><font size='-1'>Built with: Qt version ") + QT_VERSION_STR;
- buildString += QString("<br/>Running with Qt version ") + qVersion();
+ QString buildString = QString("<center><font size='-1'>") + QString(tr("Built with: Qt version %1")).arg(QT_VERSION_STR);
+ buildString += QString("<br/>") + QString(tr("Running with Qt version ")).arg(qVersion());
buildString += "</font></center>";
QLabel* buildLabel = new QLabel(buildString, this);
mainLayout->addWidget(buildLabel);
- QPushButton* licenseButton = new QPushButton("View License", this);
+ QPushButton* licenseButton = new QPushButton(tr("View License"), this);
mainLayout->addWidget(licenseButton);
connect(licenseButton, SIGNAL(clicked()), this, SLOT(handleLicenseClicked()));
diff --git a/Swift/QtUI/QtAvatarWidget.cpp b/Swift/QtUI/QtAvatarWidget.cpp
index 0879d46..ebdf1a6 100644
--- a/Swift/QtUI/QtAvatarWidget.cpp
+++ b/Swift/QtUI/QtAvatarWidget.cpp
@@ -70,10 +70,10 @@ void QtAvatarWidget::setAvatar(const ByteArray& data, const std::string& type) {
void QtAvatarWidget::mousePressEvent(QMouseEvent* event) {
QMenu menu;
- QAction* selectPicture = new QAction("Select picture ...", this);
+ QAction* selectPicture = new QAction(tr("Select picture ..."), this);
menu.addAction(selectPicture);
- QAction* clearPicture = new QAction("Clear picture", this);
+ QAction* clearPicture = new QAction(tr("Clear picture"), this);
menu.addAction(clearPicture);
QAction* result = menu.exec(event->globalPos());
@@ -92,7 +92,7 @@ void QtAvatarWidget::mousePressEvent(QMouseEvent* event) {
setAvatar(data, Q2PSTRING(type));
}
else {
- QMessageBox::critical(this, "Error", "The selected picture is in an unrecognized format");
+ QMessageBox::critical(this, tr("Error"), tr("The selected picture is in an unrecognized format"));
}
}
}
diff --git a/Swift/QtUI/QtBookmarkDetailWindow.cpp b/Swift/QtUI/QtBookmarkDetailWindow.cpp
index c0f04e2..fb04e03 100644
--- a/Swift/QtUI/QtBookmarkDetailWindow.cpp
+++ b/Swift/QtUI/QtBookmarkDetailWindow.cpp
@@ -28,7 +28,7 @@ boost::optional<MUCBookmark> QtBookmarkDetailWindow::createBookmarkFromForm() {
//check bookmarkName
JID room(Q2PSTRING(room_->text()));
if (!room.isValid() || room.getNode().empty() || !room.getResource().empty()) {
- QMessageBox::warning(this, "Bookmark not valid", "You must specify a valid room address (e.g. myroom@chats.example.com).");
+ QMessageBox::warning(this, tr("Bookmark not valid"), tr("You must specify a valid room address (e.g. myroom@chats.example.com)."));
return boost::optional<MUCBookmark>();
}
std::string name(Q2PSTRING(name_->text()));
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp
index 0f25d76..521b072 100644
--- a/Swift/QtUI/QtChatView.cpp
+++ b/Swift/QtUI/QtChatView.cpp
@@ -58,9 +58,9 @@ QtChatView::QtChatView(QtChatTheme* theme, QWidget* parent) : QWidget(parent) {
void QtChatView::handleClearRequested() {
QMessageBox messageBox(this);
- messageBox.setWindowTitle("Clear log");
- messageBox.setText("You are about to clear the contents of your chat log.");
- messageBox.setInformativeText("Are you sure?");
+ messageBox.setWindowTitle(tr("Clear log"));
+ messageBox.setText(tr("You are about to clear the contents of your chat log."));
+ messageBox.setInformativeText(tr("Are you sure?"));
messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
messageBox.setDefaultButton(QMessageBox::Yes);
int button = messageBox.exec();
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index dac9e93..4b67ef0 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -287,9 +287,9 @@ void QtChatWindow::flash() {
void QtChatWindow::setAckState(std::string const& id, ChatWindow::AckState state) {
QString xml;
switch (state) {
- case ChatWindow::Pending: xml = "<img src='qrc:/icons/throbber.gif' alt='This message has not been received by your server yet.'/>"; break;
+ case ChatWindow::Pending: xml = "<img src='qrc:/icons/throbber.gif' alt='" + tr("This message has not been received by your server yet.") + "'/>"; break;
case ChatWindow::Received: xml = ""; break;
- case ChatWindow::Failed: xml = "<img src='qrc:/icons/error.png' alt='This message may not have been transmitted.'/>"; break;
+ case ChatWindow::Failed: xml = "<img src='qrc:/icons/error.png' alt='" + tr("This message may not have been transmitted.'") + "/>"; break;
}
messageLog_->setAckXML(P2QSTRING(id), xml);
}
@@ -309,7 +309,7 @@ void QtChatWindow::addErrorMessage(const std::string& errorMessage) {
QString errorMessageHTML(Qt::escape(P2QSTRING(errorMessage)));
errorMessageHTML.replace("\n","<br/>");
- messageLog_->addMessage(boost::shared_ptr<ChatSnippet>(new SystemMessageSnippet(QString("<span class=\"error\">Couldn't send message: %1</span>").arg(errorMessageHTML), QDateTime::currentDateTime(), false, theme_)));
+ messageLog_->addMessage(boost::shared_ptr<ChatSnippet>(new SystemMessageSnippet(QString("<span class=\"error\">" + tr("Couldn't send message: %1") + "</span>").arg(errorMessageHTML), QDateTime::currentDateTime(), false, theme_)));
previousMessageWasSelf_ = false;
previousMessageWasSystem_ = true;
diff --git a/Swift/QtUI/QtContactEditWidget.cpp b/Swift/QtUI/QtContactEditWidget.cpp
index e8fe24a..fbc9685 100644
--- a/Swift/QtUI/QtContactEditWidget.cpp
+++ b/Swift/QtUI/QtContactEditWidget.cpp
@@ -25,13 +25,13 @@ QtContactEditWidget::QtContactEditWidget(const std::set<std::string>& allGroups,
QHBoxLayout* nameLayout = new QHBoxLayout();
- QLabel* label = new QLabel("Name:", this);
+ QLabel* label = new QLabel(tr("Name:"), this);
nameLayout->addWidget(label);
name_ = new QLineEdit(this);
nameLayout->addWidget(name_);
layout->addLayout(nameLayout);
- layout->addWidget(new QLabel("Groups:", this));
+ layout->addWidget(new QLabel(tr("Groups:"), this));
QScrollArea* groupsArea = new QScrollArea(this);
layout->addWidget(groupsArea);
@@ -53,7 +53,7 @@ QtContactEditWidget::QtContactEditWidget(const std::set<std::string>& allGroups,
QHBoxLayout* newGroupLayout = new QHBoxLayout();
newGroup_ = new QCheckBox(groups);
- newGroup_->setText("New Group:");
+ newGroup_->setText(tr("New Group:"));
newGroup_->setCheckState(Qt::Unchecked);
newGroupLayout->addWidget(newGroup_);
newGroupName_ = new QLineEdit(groups);
diff --git a/Swift/QtUI/QtContactEditWindow.cpp b/Swift/QtUI/QtContactEditWindow.cpp
index 97b8f95..543d39a 100644
--- a/Swift/QtUI/QtContactEditWindow.cpp
+++ b/Swift/QtUI/QtContactEditWindow.cpp
@@ -23,7 +23,7 @@ namespace Swift {
QtContactEditWindow::QtContactEditWindow() : contactEditWidget_(NULL) {
resize(300,300);
- setWindowTitle("Edit contact");
+ setWindowTitle(tr("Edit contact"));
setContentsMargins(0,0,0,0);
QBoxLayout* layout = new QVBoxLayout(this);
@@ -38,10 +38,10 @@ QtContactEditWindow::QtContactEditWindow() : contactEditWidget_(NULL) {
QHBoxLayout* buttonLayout = new QHBoxLayout();
layout->addLayout(buttonLayout);
- QPushButton* removeButton = new QPushButton("Remove contact", this);
+ QPushButton* removeButton = new QPushButton(tr("Remove contact"), this);
connect(removeButton, SIGNAL(clicked()), this, SLOT(handleRemoveContact()));
buttonLayout->addWidget(removeButton);
- QPushButton* okButton = new QPushButton("Ok", this);
+ QPushButton* okButton = new QPushButton(tr("Ok"), this);
connect(okButton, SIGNAL(clicked()), this, SLOT(handleUpdateContact()));
buttonLayout->addStretch();
buttonLayout->addWidget(okButton);
@@ -73,9 +73,9 @@ void QtContactEditWindow::hide() {
void QtContactEditWindow::handleRemoveContact() {
QMessageBox msgBox;
- msgBox.setWindowTitle("Confirm contact deletion");
- msgBox.setText("Are you sure you want to delete this contact?");
- msgBox.setInformativeText(QString("This will remove the contact '%1' from all groups they may be in.").arg(P2QSTRING(jid_.toString())));
+ msgBox.setWindowTitle(tr("Confirm contact deletion"));
+ msgBox.setText(tr("Are you sure you want to delete this contact?"));
+ msgBox.setInformativeText(QString(tr("This will remove the contact '%1' from all groups they may be in.")).arg(P2QSTRING(jid_.toString())));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Yes);
int ret = msgBox.exec();
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index aae11d1..24e6d76 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -78,23 +78,23 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
layout->addStretch(2);
QLabel* jidLabel = new QLabel(this);
- jidLabel->setText("<font size='-1'>User address:</font>");
+ jidLabel->setText("<font size='-1'>" + tr("User address:") + "</font>");
layout->addWidget(jidLabel);
username_ = new QComboBox(this);
username_->setEditable(true);
- username_->setWhatsThis("User address - looks like someuser@someserver.com");
- username_->setToolTip("User address - looks like someuser@someserver.com");
+ username_->setWhatsThis(tr("User address - looks like someuser@someserver.com"));
+ username_->setToolTip(tr("User address - looks like someuser@someserver.com"));
username_->view()->installEventFilter(this);
layout->addWidget(username_);
QLabel* jidHintLabel = new QLabel(this);
- jidHintLabel->setText("<font size='-1' color='grey' >Example: alice@wonderland.lit</font>");
+ jidHintLabel->setText("<font size='-1' color='grey' >" + tr("Example: alice@wonderland.lit") + "</font>");
jidHintLabel->setAlignment(Qt::AlignRight);
layout->addWidget(jidHintLabel);
QLabel* passwordLabel = new QLabel();
- passwordLabel->setText("<font size='-1'>Password:</font>");
+ passwordLabel->setText("<font size='-1'>" + tr("Password:") + "</font>");
layout->addWidget(passwordLabel);
@@ -115,8 +115,8 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
certificateButton_ = new QToolButton(this);
certificateButton_->setCheckable(true);
certificateButton_->setIcon(QIcon(":/icons/certificate.png"));
- certificateButton_->setToolTip("Click if you have a personal certificate used for login to the service.");
- certificateButton_->setWhatsThis("Click if you have a personal certificate used for login to the service.");
+ certificateButton_->setToolTip(tr("Click if you have a personal certificate used for login to the service."));
+ certificateButton_->setWhatsThis(tr("Click if you have a personal certificate used for login to the service."));
credentialsLayout->addWidget(certificateButton_);
connect(certificateButton_, SIGNAL(clicked(bool)), SLOT(handleCertficateChecked(bool)));
@@ -154,7 +154,7 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
generalMenu_ = swiftMenu_;
#endif
- QAction* aboutAction = new QAction("&About Swift", this);
+ QAction* aboutAction = new QAction(QString(tr("&About %1")).arg("Swift"), this);
connect(aboutAction, SIGNAL(triggered()), SLOT(handleAbout()));
swiftMenu_->addAction(aboutAction);
@@ -180,7 +180,7 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
swiftMenu_->addSeparator();
#endif
- QAction* quitAction = new QAction("&Quit", this);
+ QAction* quitAction = new QAction(tr("&Quit"), this);
connect(quitAction, SIGNAL(triggered()), SLOT(handleQuit()));
swiftMenu_->addAction(quitAction);
@@ -194,7 +194,7 @@ bool QtLoginWindow::eventFilter(QObject *obj, QEvent *event) {
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->key() == Qt::Key_Delete || keyEvent->key() == Qt::Key_Backspace) {
QString jid(username_->view()->currentIndex().data().toString());
- int result = QMessageBox::question(this, "Remove profile", "Remove the profile '" + jid + "'?", QMessageBox::Yes | QMessageBox::No);
+ int result = QMessageBox::question(this, tr("Remove profile"), tr("Remove the profile '%1'?").arg(jid), QMessageBox::Yes | QMessageBox::No);
if (result == QMessageBox::Yes) {
onPurgeSavedLoginRequest(Q2PSTRING(jid));
}
@@ -288,7 +288,7 @@ void QtLoginWindow::loggedOut() {
void QtLoginWindow::setIsLoggingIn(bool loggingIn) {
/* Change the for loop as well if you add to this.*/
QWidget* widgets[5] = {username_, password_, remember_, loginAutomatically_, certificateButton_};
- loginButton_->setText(loggingIn ? "Cancel" : "Connect");
+ loginButton_->setText(loggingIn ? tr("Cancel") : tr("Connect"));
for (int i = 0; i < 5; i++) {
widgets[i]->setEnabled(!loggingIn);
}
@@ -309,7 +309,7 @@ void QtLoginWindow::setLoginAutomatically(bool loginAutomatically) {
void QtLoginWindow::handleCertficateChecked(bool checked) {
if (checked) {
- certificateFile_ = QFileDialog::getOpenFileName(this, "Select an authentication certificate", QString(), QString("*.cert"));
+ certificateFile_ = QFileDialog::getOpenFileName(this, tr("Select an authentication certificate"), QString(), QString("*.cert"));
if (certificateFile_.isEmpty()) {
certificateButton_->setChecked(false);
}
@@ -409,11 +409,11 @@ void QtLoginWindow::moveEvent(QMoveEvent*) {
bool QtLoginWindow::askUserToTrustCertificatePermanently(const std::string& message, Certificate::ref certificate) {
QMessageBox dialog(this);
- dialog.setText("The certificate presented by the server is not valid.");
- dialog.setInformativeText(P2QSTRING(message) + "\n\nWould you like to permanently trust this certificate? This must only be done if you know it is correct.");
+ dialog.setText(tr("The certificate presented by the server is not valid."));
+ dialog.setInformativeText(P2QSTRING(message) + "\n\n" + tr("Would you like to permanently trust this certificate? This must only be done if you know it is correct."));
- QString detailedText = "Subject: " + P2QSTRING(certificate->getSubjectName()) + "\n";
- detailedText += "SHA-1 Fingerprint: " + P2QSTRING(certificate->getSHA1Fingerprint());
+ QString detailedText = tr("Subject: %1").arg(P2QSTRING(certificate->getSubjectName())) + "\n";
+ detailedText += tr("SHA-1 Fingerprint: %1").arg(P2QSTRING(certificate->getSHA1Fingerprint()));
dialog.setDetailedText(detailedText);
dialog.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index 6ebd8aa..0f43f7e 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -60,21 +60,21 @@ QtMainWindow::QtMainWindow(QtSettingsProvider* settings, UIEventStream* uiEventS
treeWidget_ = new QtTreeWidget(uiEventStream_);
contactTabLayout->addWidget(treeWidget_);
- tabs_->addTab(contactsTabWidget_, "&Contacts");
+ tabs_->addTab(contactsTabWidget_, tr("&Contacts"));
eventWindow_ = new QtEventWindow(uiEventStream_);
connect(eventWindow_, SIGNAL(onNewEventCountUpdated(int)), this, SLOT(handleEventCountUpdated(int)));
chatListWindow_ = new QtChatListWindow(uiEventStream_);
- tabs_->addTab(eventWindow_, "&Notices");
- tabs_->addTab(chatListWindow_, "C&hats");
+ tabs_->addTab(eventWindow_, tr("&Notices"));
+ tabs_->addTab(chatListWindow_, tr("C&hats"));
this->setLayout(mainLayout);
QMenu* viewMenu = new QMenu(tr("&View"), this);
menus_.push_back(viewMenu);
- showOfflineAction_ = new QAction("Show offline contacts", this);
+ showOfflineAction_ = new QAction(tr("Show offline contacts"), this);
showOfflineAction_->setCheckable(true);
showOfflineAction_->setChecked(false);
connect(showOfflineAction_, SIGNAL(toggled(bool)), SLOT(handleShowOfflineToggled(bool)));
@@ -82,20 +82,20 @@ QtMainWindow::QtMainWindow(QtSettingsProvider* settings, UIEventStream* uiEventS
QMenu* actionsMenu = new QMenu(tr("&Actions"), this);
menus_.push_back(actionsMenu);
- QAction* editProfileAction = new QAction("Edit Profile", this);
+ QAction* editProfileAction = new QAction(tr("Edit Profile"), this);
connect(editProfileAction, SIGNAL(triggered()), SLOT(handleEditProfileAction()));
actionsMenu->addAction(editProfileAction);
- QAction* joinMUCAction = new QAction("&Join Room", this);
+ QAction* joinMUCAction = new QAction(tr("&Join Room"), this);
connect(joinMUCAction, SIGNAL(triggered()), SLOT(handleJoinMUCAction()));
actionsMenu->addAction(joinMUCAction);
- addUserAction_ = new QAction("&Add Contact", this);
+ addUserAction_ = new QAction(tr("&Add Contact"), this);
connect(addUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleAddUserActionTriggered(bool)));
actionsMenu->addAction(addUserAction_);
- chatUserAction_ = new QAction("Start &Chat", this);
+ chatUserAction_ = new QAction(tr("Start &Chat"), this);
connect(chatUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleChatUserActionTriggered(bool)));
actionsMenu->addAction(chatUserAction_);
actionsMenu->addSeparator();
- QAction* signOutAction = new QAction("&Sign Out", this);
+ QAction* signOutAction = new QAction(tr("&Sign Out"), this);
connect(signOutAction, SIGNAL(triggered()), SLOT(handleSignOutAction()));
actionsMenu->addAction(signOutAction);
@@ -127,7 +127,7 @@ void QtMainWindow::handleEventCountUpdated(int count) {
QColor eventTabColor = (count == 0) ? QColor() : QColor(255, 0, 0); // invalid resets to default
int eventIndex = 1;
tabs_->tabBar()->setTabTextColor(eventIndex, eventTabColor);
- QString text = "Notices";
+ QString text = tr("Notices");
if (count > 0) {
text += QString(" (%1)").arg(count);
}
diff --git a/Swift/QtUI/QtNameWidget.cpp b/Swift/QtUI/QtNameWidget.cpp
index 412665d..6124c65 100644
--- a/Swift/QtUI/QtNameWidget.cpp
+++ b/Swift/QtUI/QtNameWidget.cpp
@@ -44,7 +44,7 @@ void QtNameWidget::mousePressEvent(QMouseEvent* event) {
QMenu menu;
bool hasNick = !nick.isEmpty();
- QAction* showAsNick = new QAction(hasNick ? "Show nickname" : "(No Nickname Set)", this);
+ QAction* showAsNick = new QAction(hasNick ? tr("Show nickname") : tr("(No Nickname Set)"), this);
showAsNick->setCheckable(true);
showAsNick->setEnabled(hasNick);
if (mode == ShowNick && hasNick) {
@@ -52,14 +52,14 @@ void QtNameWidget::mousePressEvent(QMouseEvent* event) {
}
menu.addAction(showAsNick);
- QAction* showAsJID = new QAction("Show ID", this);
+ QAction* showAsJID = new QAction(tr("Show ID"), this);
showAsJID->setCheckable(true);
if (mode == ShowJID || !hasNick) {
showAsJID->setChecked(true);
}
menu.addAction(showAsJID);
- QAction* editProfile = new QAction("Edit Profile", this);
+ QAction* editProfile = new QAction(tr("Edit Profile"), this);
menu.addAction(editProfile);
QAction* result = menu.exec(event->globalPos());
diff --git a/Swift/QtUI/QtProfileWindow.cpp b/Swift/QtUI/QtProfileWindow.cpp
index c4fe400..2b723be 100644
--- a/Swift/QtUI/QtProfileWindow.cpp
+++ b/Swift/QtUI/QtProfileWindow.cpp
@@ -21,7 +21,7 @@
namespace Swift {
QtProfileWindow::QtProfileWindow() {
- setWindowTitle("Edit Profile");
+ setWindowTitle(tr("Edit Profile"));
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
sizePolicy.setHorizontalStretch(0);
@@ -40,7 +40,7 @@ QtProfileWindow::QtProfileWindow() {
QVBoxLayout* fieldsLayout = new QVBoxLayout();
QHBoxLayout* horizontalLayout_2 = new QHBoxLayout();
- nicknameLabel = new QLabel("Nickname: ", this);
+ nicknameLabel = new QLabel(tr("Nickname:"), this);
horizontalLayout_2->addWidget(nicknameLabel);
nickname = new QLineEdit(this);
horizontalLayout_2->addWidget(nickname);
@@ -64,7 +64,7 @@ QtProfileWindow::QtProfileWindow() {
throbberLabel->setMovie(new QMovie(":/icons/throbber.gif", QByteArray(), this));
horizontalLayout->addWidget(throbberLabel);
- saveButton = new QPushButton("Save", this);
+ saveButton = new QPushButton(tr("Save"), this);
connect(saveButton, SIGNAL(clicked()), SLOT(handleSave()));
horizontalLayout->addWidget(saveButton);
diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp
index db6d6c5..78bbb03 100644
--- a/Swift/QtUI/QtStatusWidget.cpp
+++ b/Swift/QtUI/QtStatusWidget.cpp
@@ -22,11 +22,12 @@
#include "Swift/QtUI/QtElidingLabel.h"
#include "Swift/QtUI/QtLineEdit.h"
#include "Swift/QtUI/QtSwiftUtil.h"
-
-const QString NO_MESSAGE = QString("(No message)");
+#include <Swift/Controllers/StatusUtil.h>
namespace Swift {
+const QString QtStatusWidget::NO_MESSAGE = QString(QT_TRANSLATE_NOOP("QtStatusWidget", "(No message)"));
+
QtStatusWidget::QtStatusWidget(QWidget *parent) : QWidget(parent), editCursor_(Qt::IBeamCursor), viewCursor_(Qt::PointingHandCursor) {
isClicking_ = false;
connecting_ = false;
@@ -131,12 +132,12 @@ void QtStatusWidget::generateList() {
foreach (StatusShow::Type type, icons_.keys()) {
QListWidgetItem* item = new QListWidgetItem(text == "" ? NO_MESSAGE : text, menu_);
item->setIcon(icons_[type]);
- item->setToolTip(P2QSTRING(StatusShow::typeToFriendlyName(type)) + ": " + item->text());
+ item->setToolTip(P2QSTRING(statusShowTypeToFriendlyName(type)) + ": " + item->text());
item->setStatusTip(item->toolTip());
item->setData(Qt::UserRole, QVariant(type));
}
foreach (StatusShow::Type type, icons_.keys()) {
- QListWidgetItem* item = new QListWidgetItem(P2QSTRING(StatusShow::typeToFriendlyName(type)), menu_);
+ QListWidgetItem* item = new QListWidgetItem(P2QSTRING(statusShowTypeToFriendlyName(type)), menu_);
item->setIcon(icons_[type]);
item->setToolTip(item->text());
item->setStatusTip(item->toolTip());
@@ -168,7 +169,7 @@ void QtStatusWidget::handleClicked() {
types.push_back(StatusShow::DND);
types.push_back(StatusShow::None);
foreach (StatusShow::Type type, types) {
- if (statusEdit_->text() == P2QSTRING(StatusShow::typeToFriendlyName(type))) {
+ if (statusEdit_->text() == P2QSTRING(statusShowTypeToFriendlyName(type))) {
statusEdit_->setText("");
}
}
@@ -229,9 +230,9 @@ void QtStatusWidget::handleItemClicked(QListWidgetItem* item) {
void QtStatusWidget::setNewToolTip() {
if (connecting_) {
- statusTextLabel_->setToolTip("Connecting");
+ statusTextLabel_->setToolTip(tr("Connecting"));
} else {
- statusTextLabel_->setToolTip(P2QSTRING(StatusShow::typeToFriendlyName(selectedStatusType_)) + ": " + statusTextLabel_->text());
+ statusTextLabel_->setToolTip(P2QSTRING(statusShowTypeToFriendlyName(selectedStatusType_)) + ": " + statusTextLabel_->text());
}
}
diff --git a/Swift/QtUI/QtStatusWidget.h b/Swift/QtUI/QtStatusWidget.h
index dcff433..f302c64 100644
--- a/Swift/QtUI/QtStatusWidget.h
+++ b/Swift/QtUI/QtStatusWidget.h
@@ -62,6 +62,7 @@ namespace Swift {
bool editing_;
QMovie* connectingMovie_;
bool connecting_;
+ static const QString NO_MESSAGE;
};
}
diff --git a/Swift/QtUI/QtSubscriptionRequestWindow.cpp b/Swift/QtUI/QtSubscriptionRequestWindow.cpp
index e201808..c38f421 100644
--- a/Swift/QtUI/QtSubscriptionRequestWindow.cpp
+++ b/Swift/QtUI/QtSubscriptionRequestWindow.cpp
@@ -15,23 +15,23 @@
namespace Swift {
QtSubscriptionRequestWindow::QtSubscriptionRequestWindow(boost::shared_ptr<SubscriptionRequestEvent> event, QWidget* parent) : QDialog(parent), event_(event) {
- QString text = P2QSTRING(event->getJID().toString()) + " would like to add you to their roster.\n Would you like to add them to your roster and share your status when you're online? \n\nIf you choose to defer this choice, you'll be asked again when you next login.";
+ QString text = QString("%1 would like to add you to their roster.\n Would you like to add them to your roster and share your status when you're online? \n\nIf you choose to defer this choice, you'll be asked again when you next login.").arg(event->getJID().toString().c_str());
QVBoxLayout* layout = new QVBoxLayout();
QLabel* label = new QLabel(text, this);
layout->addWidget(label);
if (event_->getConcluded()) {
- QLabel* doneLabel = new QLabel("You have already replied to this request");
- QPushButton* okButton = new QPushButton("OK", this);
+ QLabel* doneLabel = new QLabel(tr("You have already replied to this request"));
+ QPushButton* okButton = new QPushButton(tr("Ok"), this);
connect(okButton, SIGNAL(clicked()), this, SLOT(handleDefer()));
layout->addWidget(doneLabel);
layout->addWidget(okButton);
} else {
- QPushButton* yesButton = new QPushButton("Yes", this);
+ QPushButton* yesButton = new QPushButton(tr("Yes"), this);
connect(yesButton, SIGNAL(clicked()), this, SLOT(handleYes()));
- QPushButton* noButton = new QPushButton("No", this);
+ QPushButton* noButton = new QPushButton(tr("No"), this);
connect(noButton, SIGNAL(clicked()), this, SLOT(handleNo()));
- QPushButton* deferButton = new QPushButton("Defer", this);
+ QPushButton* deferButton = new QPushButton(tr("Defer"), this);
connect(deferButton, SIGNAL(clicked()), this, SLOT(handleDefer()));
QHBoxLayout* buttonLayout = new QHBoxLayout();
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index bb40da8..d4c306f 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -8,7 +8,6 @@
#include <string>
#include <QSplitter>
-#include <QTextCodec>
#include <boost/bind.hpp>
#include "QtLoginWindow.h"
@@ -72,8 +71,6 @@ po::options_description QtSwift::getOptionsDescription() {
QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMainThreadCaller_), autoUpdater_(NULL) {
- QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
-
if (options.count("netbook-mode")) {
splitter_ = new QSplitter();
} else {
diff --git a/Swift/QtUI/QtTranslator.h b/Swift/QtUI/QtTranslator.h
new file mode 100644
index 0000000..fdafaf0
--- /dev/null
+++ b/Swift/QtUI/QtTranslator.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <QCoreApplication>
+
+#include <Swift/Controllers/Translator.h>
+
+class QtTranslator : public Swift::Translator {
+ public:
+ QtTranslator() {
+ }
+
+ virtual std::string translate(const std::string& text, const std::string& context) {
+ return std::string(QCoreApplication::translate(context.c_str(), text.c_str(), 0, QCoreApplication::UnicodeUTF8).toUtf8());
+ }
+};
diff --git a/Swift/QtUI/QtWebView.cpp b/Swift/QtUI/QtWebView.cpp
index 3aab88b..9d12010 100644
--- a/Swift/QtUI/QtWebView.cpp
+++ b/Swift/QtUI/QtWebView.cpp
@@ -5,7 +5,7 @@
*/
-#include "Swift/QtUI/QtWebView.h"
+#include "QtWebView.h"
#include <QKeyEvent>
#include <QFocusEvent>
@@ -58,7 +58,7 @@ void QtWebView::contextMenuEvent(QContextMenuEvent* ev) {
}
// Add our own custom actions
- menu->addAction("Clear", this, SIGNAL(clearRequested()));
+ menu->addAction(tr("Clear"), this, SIGNAL(clearRequested()));
menu->exec(ev->globalPos());
delete menu;
diff --git a/Swift/QtUI/QtXMLConsoleWidget.cpp b/Swift/QtUI/QtXMLConsoleWidget.cpp
index 42c8a8f..c1b1d0d 100644
--- a/Swift/QtUI/QtXMLConsoleWidget.cpp
+++ b/Swift/QtUI/QtXMLConsoleWidget.cpp
@@ -19,7 +19,7 @@
namespace Swift {
QtXMLConsoleWidget::QtXMLConsoleWidget() {
- setWindowTitle("Console");
+ setWindowTitle(tr("Console"));
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setSpacing(0);
@@ -37,17 +37,17 @@ QtXMLConsoleWidget::QtXMLConsoleWidget() {
buttonLayout->setContentsMargins(10,0,20,0);
buttonLayout->setSpacing(0);
- enabled = new QCheckBox("Trace input/output", bottom);
+ enabled = new QCheckBox(tr("Trace input/output"), bottom);
enabled->setChecked(true);
buttonLayout->addWidget(enabled);
buttonLayout->addStretch();
- QPushButton* clearButton = new QPushButton("Clear", bottom);
+ QPushButton* clearButton = new QPushButton(tr("Clear"), bottom);
connect(clearButton, SIGNAL(clicked()), textEdit, SLOT(clear()));
buttonLayout->addWidget(clearButton);
- setWindowTitle("Debug Console");
+ setWindowTitle(tr("Debug Console"));
emit titleUpdated();
}
@@ -72,11 +72,11 @@ void QtXMLConsoleWidget::closeEvent(QCloseEvent* event) {
}
void QtXMLConsoleWidget::handleDataRead(const std::string& data) {
- appendTextIfEnabled("<!-- IN -->\n" + data + "\n", QColor(33,98,33));
+ appendTextIfEnabled(std::string(tr("<!-- IN -->").toUtf8()) + "\n" + data + "\n", QColor(33,98,33));
}
void QtXMLConsoleWidget::handleDataWritten(const std::string& data) {
- appendTextIfEnabled("<!-- OUT -->\n" + data + "\n", QColor(155,1,0));
+ appendTextIfEnabled(std::string(tr("<!-- OUT -->").toUtf8()) + "\n" + data + "\n", QColor(155,1,0));
}
void QtXMLConsoleWidget::appendTextIfEnabled(const std::string& data, const QColor& color) {
diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp
index 90084c4..963ce72 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidget.cpp
@@ -83,18 +83,18 @@ void QtTreeWidget::contextMenuEvent(QContextMenuEvent* event) {
RosterItem* item = static_cast<RosterItem*>(index.internalPointer());
QMenu contextMenu;
if (ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item)) {
- QAction* editContact = contextMenu.addAction("Edit");
+ QAction* editContact = contextMenu.addAction(tr("Edit"));
QAction* result = contextMenu.exec(event->globalPos());
if (result == editContact) {
eventStream_->send(boost::make_shared<RequestContactEditorUIEvent>(contact->getJID()));
}
}
else if (GroupRosterItem* group = dynamic_cast<GroupRosterItem*>(item)) {
- QAction* renameGroup = contextMenu.addAction("Rename");
+ QAction* renameGroup = contextMenu.addAction(tr("Rename"));
QAction* result = contextMenu.exec(event->globalPos());
if (result == renameGroup) {
bool ok;
- QString newName = QInputDialog::getText(NULL, "Rename group", "New name for " + P2QSTRING(group->getDisplayName()), QLineEdit::Normal, P2QSTRING(group->getDisplayName()), &ok);
+ QString newName = QInputDialog::getText(NULL, tr("Rename group"), tr("New name for %1").arg(P2QSTRING(group->getDisplayName())), QLineEdit::Normal, P2QSTRING(group->getDisplayName()), &ok);
if (ok) {
eventStream_->send(boost::make_shared<RenameGroupUIEvent>(group->getDisplayName(), Q2PSTRING(newName)));
}
diff --git a/Swift/QtUI/Roster/QtTreeWidget.h b/Swift/QtUI/Roster/QtTreeWidget.h
index ff11567..3430f7e 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.h
+++ b/Swift/QtUI/Roster/QtTreeWidget.h
@@ -4,12 +4,10 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFT_QtTreeWidget_H
-#define SWIFT_QtTreeWidget_H
+#pragma once
#include <QTreeView>
#include <QModelIndex>
-#include "Swift/QtUI/Roster/QtTreeWidget.h"
#include "Swift/QtUI/Roster/RosterModel.h"
#include "Swift/QtUI/Roster/RosterDelegate.h"
@@ -44,5 +42,3 @@ class QtTreeWidget : public QTreeView{
};
}
-#endif
-
diff --git a/Swift/QtUI/Roster/QtTreeWidgetItem.h b/Swift/QtUI/Roster/QtTreeWidgetItem.h
index a2d0cdd..6855989 100644
--- a/Swift/QtUI/Roster/QtTreeWidgetItem.h
+++ b/Swift/QtUI/Roster/QtTreeWidgetItem.h
@@ -4,22 +4,17 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFT_QtTreeWidgetItem_H
-#define SWIFT_QtTreeWidgetItem_H
+#pragma once
#include <QColor>
#include <QVariant>
-
#include <string>
+
#include "Swiften/Roster/TreeWidgetFactory.h"
#include "Swiften/Roster/TreeWidget.h"
#include "Swiften/Roster/TreeWidgetItem.h"
-#include "Swift/QtUI/Roster/QtTreeWidgetItem.h"
-
-
#include "Swift/QtUI/QtSwiftUtil.h"
-
namespace Swift {
enum RosterRoles {
StatusTextRole = Qt::UserRole,
@@ -89,5 +84,3 @@ class QtTreeWidgetItem : public QObject, public TreeWidgetItem {
bool itemLessThan(QtTreeWidgetItem* left, QtTreeWidgetItem* right);
}
-#endif
-
diff --git a/Swift/QtUI/Roster/RosterModel.cpp b/Swift/QtUI/Roster/RosterModel.cpp
index 306b76f..2399a21 100644
--- a/Swift/QtUI/Roster/RosterModel.cpp
+++ b/Swift/QtUI/Roster/RosterModel.cpp
@@ -15,6 +15,7 @@
#include "Swiften/Elements/StatusShow.h"
#include "Swift/Controllers/Roster/ContactRosterItem.h"
#include "Swift/Controllers/Roster/GroupRosterItem.h"
+#include <Swift/Controllers/StatusUtil.h>
#include "QtSwiftUtil.h"
#include "Swift/QtUI/Roster/QtTreeWidget.h"
@@ -126,7 +127,7 @@ QString RosterModel::getToolTip(RosterItem* item) const {
if (contact->getDisplayJID().isValid()) {
tip += "\n" + P2QSTRING(contact->getDisplayJID().toBare().toString());
}
- tip += "\n " + P2QSTRING(StatusShow::typeToFriendlyName(contact->getStatusShow()));
+ tip += "\n " + P2QSTRING(statusShowTypeToFriendlyName(contact->getStatusShow()));
if (!getStatusText(item).isEmpty()) {
tip += ": " + getStatusText(item);
}
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 6238693..e52d76a 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -155,7 +155,24 @@ myenv.Uic4("QtJoinMUCWindow.ui")
myenv.Qrc("DefaultTheme.qrc")
myenv.Qrc("Swift.qrc")
-commonResources = ["../resources/sounds"]
+# Resources
+commonResources = {
+ "": ["../resources/sounds"]
+}
+
+# Translation
+translation_sources = [env.File("../Translations/Swift.ts").abspath]
+for file in os.listdir(Dir("../Translations").abspath) :
+ if file.startswith("Swift_") and file.endswith(".ts") :
+ lang = file[6:-3]
+ translation_resource = "../resources/translations/Swift_" + lang + ".qm"
+ translation_source = "../Translations/Swift_" + lang + ".ts"
+ translation_sources.append(env.File(translation_source).abspath)
+ myenv.Qm(translation_resource, translation_source)
+ commonResources["translations"] = commonResources.get("translations", []) + [translation_resource]
+if ARGUMENTS.get("update_translations", False) :
+ t = myenv.Command(translation_sources, [], [myenv.Action("$QT4_LUPDATE -I " + env.Dir("#").abspath + " -silent -codecfortr utf-8 -recursive Swift -ts " + " ".join(translation_sources), cmdstr = "$QT4_LUPDATECOMSTR")])
+ myenv.AlwaysBuild(t)
if env["PLATFORM"] == "darwin" :
frameworks = []
@@ -163,7 +180,8 @@ if env["PLATFORM"] == "darwin" :
frameworks.append(env["SPARKLE_FRAMEWORK"])
if env["HAVE_GROWL"] :
frameworks.append(env["GROWL_FRAMEWORK"])
- app = myenv.AppBundle("Swift", version = myenv["SWIFT_VERSION"], resources = ["../resources/MacOSX/Swift.icns"] + commonResources, frameworks = frameworks)
+ commonResources[""] = commonResources.get("", []) + ["../resources/MacOSX/Swift.icns"]
+ app = myenv.AppBundle("Swift", version = myenv["SWIFT_VERSION"], resources = commonResources, frameworks = frameworks)
if env["DIST"] :
myenv.Command(["Swift-${SWIFT_VERSION}.dmg"], [app], ["Swift/Packaging/MacOSX/package.sh " + app.path + " Swift/Packaging/MacOSX/Swift.dmg.gz $TARGET $QTDIR"])
@@ -171,15 +189,18 @@ if env.get("SWIFT_INSTALLDIR", "") :
env.Install(os.path.join(env["SWIFT_INSTALLDIR"], "bin"), swiftProgram)
env.InstallAs(os.path.join(env["SWIFT_INSTALLDIR"], "share", "pixmaps", "swift.xpm"), "../resources/logo/logo-icon-32.xpm")
env.Install(os.path.join(env["SWIFT_INSTALLDIR"], "share", "applications"), "../resources/swift.desktop")
- for resource in commonResources :
- env.Install(os.path.join(env["SWIFT_INSTALLDIR"], "share", "swift"), resource)
+ for dir, resource in commonResources.items() :
+ env.Install(os.path.join(env["SWIFT_INSTALLDIR"], "share", "swift", dir), resource)
if env["PLATFORM"] == "win32" :
if env["DIST"] :
- myenv.WindowsBundle("Swift", resources = [
+ commonResources[""] = commonResources.get("", []) + [
os.path.join(env["OPENSSL_DIR"], "bin", "ssleay32.dll"),
os.path.join(env["OPENSSL_DIR"], "bin", "libeay32.dll"),
- ] + commonResources + ["../resources/images"],
+ "../resources/images",
+ ]
+ myenv.WindowsBundle("Swift",
+ resources = commonResources,
qtimageformats = ["gif", "ico", "jpeg", "mng", "svg", "tiff"],
qtlibs = ["QtCore4", "QtGui4", "QtNetwork4", "QtWebKit4", "QtXMLPatterns4", "phonon4"])
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index c6fb004..a384f5d 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -23,7 +23,7 @@ namespace Swift {
QtUserSearchFirstPage::QtUserSearchFirstPage(UserSearchWindow::Type type, const QString& title) {
setupUi(this);
setTitle(title);
- setSubTitle(QString("%1. If you know their JID you can enter it directly, or you can search for them.").arg(type == UserSearchWindow::AddContact ? "Add another user to your roster" : "Chat to another user"));
+ setSubTitle(QString(tr("%1. If you know their JID you can enter it directly, or you can search for them.")).arg(type == UserSearchWindow::AddContact ? tr("Add another user to your roster") : tr("Chat to another user")));
connect(jid_, SIGNAL(textChanged(const QString&)), this, SLOT(emitCompletenessCheck()));
connect(service_->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(emitCompletenessCheck()));
}
@@ -82,7 +82,7 @@ QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWin
setupUi(this);
model_ = new UserSearchModel();
delegate_ = new UserSearchDelegate();
- QString title(type == UserSearchWindow::AddContact ? "Add Contact" : "Chat to User");
+ QString title(type == UserSearchWindow::AddContact ? tr("Add Contact") : tr("Chat to User"));
setWindowTitle(title);
firstPage_ = new QtUserSearchFirstPage(type, title);
connect(firstPage_->byJID_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
@@ -289,7 +289,14 @@ void QtUserSearchWindow::clearForm() {
void QtUserSearchWindow::clear() {
firstPage_->errorLabel_->setVisible(false);
- firstPage_->howLabel_->setText(QString("How would you like to find the user to %1?").arg(type_ == AddContact ? "add" : "chat to"));
+ QString howText;
+ if (type_ == AddContact) {
+ howText = QString("How would you like to find the user to add?");
+ }
+ else {
+ howText = QString("How would you like to find the user to chat to?");
+ }
+ firstPage_->howLabel_->setText(howText);
firstPage_->byJID_->setChecked(true);
clearForm();
model_->clear();
@@ -311,13 +318,13 @@ void QtUserSearchWindow::setError(const QString& error) {
void QtUserSearchWindow::setSearchError(bool error) {
if (error) {
- setError("Error while searching");
+ setError(tr("Error while searching"));
}
}
void QtUserSearchWindow::setServerSupportsSearch(bool support) {
if (!support) {
- setError("This server doesn't support searching for users.");
+ setError(tr("This server doesn't support searching for users."));
}
}
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index c5f744a..3cbb170 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -8,14 +8,37 @@
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options.hpp>
#include <boost/version.hpp>
-
#include <iostream>
-
#include <QApplication>
+#include <QTextCodec>
+#include <QTranslator>
+#include <QLocale>
+
+#include <Swift/Controllers/Translator.h>
+#include <Swift/Controllers/ApplicationInfo.h>
+#include <SwifTools/Application/PlatformApplicationPathProvider.h>
#include "QtSwift.h"
+#include "QtTranslator.h"
int main(int argc, char* argv[]) {
+ QApplication app(argc, argv);
+
+ QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+
+ // Translation
+ QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
+ boost::filesystem::path someTranslationPath = Swift::PlatformApplicationPathProvider(SWIFT_APPLICATION_NAME).getResourcePath("/translations/Swift_nl.qm");
+ QTranslator qtTranslator;
+ if (!someTranslationPath.empty()) {
+ //std::cout << "Loading " << std::string(QLocale::system().name().toUtf8()) << std::endl;
+ qtTranslator.load("Swift_" + QLocale::system().name(), someTranslationPath.parent_path().string().c_str());
+ }
+ app.installTranslator(&qtTranslator);
+ QtTranslator swiftTranslator;
+ Swift::Translator::setInstance(&swiftTranslator);
+
+ // Parse program options
boost::program_options::options_description desc = Swift::QtSwift::getOptionsDescription();
boost::program_options::variables_map vm;
try {
@@ -32,7 +55,11 @@ int main(int argc, char* argv[]) {
std::cout << desc << "\n";
return 1;
}
- QApplication app(argc, argv);
+
Swift::QtSwift swift(vm);
- return app.exec();
+ int result = app.exec();
+
+ Swift::Translator::setInstance(NULL);
+
+ return result;
}
diff --git a/Swift/QtUI/tmp/QtContextMenu.cpp b/Swift/QtUI/tmp/QtContextMenu.cpp
deleted file mode 100644
index c74fb31..0000000
--- a/Swift/QtUI/tmp/QtContextMenu.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2010 Kevin Smith
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#include "ContextMenus/QtContextMenu.h"
-
-namespace Swift {
-
-QtContextMenu::~QtContextMenu() {
-}
-
-}
diff --git a/Swift/QtUI/tmp/QtContextMenu.h b/Swift/QtUI/tmp/QtContextMenu.h
deleted file mode 100644
index 9e73ef9..0000000
--- a/Swift/QtUI/tmp/QtContextMenu.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2010 Kevin Smith
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#pragma once
-
-namespace Swift {
- class RosterItem;
- class QtContextMenu {
- public:
- virtual ~QtContextMenu();
-
- virtual void show(RosterItem* item) = 0;
- };
-}
diff --git a/Swift/QtUI/tmp/QtRosterContextMenu.cpp b/Swift/QtUI/tmp/QtRosterContextMenu.cpp
deleted file mode 100644
index c8375ba..0000000
--- a/Swift/QtUI/tmp/QtRosterContextMenu.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2010 Kevin Smith
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#include "Swift/QtUI/ContextMenus/QtRosterContextMenu.h"
-
-#include <QInputDialog>
-#include <QLineEdit>
-#include <QMenu>
-#include <QDebug>
-#include <QDialog>
-#include <QMessageBox>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
-#include "Swiften/Roster/ContactRosterItem.h"
-#include "Swiften/Roster/GroupRosterItem.h"
-#include <string>
-#include "Swiften/Roster/Roster.h"
-#include "Swift/Controllers/UIEvents/UIEvent.h"
-#include "Swift/Controllers/UIEvents/RemoveRosterItemUIEvent.h"
-#include "Swift/Controllers/UIEvents/RenameRosterItemUIEvent.h"
-#include "Swift/QtUI/QtSwiftUtil.h"
-#include "Swift/QtUI/QtEditContactDialog.h"
-
-
-namespace Swift {
-
-QtRosterContextMenu::QtRosterContextMenu(UIEventStream* eventStream, QtTreeWidget* treeWidget) : eventStream_(eventStream), treeWidget_(treeWidget), item_(NULL) {
-}
-
-void QtRosterContextMenu::show(RosterItem* item) {
- ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item);
- item_ = item;
- QMenu contextMenu;
- if (contact) {
- contextMenu.addAction("Edit", this, SLOT(handleEditContact()));
- }
- GroupRosterItem* group = dynamic_cast<GroupRosterItem*>(item);
- if (group) {
- contextMenu.addAction("Rename", this, SLOT(handleRenameGroup()));
- }
- contextMenu.exec(QCursor::pos());
-}
-
-void QtRosterContextMenu::handleEditContact() {
- ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item_);
- assert(contact);
-
- // Figure out all the groups the contact is in
- QList<QString> allGroups;
- foreach (RosterItem* item, treeWidget_->getRoster()->getRoot()->getChildren()) {
- GroupRosterItem* group = dynamic_cast<GroupRosterItem*>(item);
- if (group) {
- allGroups.push_back(P2QSTRING(group->getDisplayName()));
- }
- }
-
- QtEditContactDialog editDialog(contact, allGroups, eventStream_);
-
- if (groupDialog.exec() == QDialog::Accepted) {
- eventStream_->send(groupDialog.getRegroupEvent());
- }
-
- /* ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item_);
- QMessageBox msgBox;
- msgBox.setWindowTitle("Confirm contact deletion");
- msgBox.setText("Are you sure you want to delete this contact?");
- msgBox.setInformativeText(QString("This will remove the contact '%1' from all groups they may be in.").arg(P2QSTRING(contact->getJID().toString())));
- msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
- msgBox.setDefaultButton(QMessageBox::Yes);
- int ret = msgBox.exec();
- if (ret == QMessageBox::Yes) {
- eventStream_->send(boost::shared_ptr<UIEvent>(new RemoveRosterItemUIEvent(contact->getJID())));
- }*/
-
-
-/* bool ok;
- QString newName = QInputDialog::getText(NULL, "Rename contact", "New name for " + P2QSTRING(item_->getDisplayName()), QLineEdit::Normal, P2QSTRING(item_->getDisplayName()), &ok);
- if (ok) {
- eventStream_->send(boost::shared_ptr<UIEvent>(new RenameRosterItemUIEvent(contact->getJID(), Q2PSTRING(newName))));
- }*/
-}
-
-void QtRosterContextMenu::handleRenameGroup() {
- /*
- GroupRosterItem* group = dynamic_cast<GroupRosterItem*>(item_);
- assert(group);
- bool ok;
- QString newName = QInputDialog::getText(NULL, "Rename group", "New name for " + P2QSTRING(item_->getDisplayName()), QLineEdit::Normal, P2QSTRING(item_->getDisplayName()), &ok);
- if (ok) {
- std::vector<std::string> addedGroups;
- std::vector<std::string> removedGroups;
- addedGroups.push_back(Q2PSTRING(newName));
- removedGroups.push_back(group->getDisplayName());
- foreach (RosterItem* child, group->getChildren()) {
- ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(child);
- assert(contact);
- eventStream_->send(boost::make_shared<RegroupRosterItemUIEvent>(contact->getJID(), addedGroups, removedGroups));
- }
- }
- */
-}
-
-}
diff --git a/Swift/QtUI/tmp/QtRosterContextMenu.h b/Swift/QtUI/tmp/QtRosterContextMenu.h
deleted file mode 100644
index 2357735..0000000
--- a/Swift/QtUI/tmp/QtRosterContextMenu.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2010 Kevin Smith
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#pragma once
-
-#include <QObject>
-
-#include "Swift/QtUI/ContextMenus/QtContextMenu.h"
-#include "Swift/QtUI/Roster/QtTreeWidget.h"
-#include "Swift/Controllers/UIEvents/UIEventStream.h"
-
-namespace Swift {
- class RosterItem;
- class QtRosterContextMenu : public QObject, public QtContextMenu {
- Q_OBJECT
- public:
- QtRosterContextMenu(UIEventStream* eventStream, QtTreeWidget* treeWidget);
- void show(RosterItem* item);
-
- private slots:
- void handleRenameGroup();
- void handleEditContact();
-
- private:
- UIEventStream* eventStream_;
- QtTreeWidget* treeWidget_;
- RosterItem* item_;
- };
-}
diff --git a/Swift/Translations/Swift.ts b/Swift/Translations/Swift.ts
new file mode 100644
index 0000000..959687e
--- /dev/null
+++ b/Swift/Translations/Swift.ts
@@ -0,0 +1,1387 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+ <name></name>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="46"/>
+ <source>Starting chat with %1% in chatroom %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="49"/>
+ <source>Starting chat with %1% - %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="115"/>
+ <source>me</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="156"/>
+ <source>%1% has gone offline</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="160"/>
+ <source>%1% has become available</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="162"/>
+ <source>%1% has gone away</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="164"/>
+ <source>%1% is now busy</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="56"/>
+ <source>The day is now %1%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="193"/>
+ <source>Error sending message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="199"/>
+ <source>Bad request</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="200"/>
+ <source>Conflict</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="201"/>
+ <source>This feature is not implemented</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="202"/>
+ <source>Forbidden</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="203"/>
+ <source>Recipient can no longer be contacted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="204"/>
+ <source>Internal server error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="205"/>
+ <source>Item not found</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="206"/>
+ <source>JID Malformed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="207"/>
+ <source>Message was rejected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="208"/>
+ <source>Not allowed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="209"/>
+ <source>Not authorized</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="210"/>
+ <source>Payment is required</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="211"/>
+ <source>Recipient is unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="212"/>
+ <source>Redirect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="213"/>
+ <source>Registration required</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="214"/>
+ <source>Recipient&apos;s server not found</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="215"/>
+ <source>Remote server timeout</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="216"/>
+ <source>The server is low on resources</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="217"/>
+ <source>The service is unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="218"/>
+ <source>A subscription is required</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="219"/>
+ <source>Undefined condition</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="220"/>
+ <source>Unexpected request</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="114"/>
+ <source>Room %1% is not responding. This operation may never complete.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="125"/>
+ <source>Unable to join this room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="131"/>
+ <source>Unable to join this room as %1%, retrying as %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="135"/>
+ <source>No nickname specified</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="139"/>
+ <source>A password needed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="143"/>
+ <source>Only members may join</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="147"/>
+ <source>You are banned from the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="151"/>
+ <source>The room is full</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="155"/>
+ <source>The room does not exist</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="173"/>
+ <source>You have joined room %1% as %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="214"/>
+ <source>%1% has joined the room as a %2%.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="217"/>
+ <source>%1% has joined the room.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="243"/>
+ <source>moderator</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="244"/>
+ <source>participant</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="245"/>
+ <source>visitor</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="284"/>
+ <source>The room subject is now: %1%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="307"/>
+ <source>%1% is now a %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="313"/>
+ <source>Moderators</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="314"/>
+ <source>Participants</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="315"/>
+ <source>Visitors</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="316"/>
+ <source>Occupants</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="330"/>
+ <source>Trying to join room %1%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="359"/>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="468"/>
+ <source>%1% has left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="359"/>
+ <source>You have left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="433"/>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="497"/>
+ <source> and </source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="457"/>
+ <source>%1% have joined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="460"/>
+ <source>%1% has joined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="465"/>
+ <source>%1% have left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="473"/>
+ <source>%1% have joined then left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="476"/>
+ <source>%1% has joined then left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="481"/>
+ <source>%1% have left then rejoined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="484"/>
+ <source>%1% has left then rejoined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="437"/>
+ <source>Unknown Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="438"/>
+ <source>Unable to find server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="439"/>
+ <source>Error connecting to server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="440"/>
+ <source>Error while receiving server data</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="441"/>
+ <source>Error while sending data to the server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="442"/>
+ <source>Error parsing server data</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="443"/>
+ <source>Login/password invalid</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="444"/>
+ <source>Error while compressing stream</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="445"/>
+ <source>Server verification failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="446"/>
+ <source>Authentication mechanisms not supported</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="447"/>
+ <source>Unexpected response</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="448"/>
+ <source>Error binding resource</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="449"/>
+ <source>Error starting session</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="450"/>
+ <source>Stream error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="451"/>
+ <source>Encryption error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="452"/>
+ <source>Error loading certificate (Invalid password?)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="453"/>
+ <source>Certificate not authorized</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="455"/>
+ <source>Unknown certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="456"/>
+ <source>Certificate has expired</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="457"/>
+ <source>Certificate is not yet valid</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="458"/>
+ <source>Certificate is self-signed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="459"/>
+ <source>Certificate has been rejected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="460"/>
+ <source>Certificate is not trusted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="461"/>
+ <source>Certificate cannot be used for encryptig your connection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="462"/>
+ <source>Certificate path length constraint exceeded</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="463"/>
+ <source>Invalid certificate signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="464"/>
+ <source>Invalid Certificate Authority</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="465"/>
+ <source>Certificate does not match the host identity</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="475"/>
+ <source>Certificate error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="489"/>
+ <source>Reconnect to %1% failed: %2%. Will retry in %3% seconds.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="492"/>
+ <source>Disconnected from %1%: %2%.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="126"/>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="152"/>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="213"/>
+ <source>Contacts</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="250"/>
+ <source>Server %1% rejected roster change to item &apos;%2%&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="15"/>
+ <location filename="../Controllers/StatusUtil.cpp" line="16"/>
+ <source>Available</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="17"/>
+ <location filename="../Controllers/StatusUtil.cpp" line="18"/>
+ <source>Away</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="19"/>
+ <source>Busy</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="20"/>
+ <source>Offline</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../QtUI/MUCSearch/MUCSearchEmptyItem.cpp" line="25"/>
+ <source>No rooms found</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtBookmarkDetailWindow</name>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="20"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="137"/>
+ <source>Edit Bookmark Details</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="40"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="138"/>
+ <source>Bookmark Name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="50"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="139"/>
+ <source>Room JID:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="60"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="140"/>
+ <source>Your Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="70"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="141"/>
+ <source>Room password:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="93"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="142"/>
+ <source>Join automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtJoinMUCWindow</name>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="20"/>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="96"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="124"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="130"/>
+ <source>Join Room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="28"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="125"/>
+ <source>Room:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="35"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="126"/>
+ <source>Search ...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="42"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="127"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="89"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="129"/>
+ <source>Join automatically in future</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtMUCSearchWindow</name>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="14"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="118"/>
+ <source>Dialog</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="20"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="119"/>
+ <source>Service:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="74"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="121"/>
+ <source>Cancel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="84"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="122"/>
+ <source>Ok</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="96"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="123"/>
+ <source>List rooms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtStatusWidget</name>
+ <message>
+ <location filename="../QtUI/QtStatusWidget.cpp" line="29"/>
+ <source>(No message)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchFieldsPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="117"/>
+ <source>WizardPage</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="27"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="119"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="37"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="120"/>
+ <source>First name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="47"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="121"/>
+ <source>Last name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="57"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="122"/>
+ <source>E-Mail:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="80"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="123"/>
+ <source>TextLabel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="87"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="124"/>
+ <source>Fetching search fields</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchFirstPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="120"/>
+ <source>WizardPage</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="17"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="121"/>
+ <source>Add a user</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="20"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="122"/>
+ <source>Add another user to your roster. If you know their JID you can add them directly, or you can search for them.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="26"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="123"/>
+ <source>howLabel_</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="35"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="124"/>
+ <source>I know their JID:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="47"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="125"/>
+ <source>I&apos;d like to search my server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="56"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="126"/>
+ <source>I&apos;d like to search another server:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="91"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="127"/>
+ <source>&lt;font color=&apos;red&apos;&gt;errorLabel_&lt;/font&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchResultsPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchResultsPage.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchResultsPage.h" line="51"/>
+ <source>WizardPage</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchWindow</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="20"/>
+ <source>Find other users</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="46"/>
+ <source>Service to search:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="75"/>
+ <source>Get Search Form</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="91"/>
+ <source>TextLabel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="110"/>
+ <source>Enter search terms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="117"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="127"/>
+ <source>First name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="137"/>
+ <source>Last name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="147"/>
+ <source>E-Mail:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="191"/>
+ <source>Search</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="218"/>
+ <source>Results:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="228"/>
+ <source>Address:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="240"/>
+ <source>Add to Roster. Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="254"/>
+ <source>Start Chat With Contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchWizard</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWizard.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchWizard.h" line="39"/>
+ <source>Find User</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::ChatListModel</name>
+ <message>
+ <location filename="../QtUI/ChatList/ChatListModel.cpp" line="15"/>
+ <source>Bookmarked Rooms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtAboutWidget</name>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="23"/>
+ <source>About %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="42"/>
+ <source>Built with: Qt version %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="43"/>
+ <source>Running with Qt version </source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="48"/>
+ <source>View License</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtAvatarWidget</name>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="73"/>
+ <source>Select picture ...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="76"/>
+ <source>Clear picture</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="81"/>
+ <source>Select picture</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="81"/>
+ <source>Image Files (*.png *.jpg *.gif)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="95"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="95"/>
+ <source>The selected picture is in an unrecognized format</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtBookmarkDetailWindow</name>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.cpp" line="31"/>
+ <source>Bookmark not valid</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.cpp" line="31"/>
+ <source>You must specify a valid room address (e.g. myroom@chats.example.com).</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtChatListWindow</name>
+ <message>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="62"/>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="66"/>
+ <source>Add New Bookmark</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="63"/>
+ <source>Edit Bookmark</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="64"/>
+ <source>Remove Bookmark</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtChatView</name>
+ <message>
+ <location filename="../QtUI/QtChatView.cpp" line="61"/>
+ <source>Clear log</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatView.cpp" line="62"/>
+ <source>You are about to clear the contents of your chat log.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatView.cpp" line="63"/>
+ <source>Are you sure?</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtChatWindow</name>
+ <message>
+ <location filename="../QtUI/QtChatWindow.cpp" line="290"/>
+ <source>This message has not been received by your server yet.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatWindow.cpp" line="292"/>
+ <source>This message may not have been transmitted.&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatWindow.cpp" line="312"/>
+ <source>Couldn&apos;t send message: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtContactEditWidget</name>
+ <message>
+ <location filename="../QtUI/QtContactEditWidget.cpp" line="28"/>
+ <source>Name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWidget.cpp" line="34"/>
+ <source>Groups:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWidget.cpp" line="56"/>
+ <source>New Group:</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtContactEditWindow</name>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="26"/>
+ <source>Edit contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="41"/>
+ <source>Remove contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="44"/>
+ <source>Ok</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="76"/>
+ <source>Confirm contact deletion</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="77"/>
+ <source>Are you sure you want to delete this contact?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="78"/>
+ <source>This will remove the contact &apos;%1&apos; from all groups they may be in.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtLoginWindow</name>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="81"/>
+ <source>User address:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="86"/>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="87"/>
+ <source>User address - looks like someuser@someserver.com</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="91"/>
+ <source>Example: alice@wonderland.lit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="97"/>
+ <source>Password:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="118"/>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="119"/>
+ <source>Click if you have a personal certificate used for login to the service.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="125"/>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="291"/>
+ <source>Connect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="136"/>
+ <source>Remember Password?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="138"/>
+ <source>Login Automatically?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="150"/>
+ <source>&amp;Swift</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="152"/>
+ <source>&amp;General</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="157"/>
+ <source>&amp;About %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="161"/>
+ <source>&amp;Show Debug Console</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="165"/>
+ <source>&amp;Play Sounds</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="171"/>
+ <source>Show &amp;Notifications</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="183"/>
+ <source>&amp;Quit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="197"/>
+ <source>Remove profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="197"/>
+ <source>Remove the profile &apos;%1&apos;?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="291"/>
+ <source>Cancel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="312"/>
+ <source>Select an authentication certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="412"/>
+ <source>The certificate presented by the server is not valid.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="413"/>
+ <source>Would you like to permanently trust this certificate? This must only be done if you know it is correct.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="415"/>
+ <source>Subject: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="416"/>
+ <source>SHA-1 Fingerprint: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtMUCSearchWindow</name>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.cpp" line="30"/>
+ <source>Search Room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.cpp" line="50"/>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.cpp" line="52"/>
+ <source>Searching</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtMainWindow</name>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="63"/>
+ <source>&amp;Contacts</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="70"/>
+ <source>&amp;Notices</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="71"/>
+ <source>C&amp;hats</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="75"/>
+ <source>&amp;View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="77"/>
+ <source>Show offline contacts</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="83"/>
+ <source>&amp;Actions</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="85"/>
+ <source>Edit Profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="88"/>
+ <source>&amp;Join Room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="91"/>
+ <source>&amp;Add Contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="94"/>
+ <source>Start &amp;Chat</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="98"/>
+ <source>&amp;Sign Out</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="130"/>
+ <source>Notices</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtNameWidget</name>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="47"/>
+ <source>Show nickname</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="47"/>
+ <source>(No Nickname Set)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="55"/>
+ <source>Show ID</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="62"/>
+ <source>Edit Profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtProfileWindow</name>
+ <message>
+ <location filename="../QtUI/QtProfileWindow.cpp" line="24"/>
+ <source>Edit Profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtProfileWindow.cpp" line="43"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtProfileWindow.cpp" line="67"/>
+ <source>Save</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtStatusWidget</name>
+ <message>
+ <location filename="../QtUI/QtStatusWidget.cpp" line="233"/>
+ <source>Connecting</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtSubscriptionRequestWindow</name>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="24"/>
+ <source>You have already replied to this request</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="25"/>
+ <source>Ok</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="30"/>
+ <source>Yes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="32"/>
+ <source>No</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="34"/>
+ <source>Defer</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtTreeWidget</name>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="86"/>
+ <source>Edit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="93"/>
+ <source>Rename</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="97"/>
+ <source>Rename group</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="97"/>
+ <source>New name for %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtUserSearchFirstPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="26"/>
+ <source>%1. If you know their JID you can enter it directly, or you can search for them.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="26"/>
+ <source>Add another user to your roster</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="26"/>
+ <source>Chat to another user</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtUserSearchWindow</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="85"/>
+ <source>Add Contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="85"/>
+ <source>Chat to User</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="321"/>
+ <source>Error while searching</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="327"/>
+ <source>This server doesn&apos;t support searching for users.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtWebView</name>
+ <message>
+ <location filename="../QtUI/QtWebView.cpp" line="61"/>
+ <source>Clear</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtXMLConsoleWidget</name>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="22"/>
+ <source>Console</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="40"/>
+ <source>Trace input/output</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="46"/>
+ <source>Clear</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="50"/>
+ <source>Debug Console</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="75"/>
+ <source>&lt;!-- IN --&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="79"/>
+ <source>&lt;!-- OUT --&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/Swift/Translations/Swift_nl.ts b/Swift/Translations/Swift_nl.ts
new file mode 100644
index 0000000..d967c57
--- /dev/null
+++ b/Swift/Translations/Swift_nl.ts
@@ -0,0 +1,1387 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="nl_NL">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+ <name></name>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="46"/>
+ <source>Starting chat with %1% in chatroom %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="49"/>
+ <source>Starting chat with %1% - %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="115"/>
+ <source>me</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="156"/>
+ <source>%1% has gone offline</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="160"/>
+ <source>%1% has become available</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="162"/>
+ <source>%1% has gone away</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatController.cpp" line="164"/>
+ <source>%1% is now busy</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="56"/>
+ <source>The day is now %1%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="193"/>
+ <source>Error sending message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="199"/>
+ <source>Bad request</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="200"/>
+ <source>Conflict</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="201"/>
+ <source>This feature is not implemented</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="202"/>
+ <source>Forbidden</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="203"/>
+ <source>Recipient can no longer be contacted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="204"/>
+ <source>Internal server error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="205"/>
+ <source>Item not found</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="206"/>
+ <source>JID Malformed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="207"/>
+ <source>Message was rejected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="208"/>
+ <source>Not allowed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="209"/>
+ <source>Not authorized</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="210"/>
+ <source>Payment is required</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="211"/>
+ <source>Recipient is unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="212"/>
+ <source>Redirect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="213"/>
+ <source>Registration required</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="214"/>
+ <source>Recipient&apos;s server not found</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="215"/>
+ <source>Remote server timeout</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="216"/>
+ <source>The server is low on resources</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="217"/>
+ <source>The service is unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="218"/>
+ <source>A subscription is required</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="219"/>
+ <source>Undefined condition</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/ChatControllerBase.cpp" line="220"/>
+ <source>Unexpected request</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="114"/>
+ <source>Room %1% is not responding. This operation may never complete.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="125"/>
+ <source>Unable to join this room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="131"/>
+ <source>Unable to join this room as %1%, retrying as %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="135"/>
+ <source>No nickname specified</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="139"/>
+ <source>A password needed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="143"/>
+ <source>Only members may join</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="147"/>
+ <source>You are banned from the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="151"/>
+ <source>The room is full</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="155"/>
+ <source>The room does not exist</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="173"/>
+ <source>You have joined room %1% as %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="214"/>
+ <source>%1% has joined the room as a %2%.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="217"/>
+ <source>%1% has joined the room.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="243"/>
+ <source>moderator</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="244"/>
+ <source>participant</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="245"/>
+ <source>visitor</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="284"/>
+ <source>The room subject is now: %1%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="307"/>
+ <source>%1% is now a %2%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="313"/>
+ <source>Moderators</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="314"/>
+ <source>Participants</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="315"/>
+ <source>Visitors</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="316"/>
+ <source>Occupants</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="330"/>
+ <source>Trying to join room %1%</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="359"/>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="468"/>
+ <source>%1% has left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="359"/>
+ <source>You have left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="433"/>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="497"/>
+ <source> and </source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="457"/>
+ <source>%1% have joined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="460"/>
+ <source>%1% has joined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="465"/>
+ <source>%1% have left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="473"/>
+ <source>%1% have joined then left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="476"/>
+ <source>%1% has joined then left the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="481"/>
+ <source>%1% have left then rejoined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Chat/MUCController.cpp" line="484"/>
+ <source>%1% has left then rejoined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="437"/>
+ <source>Unknown Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="438"/>
+ <source>Unable to find server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="439"/>
+ <source>Error connecting to server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="440"/>
+ <source>Error while receiving server data</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="441"/>
+ <source>Error while sending data to the server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="442"/>
+ <source>Error parsing server data</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="443"/>
+ <source>Login/password invalid</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="444"/>
+ <source>Error while compressing stream</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="445"/>
+ <source>Server verification failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="446"/>
+ <source>Authentication mechanisms not supported</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="447"/>
+ <source>Unexpected response</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="448"/>
+ <source>Error binding resource</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="449"/>
+ <source>Error starting session</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="450"/>
+ <source>Stream error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="451"/>
+ <source>Encryption error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="452"/>
+ <source>Error loading certificate (Invalid password?)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="453"/>
+ <source>Certificate not authorized</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="455"/>
+ <source>Unknown certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="456"/>
+ <source>Certificate has expired</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="457"/>
+ <source>Certificate is not yet valid</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="458"/>
+ <source>Certificate is self-signed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="459"/>
+ <source>Certificate has been rejected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="460"/>
+ <source>Certificate is not trusted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="461"/>
+ <source>Certificate cannot be used for encryptig your connection</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="462"/>
+ <source>Certificate path length constraint exceeded</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="463"/>
+ <source>Invalid certificate signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="464"/>
+ <source>Invalid Certificate Authority</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="465"/>
+ <source>Certificate does not match the host identity</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="475"/>
+ <source>Certificate error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="489"/>
+ <source>Reconnect to %1% failed: %2%. Will retry in %3% seconds.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/MainController.cpp" line="492"/>
+ <source>Disconnected from %1%: %2%.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="126"/>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="152"/>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="213"/>
+ <source>Contacts</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/Roster/RosterController.cpp" line="250"/>
+ <source>Server %1% rejected roster change to item &apos;%2%&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="15"/>
+ <location filename="../Controllers/StatusUtil.cpp" line="16"/>
+ <source>Available</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="17"/>
+ <location filename="../Controllers/StatusUtil.cpp" line="18"/>
+ <source>Away</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="19"/>
+ <source>Busy</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Controllers/StatusUtil.cpp" line="20"/>
+ <source>Offline</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../QtUI/MUCSearch/MUCSearchEmptyItem.cpp" line="25"/>
+ <source>No rooms found</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtBookmarkDetailWindow</name>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="20"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="137"/>
+ <source>Edit Bookmark Details</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="40"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="138"/>
+ <source>Bookmark Name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="50"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="139"/>
+ <source>Room JID:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="60"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="140"/>
+ <source>Your Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="70"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="141"/>
+ <source>Room password:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.ui" line="93"/>
+ <location filename="../QtUI/ui_QtBookmarkDetailWindow.h" line="142"/>
+ <source>Join automatically</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtJoinMUCWindow</name>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="20"/>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="96"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="124"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="130"/>
+ <source>Join Room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="28"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="125"/>
+ <source>Room:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="35"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="126"/>
+ <source>Search ...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="42"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="127"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtJoinMUCWindow.ui" line="89"/>
+ <location filename="../QtUI/ui_QtJoinMUCWindow.h" line="129"/>
+ <source>Join automatically in future</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtMUCSearchWindow</name>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="14"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="118"/>
+ <source>Dialog</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="20"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="119"/>
+ <source>Service:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="74"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="121"/>
+ <source>Cancel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="84"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="122"/>
+ <source>Ok</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.ui" line="96"/>
+ <location filename="../QtUI/MUCSearch/ui_QtMUCSearchWindow.h" line="123"/>
+ <source>List rooms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtStatusWidget</name>
+ <message>
+ <location filename="../QtUI/QtStatusWidget.cpp" line="29"/>
+ <source>(No message)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchFieldsPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="117"/>
+ <source>WizardPage</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="27"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="119"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="37"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="120"/>
+ <source>First name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="47"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="121"/>
+ <source>Last name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="57"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="122"/>
+ <source>E-Mail:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="80"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="123"/>
+ <source>TextLabel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFieldsPage.ui" line="87"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFieldsPage.h" line="124"/>
+ <source>Fetching search fields</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchFirstPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="120"/>
+ <source>WizardPage</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="17"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="121"/>
+ <source>Add a user</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="20"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="122"/>
+ <source>Add another user to your roster. If you know their JID you can add them directly, or you can search for them.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="26"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="123"/>
+ <source>howLabel_</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="35"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="124"/>
+ <source>I know their JID:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="47"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="125"/>
+ <source>I&apos;d like to search my server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="56"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="126"/>
+ <source>I&apos;d like to search another server:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchFirstPage.ui" line="91"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchFirstPage.h" line="127"/>
+ <source>&lt;font color=&apos;red&apos;&gt;errorLabel_&lt;/font&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchResultsPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchResultsPage.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchResultsPage.h" line="51"/>
+ <source>WizardPage</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchWindow</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="20"/>
+ <source>Find other users</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="46"/>
+ <source>Service to search:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="75"/>
+ <source>Get Search Form</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="91"/>
+ <source>TextLabel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="110"/>
+ <source>Enter search terms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="117"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="127"/>
+ <source>First name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="137"/>
+ <source>Last name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="147"/>
+ <source>E-Mail:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="191"/>
+ <source>Search</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="218"/>
+ <source>Results:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="228"/>
+ <source>Address:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="240"/>
+ <source>Add to Roster. Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.ui" line="254"/>
+ <source>Start Chat With Contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QtUserSearchWizard</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWizard.ui" line="14"/>
+ <location filename="../QtUI/UserSearch/ui_QtUserSearchWizard.h" line="39"/>
+ <source>Find User</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::ChatListModel</name>
+ <message>
+ <location filename="../QtUI/ChatList/ChatListModel.cpp" line="15"/>
+ <source>Bookmarked Rooms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtAboutWidget</name>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="23"/>
+ <source>About %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="42"/>
+ <source>Built with: Qt version %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="43"/>
+ <source>Running with Qt version </source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAboutWidget.cpp" line="48"/>
+ <source>View License</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtAvatarWidget</name>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="73"/>
+ <source>Select picture ...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="76"/>
+ <source>Clear picture</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="81"/>
+ <source>Select picture</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="81"/>
+ <source>Image Files (*.png *.jpg *.gif)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="95"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtAvatarWidget.cpp" line="95"/>
+ <source>The selected picture is in an unrecognized format</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtBookmarkDetailWindow</name>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.cpp" line="31"/>
+ <source>Bookmark not valid</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtBookmarkDetailWindow.cpp" line="31"/>
+ <source>You must specify a valid room address (e.g. myroom@chats.example.com).</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtChatListWindow</name>
+ <message>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="62"/>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="66"/>
+ <source>Add New Bookmark</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="63"/>
+ <source>Edit Bookmark</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/ChatList/QtChatListWindow.cpp" line="64"/>
+ <source>Remove Bookmark</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtChatView</name>
+ <message>
+ <location filename="../QtUI/QtChatView.cpp" line="61"/>
+ <source>Clear log</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatView.cpp" line="62"/>
+ <source>You are about to clear the contents of your chat log.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatView.cpp" line="63"/>
+ <source>Are you sure?</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtChatWindow</name>
+ <message>
+ <location filename="../QtUI/QtChatWindow.cpp" line="290"/>
+ <source>This message has not been received by your server yet.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatWindow.cpp" line="292"/>
+ <source>This message may not have been transmitted.&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtChatWindow.cpp" line="312"/>
+ <source>Couldn&apos;t send message: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtContactEditWidget</name>
+ <message>
+ <location filename="../QtUI/QtContactEditWidget.cpp" line="28"/>
+ <source>Name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWidget.cpp" line="34"/>
+ <source>Groups:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWidget.cpp" line="56"/>
+ <source>New Group:</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtContactEditWindow</name>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="26"/>
+ <source>Edit contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="41"/>
+ <source>Remove contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="44"/>
+ <source>Ok</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="76"/>
+ <source>Confirm contact deletion</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="77"/>
+ <source>Are you sure you want to delete this contact?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtContactEditWindow.cpp" line="78"/>
+ <source>This will remove the contact &apos;%1&apos; from all groups they may be in.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtLoginWindow</name>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="81"/>
+ <source>User address:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="86"/>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="87"/>
+ <source>User address - looks like someuser@someserver.com</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="91"/>
+ <source>Example: alice@wonderland.lit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="97"/>
+ <source>Password:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="118"/>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="119"/>
+ <source>Click if you have a personal certificate used for login to the service.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="125"/>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="291"/>
+ <source>Connect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="136"/>
+ <source>Remember Password?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="138"/>
+ <source>Login Automatically?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="150"/>
+ <source>&amp;Swift</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="152"/>
+ <source>&amp;General</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="157"/>
+ <source>&amp;About %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="161"/>
+ <source>&amp;Show Debug Console</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="165"/>
+ <source>&amp;Play Sounds</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="171"/>
+ <source>Show &amp;Notifications</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="183"/>
+ <source>&amp;Quit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="197"/>
+ <source>Remove profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="197"/>
+ <source>Remove the profile &apos;%1&apos;?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="291"/>
+ <source>Cancel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="312"/>
+ <source>Select an authentication certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="412"/>
+ <source>The certificate presented by the server is not valid.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="413"/>
+ <source>Would you like to permanently trust this certificate? This must only be done if you know it is correct.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="415"/>
+ <source>Subject: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtLoginWindow.cpp" line="416"/>
+ <source>SHA-1 Fingerprint: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtMUCSearchWindow</name>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.cpp" line="30"/>
+ <source>Search Room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.cpp" line="50"/>
+ <location filename="../QtUI/MUCSearch/QtMUCSearchWindow.cpp" line="52"/>
+ <source>Searching</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtMainWindow</name>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="63"/>
+ <source>&amp;Contacts</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="70"/>
+ <source>&amp;Notices</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="71"/>
+ <source>C&amp;hats</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="75"/>
+ <source>&amp;View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="77"/>
+ <source>Show offline contacts</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="83"/>
+ <source>&amp;Actions</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="85"/>
+ <source>Edit Profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="88"/>
+ <source>&amp;Join Room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="91"/>
+ <source>&amp;Add Contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="94"/>
+ <source>Start &amp;Chat</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="98"/>
+ <source>&amp;Sign Out</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtMainWindow.cpp" line="130"/>
+ <source>Notices</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtNameWidget</name>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="47"/>
+ <source>Show nickname</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="47"/>
+ <source>(No Nickname Set)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="55"/>
+ <source>Show ID</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtNameWidget.cpp" line="62"/>
+ <source>Edit Profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtProfileWindow</name>
+ <message>
+ <location filename="../QtUI/QtProfileWindow.cpp" line="24"/>
+ <source>Edit Profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtProfileWindow.cpp" line="43"/>
+ <source>Nickname:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtProfileWindow.cpp" line="67"/>
+ <source>Save</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtStatusWidget</name>
+ <message>
+ <location filename="../QtUI/QtStatusWidget.cpp" line="233"/>
+ <source>Connecting</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtSubscriptionRequestWindow</name>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="24"/>
+ <source>You have already replied to this request</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="25"/>
+ <source>Ok</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="30"/>
+ <source>Yes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="32"/>
+ <source>No</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtSubscriptionRequestWindow.cpp" line="34"/>
+ <source>Defer</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtTreeWidget</name>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="86"/>
+ <source>Edit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="93"/>
+ <source>Rename</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="97"/>
+ <source>Rename group</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/Roster/QtTreeWidget.cpp" line="97"/>
+ <source>New name for %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtUserSearchFirstPage</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="26"/>
+ <source>%1. If you know their JID you can enter it directly, or you can search for them.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="26"/>
+ <source>Add another user to your roster</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="26"/>
+ <source>Chat to another user</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtUserSearchWindow</name>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="85"/>
+ <source>Add Contact</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="85"/>
+ <source>Chat to User</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="321"/>
+ <source>Error while searching</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/UserSearch/QtUserSearchWindow.cpp" line="327"/>
+ <source>This server doesn&apos;t support searching for users.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtWebView</name>
+ <message>
+ <location filename="../QtUI/QtWebView.cpp" line="61"/>
+ <source>Clear</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>Swift::QtXMLConsoleWidget</name>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="22"/>
+ <source>Console</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="40"/>
+ <source>Trace input/output</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="46"/>
+ <source>Clear</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="50"/>
+ <source>Debug Console</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="75"/>
+ <source>&lt;!-- IN --&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../QtUI/QtXMLConsoleWidget.cpp" line="79"/>
+ <source>&lt;!-- OUT --&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/Swift/resources/.gitignore b/Swift/resources/.gitignore
new file mode 100644
index 0000000..f8590a0
--- /dev/null
+++ b/Swift/resources/.gitignore
@@ -0,0 +1 @@
+translations
diff --git a/Swiften/Base/format.h b/Swiften/Base/format.h
new file mode 100644
index 0000000..9e242ff
--- /dev/null
+++ b/Swiften/Base/format.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <boost/format.hpp>
+
+namespace Swift {
+ inline boost::format format(const std::string& s) {
+ using namespace boost::io;
+ boost::format fmter(s);
+ fmter.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
+ return fmter;
+ }
+}
diff --git a/Swiften/Elements/StatusShow.h b/Swiften/Elements/StatusShow.h
index f579ace..a158239 100644
--- a/Swiften/Elements/StatusShow.h
+++ b/Swiften/Elements/StatusShow.h
@@ -26,18 +26,6 @@ namespace Swift {
return type_;
}
- static std::string typeToFriendlyName(Type type) {
- switch (type) {
- case Online: return "Available";
- case FFC: return "Available";
- case Away: return "Away";
- case XA: return "Away";
- case DND: return "Busy";
- case None: return "Offline";
- }
- return "Unknown";
- }
-
/**
* Can be used for rough ordering of Types.
* Greater magnitude = more available.