Make Linux happy. And finish FIXME in tabcontainer to remove hardcoded strings.

Translators: Please translatetab_tooltip_prev and tab_tooltip_next in strings.xml
This commit is contained in:
Inusaito Sayori
2015-10-05 22:14:10 -04:00
parent bc0709b9c6
commit 897e175d3c
3 changed files with 19 additions and 6 deletions

View File

@@ -64,7 +64,7 @@ public:
virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0; virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0;
}; };
/* Singu TODO: LLPanel::Params, LLTextBox::Params #if 0 // Singu TODO: LLPanel::Params, LLTextBox::Params
struct Params struct Params
: public LLInitParam::Block<Params, LLPanel::Params> : public LLInitParam::Block<Params, LLPanel::Params>
{ {
@@ -73,7 +73,7 @@ public:
accordion tabs are responsible for scrolling their content. accordion tabs are responsible for scrolling their content.
*NOTE fit_parent works best when combined with single_expansion. *NOTE fit_parent works best when combined with single_expansion.
Accordion view should implement getRequiredRect() and provide valid height*/ Accordion view should implement getRequiredRect() and provide valid height*/
/*Optional<LLTextBox::Params> no_matched_tabs_text; Optional<LLTextBox::Params> no_matched_tabs_text;
Optional<LLTextBox::Params> no_visible_tabs_text; Optional<LLTextBox::Params> no_visible_tabs_text;
Params() Params()
@@ -84,7 +84,8 @@ public:
{}; {};
}; };
LLAccordionCtrl(const Params& params);*/ LLAccordionCtrl(const Params& params);
#endif
LLAccordionCtrl(); LLAccordionCtrl();
virtual ~LLAccordionCtrl(); virtual ~LLAccordionCtrl();

View File

@@ -40,6 +40,7 @@
#include "llresmgr.h" #include "llresmgr.h"
#include "llresizehandle.h" #include "llresizehandle.h"
#include "lltextbox.h" #include "lltextbox.h"
#include "lltrans.h"
#include "llcriticaldamp.h" #include "llcriticaldamp.h"
#include "lluictrlfactory.h" #include "lluictrlfactory.h"
#include "llrender.h" #include "llrender.h"
@@ -873,9 +874,16 @@ void LLTabContainer::addTabPanel(LLPanel* child,
} }
} }
std::string tooltip = trimmed_label; std::string tooltip = trimmed_label;
// FIXME: Tooltip can not be translated when hardcoded. LLStringUtil::format_map_t args;
tooltip += "\nAlt-Left arrow for previous tab"; args["[ALT]"] = LLTrans::getString(
tooltip += "\nAlt-Right arrow for next tab"; #ifdef LL_DARWIN
"accel-mac-option"
#else
"accel-win-alt"
#endif
);
tooltip += '\n' + LLTrans::getString("tab_tooltip_prev", args);
tooltip += '\n' + LLTrans::getString("tab_tooltip_next", args);
btn->setToolTip( tooltip ); btn->setToolTip( tooltip );
} }

View File

@@ -3496,6 +3496,10 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh
<string name="accel-win-alt">Alt-</string> <string name="accel-win-alt">Alt-</string>
<string name="accel-win-shift">Shift-</string> <string name="accel-win-shift">Shift-</string>
<!-- Tab Containers -->
<string name="tab_tooltip_prev">[ALT]Left arrow for previous tab</string>
<string name="tab_tooltip_next">[ALT]Right arrow for next tab</string>
<!-- Previews --> <!-- Previews -->
<string name="FileSaved">File Saved</string> <string name="FileSaved">File Saved</string>
<string name="Receiving">Receiving</string> <string name="Receiving">Receiving</string>