Bug 1147535 - Update failure string in share overlay toast. r=liuche
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 25 Mar 2015 13:39:39 -0700
changeset 266034 e88d6472a87f172e978f544949778f024ab0196e
parent 266033 b65fd368fdb16c080c3381240cb582370604f1e6
child 266035 3bf5485eb14b0bcb71363ca85a711f91926c5fd6
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs1147535
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1147535 - Update failure string in share overlay toast. r=liuche Also took the opportunity to center the text because it now frequently will take up two lines.
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/overlays/service/sharemethods/SendTab.java
mobile/android/base/resources/layout/overlay_share_toast.xml
mobile/android/base/strings.xml.in
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -115,16 +115,23 @@
 <!ENTITY overlay_share_send_tab_btn_label "Send to another device">
 <!ENTITY overlay_share_no_url "No link found in this share">
 <!ENTITY overlay_share_retry "Try again">
 <!ENTITY overlay_share_select_device "Select device">
 <!-- Localization note (overlay_no_synced_devices) : Used when the menu option
      to send a tab to a synced device is pressed and no other synced devices
      are found. -->
 <!ENTITY overlay_no_synced_devices "No Firefox Account connected devices found">
+<!-- Localization note (overlay_share_tab_not_sent) : Used when the menu option
+     to send a tab to a synced device is pressed and there is an error
+     connecting to the server so the tab could not be sent. The text should be
+     divided into two lines (use the newline escape character, "\n", between
+     them): the first notifying the user about the failure and the second
+     telling the user what to do about it. -->
+<!ENTITY overlay_share_tab_not_sent "Your tab could not be sent.\nPlease try again later.">
 
 <!ENTITY pref_category_search3 "Search">
 <!ENTITY pref_category_search_summary "Customize your search providers">
 <!ENTITY pref_category_display "Display">
 <!ENTITY pref_category_display_summary "Text, title bar, full-screen browsing">
 <!ENTITY pref_category_privacy_short "Privacy">
 <!ENTITY pref_category_privacy_summary "Control passwords, cookies, tracking, data">
 <!ENTITY pref_category_vendor "&vendorShortName;">
--- a/mobile/android/base/overlays/service/sharemethods/SendTab.java
+++ b/mobile/android/base/overlays/service/sharemethods/SendTab.java
@@ -298,17 +298,17 @@ public class SendTab extends ShareMethod
 
     @Override
     public String getSuccessMessage() {
         return context.getResources().getString(R.string.sync_text_tab_sent);
     }
 
     @Override
     public String getFailureMessage() {
-        return context.getResources().getString(R.string.sync_text_tab_not_sent);
+        return context.getResources().getString(R.string.overlay_share_tab_not_sent);
     }
 
     /**
      * Inteface for interacting with Sync accounts. Used to hide the difference in implementation
      * between FXA and "old sync" accounts when sending tabs.
      */
     private interface TabSender {
         public static final String[] STAGES_TO_SYNC = new String[] { "clients", "tabs" };
--- a/mobile/android/base/resources/layout/overlay_share_toast.xml
+++ b/mobile/android/base/resources/layout/overlay_share_toast.xml
@@ -10,17 +10,17 @@
     android:layout_height="wrap_content"
     android:background="@drawable/dropshadow"
     android:padding="3dp">
 
     <TextView
         android:id="@+id/overlay_toast_message"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical"
+        android:gravity="center"
         android:padding="20dp"
         android:background="@drawable/toolbar_grey_round"
         android:textColor="@color/text_and_tabs_tray_grey"
         android:textSize="14sp"
         android:drawablePadding="15dp"
         android:drawableLeft="@drawable/overlay_check"/>
 
 </FrameLayout>
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -115,16 +115,17 @@
   <string name="overlay_share_reading_list_btn_label">&overlay_share_reading_list_btn_label;</string>
   <string name="overlay_share_bookmark_btn_label_already">&overlay_share_bookmark_btn_label_already;</string>
   <string name="overlay_share_reading_list_btn_label_already">&overlay_share_reading_list_btn_label_already;</string>
   <string name="overlay_share_send_tab_btn_label">&overlay_share_send_tab_btn_label;</string>
   <string name="overlay_share_no_url">&overlay_share_no_url;</string>
   <string name="overlay_share_retry">&overlay_share_retry;</string>
   <string name="overlay_share_select_device">&overlay_share_select_device;</string>
   <string name="overlay_no_synced_devices">&overlay_no_synced_devices;</string>
+  <string name="overlay_share_tab_not_sent">&overlay_share_tab_not_sent;</string>
 
   <string name="settings">&settings;</string>
   <string name="settings_title">&settings_title;</string>
   <string name="pref_category_advanced">&pref_category_advanced;</string>
   <string name="pref_category_customize">&pref_category_customize;</string>
   <string name="pref_category_customize_summary">&pref_category_customize_summary;</string>
   <string name="pref_category_customize_alt_summary">&pref_category_customize_alt_summary;</string>