зеркало из https://github.com/mozilla/gecko-dev.git
Bug 771733 - Don't use plural tabs description in tabs button when only one tab exists. r=sriram
This commit is contained in:
Родитель
aa60956348
Коммит
5616394644
|
@ -360,9 +360,10 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
|||
}
|
||||
|
||||
mTabsCount.setText(String.valueOf(count));
|
||||
mTabs.setContentDescription((count > 1) ?
|
||||
mContext.getString(R.string.num_tabs, count) :
|
||||
mContext.getString(R.string.one_tab));
|
||||
mCount = count;
|
||||
mTabs.setContentDescription(mContext.getString(R.string.num_tabs, count));
|
||||
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
((TextView) mTabsCount.getCurrentView()).setTextColor(mContext.getResources().getColor(R.color.url_bar_text_highlight));
|
||||
|
@ -378,7 +379,9 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
|||
|
||||
public void updateTabCount(int count) {
|
||||
mTabsCount.setCurrentText(String.valueOf(count));
|
||||
mTabs.setContentDescription(mContext.getString(R.string.num_tabs, count));
|
||||
mTabs.setContentDescription((count > 1) ?
|
||||
mContext.getString(R.string.num_tabs, count) :
|
||||
mContext.getString(R.string.one_tab));
|
||||
mCount = count;
|
||||
updateTabs(GeckoApp.mAppContext.areTabsShown());
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
|
||||
<!ENTITY close_tab "Close Tab">
|
||||
<!ENTITY new_tab "New Tab">
|
||||
<!ENTITY one_tab "1 tab">
|
||||
<!-- Localization note (num_tabs) : Number of tabs is always more than one.
|
||||
We can't use android plural forms, sadly. See bug #753859. -->
|
||||
<!ENTITY num_tabs "%d tabs">
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
<string name="close_tab">&close_tab;</string>
|
||||
<string name="new_tab">&new_tab;</string>
|
||||
<string name="new_tab_opened">&new_tab_opened;</string>
|
||||
<string name="one_tab">&one_tab;</string>
|
||||
<string name="num_tabs">&num_tabs;</string>
|
||||
<string name="addons">&addons;</string>
|
||||
<string name="downloads">&downloads;</string>
|
||||
|
|
Загрузка…
Ссылка в новой задаче