diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2009-10-20 18:21:34 +0000 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2009-10-20 18:21:34 +0000 |
commit | 2156b0ca60706e563fabd1f02d9b02462f763e87 (patch) | |
tree | 5bcd4e8b78848474b5ec7cc64b78324ea6c101dd /indra | |
parent | 25639b267db13f86f8446c10d61c814839920bc3 (diff) |
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
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 11 | ||||
-rw-r--r-- | indra/newview/lllocationinputctrl.h | 2 | ||||
-rw-r--r-- | indra/newview/llsearchcombobox.cpp | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/location_input.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/search_combo_box.xml | 2 |
6 files changed, 19 insertions, 14 deletions
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<S32> add_landmark_hpad; Optional<LLButton::Params> add_landmark_button, info_button; - Optional<std::string> add_landmark_tool_tip; - Optional<std::string> 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<LLSearchComboBox> 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<LLView>("child1")->setToolTip(tool_tip); + getChild<LLView>("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]. <string name="Wide Lips">Wide Lips</string> <string name="Wild">Wild</string> <string name="Wrinkles">Wrinkles</string> - - <!-- Strings used by the (currently Linux) auto-updater app --> + + <string name="Search">Search</string> + + <!-- Favorites Bar --> + <string name="LocationCtrlAddLandmarkTooltip">Add to My Landmarks</string> + <string name="LocationCtrlEditLandmarkTooltip">Edit My Landmark</string> + + <!-- Strings used by the (currently Linux) auto-updater app --> <string name="UpdaterWindowTitle"> [APP_NAME] Update </string> 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" > <info_button name="Place Information" label="" diff --git a/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml b/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml index 769af42e38..56204201ef 100644 --- a/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml +++ b/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml @@ -14,7 +14,6 @@ name="child1" select_on_focus="true" text_pad_left="28" - tool_tip="Search" background_image="TextField_Search_Off" background_image_disabled="TextField_Search_Disabled" background_image_focused="TextField_Search_Active"/> @@ -29,7 +28,6 @@ name="child3" width="13" height="13" - tool_tip="Search" image_unselected="Search" image_selected="Search" /> </search_combo_box>
\ No newline at end of file |