Snowglobe translator ++++++++++++++++++++ This patch allows chat messages to be translated with Google Translate, and is based on Snowglobe 1.12. The 'linden' directory in this directory is already patched with the files from linden-1.12-translator, but is source code only (so requires libs and artwork). TODO: Make sure the code works when the server starts broadcasting a language component with each chat message (currently relying on automatic language recognition). New Files ========= lltranslate.cpp, lltranslate.h ------------------------------ A new class 'LLTranslate' to encapsulate the message translation functionality. lltanslate_test.cpp ------------------- A new test class for LLTranslate. Tests sending multiple messages, symbols etc. json/* ------ JSON code to parse the Google Translate responses from http://jsoncpp.sourceforge.net/ NOTE: There's a fix on line 584 of json_reader.cpp to encode unicode as utf8. Changed Files ============= LLAddBuildTest.cmake -------------------- Added a new ADD_VIEWER_TRANSLATE_BUILD_TEST macro to build the translator tests. newview/CMakeLists.txt ---------------------- Added new lltranslate.cpp/h and json files to the build. message_prehash.cpp, message_prehash.h -------------------------------------- Defines a new hash value 'Language' which will store the agent language in each chat message. llui.cpp, llui.h ---------------- Defines a new function 'getTranslateLanguage()' which returns the currently selected translation language (from the chat preferences), or if this is set to 'Default' returns the value of 'getLanguage()' (the UI language). llchat.cpp ---------- Added a new 'mLanguage' component and a copy constructor. llprefschat.cpp --------------- Save/restore new preference options correctly. llviewermessage.cpp, llviewermessage.h -------------------------------------- New functions route chat messages through LLTranslate. settings.xml ------------ Contains two new settings : TranslateLanguage - Language we will translate incoming chat messages to. TranslateChat - Whether we will translate incoming chat messages. floater_preferences.xml ----------------------- Increased the size of the preferences window. panel_preferences_chat.xml -------------------------- Added a new 'Translate' section, with a combobox for the 'TranslateLanguage' setting and a checkbox for the 'TranslateChat' setting. xx/panel_preferences_chat.xml ----------------------------- Translations for the new controls in the other UI languages. en-us/panel_preferences_general.xml, en-us/panel_preferences_web.xml, en-us/panel_preferences_network.xml --------------------------------------------------------------------------------------------------------- Fixed a few alignment issues raised by increasing the size of the preferences window.