Skip to content

Commit 3d46baa

Browse files
committed
Make Linux happy. And finish FIXME in tabcontainer to remove hardcoded strings.
Translators: Please translatetab_tooltip_prev and tab_tooltip_next in strings.xml
1 parent bc0709b commit 3d46baa

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

indra/llui/llaccordionctrl.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class LLAccordionCtrl: public LLPanel
6464
virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0;
6565
};
6666

67-
/* Singu TODO: LLPanel::Params, LLTextBox::Params
67+
#if 0 // Singu TODO: LLPanel::Params, LLTextBox::Params
6868
struct Params
6969
: public LLInitParam::Block<Params, LLPanel::Params>
7070
{
@@ -73,7 +73,7 @@ class LLAccordionCtrl: public LLPanel
7373
accordion tabs are responsible for scrolling their content.
7474
*NOTE fit_parent works best when combined with single_expansion.
7575
Accordion view should implement getRequiredRect() and provide valid height*/
76-
/*Optional<LLTextBox::Params> no_matched_tabs_text;
76+
Optional<LLTextBox::Params> no_matched_tabs_text;
7777
Optional<LLTextBox::Params> no_visible_tabs_text;
7878

7979
Params()
@@ -84,7 +84,8 @@ class LLAccordionCtrl: public LLPanel
8484
{};
8585
};
8686

87-
LLAccordionCtrl(const Params& params);*/
87+
LLAccordionCtrl(const Params& params);
88+
#endif
8889

8990
LLAccordionCtrl();
9091
virtual ~LLAccordionCtrl();

indra/llui/lltabcontainer.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "llresmgr.h"
4141
#include "llresizehandle.h"
4242
#include "lltextbox.h"
43+
#include "lltrans.h"
4344
#include "llcriticaldamp.h"
4445
#include "lluictrlfactory.h"
4546
#include "llrender.h"
@@ -873,9 +874,16 @@ void LLTabContainer::addTabPanel(LLPanel* child,
873874
}
874875
}
875876
std::string tooltip = trimmed_label;
876-
// FIXME: Tooltip can not be translated when hardcoded.
877-
tooltip += "\nAlt-Left arrow for previous tab";
878-
tooltip += "\nAlt-Right arrow for next tab";
877+
LLStringUtil::format_map_t args;
878+
args["[ALT]"] = LLTrans::getString(
879+
#ifdef LL_DARWIN
880+
"accel-mac-option"
881+
#else
882+
"accel-win-alt"
883+
#endif
884+
);
885+
tooltip += '\n' + LLTrans::getString("tab_tooltip_prev", args);
886+
tooltip += '\n' + LLTrans::getString("tab_tooltip_next", args);
879887
btn->setToolTip( tooltip );
880888
}
881889

0 commit comments

Comments
 (0)