Bug 997288 - Follow-up, Part 1: Replace "Switch to tab" button icon and label. r=lucasr

This commit is contained in:
Nick Alexander 2014-05-28 14:13:54 -07:00
parent 39bf9d2461
commit c64507dc16
11 changed files with 18 additions and 4 deletions

View File

@ -196,11 +196,12 @@ abstract class HomeFragment extends Fragment {
final String message = isPrivate ?
getResources().getString(R.string.new_private_tab_opened) :
getResources().getString(R.string.new_tab_opened);
final String buttonMessage = getResources().getString(R.string.switch_button_message);
final GeckoApp geckoApp = (GeckoApp) context;
geckoApp.getButtonToast().show(false,
message,
null,
R.drawable.select_opened_tab,
buttonMessage,
R.drawable.switch_button_icon,
new ButtonToast.ToastListener() {
@Override
public void onButtonClicked() {

View File

@ -63,6 +63,10 @@
<!ENTITY num_tabs2 "&formatD; tabs">
<!ENTITY new_tab_opened "New tab opened">
<!ENTITY new_private_tab_opened "New private tab opened">
<!-- Localization note (switch_button_message): This string should be as short
as possible because it's shown as a label in a toast. Ideally, this string
is upper-case, to match Google and Android's convention. -->
<!ENTITY switch_button_message "SWITCH">
<!ENTITY settings "Settings">
<!ENTITY settings_title "Settings">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -237,6 +237,7 @@
<string name="close_tab">&close_tab;</string>
<string name="new_tab_opened">&new_tab_opened;</string>
<string name="new_private_tab_opened">&new_private_tab_opened;</string>
<string name="switch_button_message">&switch_button_message;</string>
<string name="one_tab">&one_tab;</string>
<string name="num_tabs">&num_tabs2;</string>
<string name="addons">&addons;</string>

View File

@ -490,9 +490,11 @@ var BrowserApp = {
let newtabStrings = Strings.browser.GetStringFromName("newtabpopup.opened");
let label = PluralForm.get(1, newtabStrings).replace("#1", 1);
let buttonLabel = Strings.browser.GetStringFromName("newtabpopup.switch");
NativeWindow.toast.show(label, "long", {
button: {
icon: "drawable://select_opened_tab",
icon: "drawable://switch_button_icon",
label: buttonLabel,
callback: () => { BrowserApp.selectTab(tab); },
}
});
@ -507,9 +509,11 @@ var BrowserApp = {
let newtabStrings = Strings.browser.GetStringFromName("newprivatetabpopup.opened");
let label = PluralForm.get(1, newtabStrings).replace("#1", 1);
let buttonLabel = Strings.browser.GetStringFromName("newtabpopup.switch");
NativeWindow.toast.show(label, "long", {
button: {
icon: "drawable://select_opened_tab",
icon: "drawable://switch_button_icon",
label: buttonLabel,
callback: () => { BrowserApp.selectTab(tab); },
}
});

View File

@ -123,6 +123,10 @@ contacts.dontAskAgain=Don't ask again for this site
newtabpopup.opened=New tab opened;#1 new tabs opened
newprivatetabpopup.opened=New private tab opened;#1 new private tabs opened
# LOCALIZATION NOTE (newtabpopup.switch): Ideally, this string is short (it's a
# button label) and upper-case, to match Google and Android's convention.
newtabpopup.switch=SWITCH
# Undo close tab toast
# LOCALIZATION NOTE (undoCloseToast.message): This message appears in a toast
# when the user closes a tab. %S is the title of the tab that was closed.