From 2156b0ca60706e563fabd1f02d9b02462f763e87 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 20 Oct 2009 18:21:34 +0000 Subject: EXT-1479: I18N: string in /en/widgets/location_input.xml wont honor its translation Pulling these out of widgets and putting them in strings.xml for the sake of the translation tools. reviewed by James --- indra/newview/lllocationinputctrl.cpp | 11 +++++------ indra/newview/lllocationinputctrl.h | 2 -- indra/newview/llsearchcombobox.cpp | 6 ++++++ indra/newview/skins/default/xui/en/strings.xml | 10 ++++++++-- indra/newview/skins/default/xui/en/widgets/location_input.xml | 2 -- .../newview/skins/default/xui/en/widgets/search_combo_box.xml | 2 -- 6 files changed, 19 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index a3296dbffc..42838b311b 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -159,9 +159,7 @@ LLLocationInputCtrl::Params::Params() add_landmark_image_selected("add_landmark_image_selected"), add_landmark_button("add_landmark_button"), add_landmark_hpad("add_landmark_hpad", 0), - info_button("info_button"), - add_landmark_tool_tip("add_landmark_tool_tip"), - edit_landmark_tool_tip("edit_landmark_tool_tip") + info_button("info_button") { } @@ -172,9 +170,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mLocationContextMenu(NULL), mAddLandmarkBtn(NULL), mLandmarkImageOn(NULL), - mLandmarkImageOff(NULL), - mAddLandmarkTooltip(p.add_landmark_tool_tip), - mEditLandmarkTooltip(p.edit_landmark_tool_tip) + mLandmarkImageOff(NULL) { // Lets replace default LLLineEditor with LLLocationLineEditor // to make needed escaping while copying and cutting url @@ -265,6 +261,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mAddLandmarkObserver = new LLAddLandmarkObserver(this); gInventory.addObserver(mRemoveLandmarkObserver); gInventory.addObserver(mAddLandmarkObserver); + + mAddLandmarkTooltip = LLTrans::getString("LocationCtrlAddLandmarkTooltip"); + mEditLandmarkTooltip = LLTrans::getString("LocationCtrlEditLandmarkTooltip"); } LLLocationInputCtrl::~LLLocationInputCtrl() diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index cd5c482005..c74a294ca3 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -66,8 +66,6 @@ public: Optional add_landmark_hpad; Optional add_landmark_button, info_button; - Optional add_landmark_tool_tip; - Optional edit_landmark_tool_tip; Params(); }; diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp index 0b7621daa5..5123d862ce 100644 --- a/indra/newview/llsearchcombobox.cpp +++ b/indra/newview/llsearchcombobox.cpp @@ -34,6 +34,7 @@ #include "llsearchcombobox.h" #include "llkeyboard.h" +#include "lltrans.h" // for LLTrans::getString() #include "lluictrlfactory.h" static LLDefaultChildRegistry::Register r1("search_combo_box"); @@ -84,6 +85,11 @@ LLSearchComboBox::LLSearchComboBox(const Params&p) setSelectionCallback(boost::bind(&LLSearchComboBox::onSelectionCommit, this)); setPrearrangeCallback(boost::bind(&LLSearchComboBox::onSearchPrearrange, this, _2)); mSearchButton->setCommitCallback(boost::bind(&LLSearchComboBox::onTextCommit, this, _2)); + + // set tooltip here for now since we don't want to parse /en/widgets + std::string tool_tip = LLTrans::getString("Search"); + getChild("child1")->setToolTip(tool_tip); + getChild("child3")->setToolTip(tool_tip); } void LLSearchComboBox::rebuildSearchHistory(const std::string& filter) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index d13f5dbde3..0ca6c87585 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2844,8 +2844,14 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Wide Lips Wild Wrinkles - - + + Search + + + Add to My Landmarks + Edit My Landmark + + [APP_NAME] Update diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 40c8dc860d..1377a3c945 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -18,8 +18,6 @@ max_chars="20" follows="left|top" allow_new_values="true" - add_landmark_tool_tip="Add this to My Landmarks" - edit_landmark_tool_tip="Edit My Landmark" > @@ -29,7 +28,6 @@ name="child3" width="13" height="13" - tool_tip="Search" image_unselected="Search" image_selected="Search" /> \ No newline at end of file -- cgit v1.2.3