Эх сурвалжийг харах

lint: remove hardcoded strings

AndyScherzinger 7 жил өмнө
parent
commit
2cb8785fd0

+ 45 - 51
src/main/res/layout/grid_sync_item.xml

@@ -2,8 +2,8 @@
 <!--
   Nextcloud Android client application
 
-  Copyright (C) 2016 Andy Scherzinger
-  Copyright (C) 2016 Nextcloud.
+  Copyright (C) 2017 Andy Scherzinger
+  Copyright (C) 2017 Nextcloud.
 
   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -18,60 +18,54 @@
   You should have received a copy of the GNU Affero General Public
   License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
-<LinearLayout android:id="@+id/grid_item_container"
-              xmlns:android="http://schemas.android.com/apk/res/android"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:layout_gravity="center_horizontal"
-              android:background="@drawable/list_selector"
-              android:gravity="center_horizontal"
-              android:orientation="vertical">
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/grid_item_container"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_gravity="center_horizontal"
+    android:background="@drawable/list_selector"
+    android:gravity="center_horizontal">
 
-    <FrameLayout
+    <com.owncloud.android.ui.SquareImageView
+        android:id="@+id/thumbnail"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:scaleType="centerCrop"
+        android:src="@drawable/folder"/>
 
-        <com.owncloud.android.ui.SquareImageView
-            android:id="@+id/thumbnail"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scaleType="centerCrop"
-            android:src="@drawable/folder"/>
+    <ImageView
+        android:id="@+id/thumbnailDarkener"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="#99000000"
+        android:scaleType="centerCrop"/>
 
-        <ImageView
-            android:id="@+id/thumbnailDarkener"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scaleType="centerCrop"
-            android:background="#99000000"/>
+    <LinearLayout
+        android:id="@+id/counterLayout"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical|center_horizontal"
+        android:gravity="center_horizontal"
+        android:orientation="horizontal">
 
-        <LinearLayout
-            android:id="@+id/counterLayout"
+        <TextView
+            android:id="@+id/next"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical|center_horizontal"
-            android:gravity="center_horizontal"
-            android:orientation="horizontal">
-
-            <TextView
-                android:id="@+id/next"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="+"
-                android:textColor="#ffffff"
-                android:textSize="22dp"
-                android:textStyle="bold"/>
-
-            <TextView
-                android:id="@+id/counter"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:src="@android:drawable/checkbox_off_background"
-                android:text="127"
-                android:textColor="#ffffff"
-                android:textSize="22dp"
-                android:textStyle="bold"/>
-        </LinearLayout>
-    </FrameLayout>
+            android:text="@string/synced_folders_plus"
+            android:textColor="#ffffff"
+            android:textSize="22sp"
+            android:textStyle="bold"/>
 
-</LinearLayout>
+        <TextView
+            android:id="@+id/counter"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@android:drawable/checkbox_off_background"
+            android:text="@string/placeholder_filesize"
+            android:textColor="#ffffff"
+            android:textSize="22sp"
+            android:textStyle="bold"/>
+    </LinearLayout>
+</FrameLayout>

+ 4 - 3
src/main/res/layout/list_item.xml

@@ -110,7 +110,7 @@
                     android:id="@+id/file_size"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="Size MB"
+                    android:text="@string/placeholder_filesize"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textSize="@dimen/two_line_secondary_text_size"/>
 
@@ -118,8 +118,9 @@
                     android:id="@+id/file_separator"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:paddingRight="@dimen/standard_quarter_padding"
                     android:gravity="right"
-                    android:text=", "
+                    android:text="@string/info_separator"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textSize="@dimen/two_line_secondary_text_size"/>
 
@@ -128,7 +129,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:gravity="right"
-                    android:text="Mod Date"
+                    android:text="@string/placeholder_media_time"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textSize="@dimen/two_line_secondary_text_size"/>
 

+ 1 - 1
src/main/res/layout/synced_folders_settings_layout.xml

@@ -402,7 +402,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentLeft="true"
-            android:text="delete"/>
+            android:text="@string/common_delete"/>
 
         <LinearLayout
             android:layout_width="wrap_content"

+ 5 - 4
src/main/res/layout/uploader_list_item_layout.xml

@@ -47,7 +47,7 @@
             android:layout_marginRight="@dimen/standard_quarter_margin"
             android:ellipsize="middle"
             android:singleLine="true"
-            android:text="TextView"
+            android:text="@string/placeholder_filename"
             android:textColor="@color/textColor"
             android:textSize="@dimen/two_line_primary_text_size" />
 
@@ -62,7 +62,7 @@
                 android:id="@+id/file_size"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="Size MB"
+                android:text="@string/placeholder_filesize"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:textSize="@dimen/two_line_secondary_text_size"/>
 
@@ -70,8 +70,9 @@
                 android:id="@+id/file_separator"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
+                android:paddingRight="@dimen/standard_quarter_padding"
                 android:gravity="right"
-                android:text=", "
+                android:text="@string/info_separator"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:textSize="@dimen/two_line_secondary_text_size"/>
 
@@ -80,7 +81,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:gravity="right"
-                android:text="Mod Date"
+                android:text="@string/placeholder_media_time"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:textSize="@dimen/two_line_secondary_text_size"/>
 

+ 4 - 1
src/main/res/values/strings.xml

@@ -157,6 +157,7 @@
     <string name="common_unknown">unknown</string>
     <string name="common_error_unknown">Unknown error</string>
     <string name="common_pending">Pending</string>
+    <string name="common_delete">Delete</string>
     <string name="about_title">About</string>
     <string name="change_password">Change password</string>
     <string name="delete_account">Remove account</string>
@@ -596,6 +597,7 @@
     <string name="synced_folders_settings">Settings</string>
     <string name="synced_folders_new_info">Instant uploading has been revamped completely. Re-configure your auto upload from within the main menu.\n\nEnjoy the new and extended auto uploading.</string>
     <string name="synced_folders_preferences_folder_path">For %1$s</string>
+    <string name="synced_folders_plus" translatable="false">+</string>
     <plurals name="items_selected_count">
         <!--
              As a developer, you should always supply "one" and "other"
@@ -690,6 +692,7 @@
     <string name="autoupload_create_new_custom_folder">Create new custom folder setup</string>
     <string name="synced_folders_configure_folders">Configure folders</string>
 
-  <string name="empty" translatable="false"/>
+    <string name="empty" translatable="false"/>
     <string name="test_server_button">Test server connection</string>
+    <string name="info_separator" translatable="false">,</string>
 </resources>