Bug 1380983 - Show title as "Edit Folder" when editing a bookmark folder. r?Grisha draft
authorjwu <jwu@mozilla.com>
Mon, 24 Jul 2017 09:06:51 +0800
changeset 614077 79a53ba54f0d59c33ee72a55bee0693328676503
parent 614076 6c71ca49860b3a7a07ab35722f42990f4ebeeffc
child 638769 d6477f86f63feadc751f39a88419615e262cb4fd
push id69906
push userbmo:topwu.tw@gmail.com
push dateMon, 24 Jul 2017 01:07:59 +0000
reviewersGrisha
bugs1380983
milestone56.0a1
Bug 1380983 - Show title as "Edit Folder" when editing a bookmark folder. r?Grisha MozReview-Commit-ID: 7l20XXj2jHP
mobile/android/app/src/main/res/layout/bookmark_edit_with_full_page.xml
mobile/android/base/java/org/mozilla/gecko/bookmarks/BookmarkEditFragment.java
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/strings.xml.in
--- a/mobile/android/app/src/main/res/layout/bookmark_edit_with_full_page.xml
+++ b/mobile/android/app/src/main/res/layout/bookmark_edit_with_full_page.xml
@@ -15,17 +15,16 @@
         android:id="@+id/toolbar"
         android:layout_width="match_parent"
         android:layout_height="56dp"
         android:background="@color/text_and_tabs_tray_grey"
         android:minHeight="?actionBarSize"
         app:navigationIcon="@drawable/abc_ic_clear_mtrl_alpha"
         app:subtitleTextColor="@android:color/white"
         app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
-        app:title="@string/bookmark_edit_title"
         app:titleTextColor="@android:color/white" />
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="1"
         android:orientation="vertical"
         android:paddingEnd="16dp"
--- a/mobile/android/base/java/org/mozilla/gecko/bookmarks/BookmarkEditFragment.java
+++ b/mobile/android/base/java/org/mozilla/gecko/bookmarks/BookmarkEditFragment.java
@@ -227,18 +227,20 @@ public class BookmarkEditFragment extend
     }
 
     private void invalidateView(Bookmark bookmark) {
         this.bookmark = bookmark;
 
         nameText.setText(bookmark.title);
 
         if (bookmark.type == Bookmarks.TYPE_FOLDER) {
+            toolbar.setTitle(R.string.bookmark_edit_folder_title);
             locationLayout.setVisibility(View.GONE);
         } else {
+            toolbar.setTitle(R.string.bookmark_edit_title);
             locationLayout.setVisibility(View.VISIBLE);
         }
         locationText.setText(bookmark.url);
 
         if (Bookmarks.MOBILE_FOLDER_GUID.equals(bookmark.guid)) {
             folderText.setText(R.string.bookmarks_folder_mobile);
         } else {
             folderText.setText(bookmark.folder);
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -543,16 +543,17 @@
 <!ENTITY pref_compact_tabs_summary2 "Arrange tabs in two columns in portrait mode">
 
 <!-- Localization note (page_removed): This string appears in a toast message when
      any page is removed frome about:home. This includes pages that are in history,
      bookmarks, or reading list. -->
 <!ENTITY page_removed "Page removed">
 
 <!ENTITY bookmark_edit_title "Edit Bookmark">
+<!ENTITY bookmark_edit_folder_title "Edit Folder">
 <!ENTITY bookmark_edit_name "Name">
 <!ENTITY bookmark_edit_location "Location">
 <!ENTITY bookmark_edit_keyword "Keyword">
 <!ENTITY bookmark_select_folder "Select folder">
 
 <!-- Localization note (site_settings_*) : These strings are used in the "Site Settings"
      dialog that appears after selecting the "Edit Site Settings" context menu item. -->
 <!ENTITY site_settings_title3       "Site Settings">
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -431,16 +431,17 @@
   <string name="pref_scroll_title_bar_summary">&pref_scroll_title_bar_summary2;</string>
 
   <string name="pref_compact_tabs">&pref_compact_tabs;</string>
   <string name="pref_compact_tabs_summary">&pref_compact_tabs_summary2;</string>
 
   <string name="page_removed">&page_removed;</string>
 
   <string name="bookmark_edit_title">&bookmark_edit_title;</string>
+  <string name="bookmark_edit_folder_title">&bookmark_edit_folder_title;</string>
   <string name="bookmark_edit_name">&bookmark_edit_name;</string>
   <string name="bookmark_edit_location">&bookmark_edit_location;</string>
   <string name="bookmark_edit_keyword">&bookmark_edit_keyword;</string>
   <string name="bookmark_select_folder">&bookmark_select_folder;</string>
 
   <string name="pref_use_master_password">&pref_use_master_password;</string>
   <string name="masterpassword_create_title">&masterpassword_create_title;</string>
   <string name="masterpassword_remove_title">&masterpassword_remove_title;</string>