Selaa lähdekoodia

fix string arrays, so n.o. elements doesn't depend on translation status, make upload spinner translatable

Andy Scherzinger 8 vuotta sitten
vanhempi
commit
e45816a5ed

+ 12 - 8
res/values/attrs.xml

@@ -2,30 +2,34 @@
 <resources>
 
 	<declare-styleable name="ActionEditText">
-
 		<attr name="optionOneString" format="string" />
 		<attr name="optionOneColor" format="color" />
     	<attr name="optionTwoString" format="string" />
 		<attr name="optionTwoColor" format="color" />
 		<attr name="onBadgeClick" format="string" />
-
 	</declare-styleable>
 
-	<string-array name="pref_behaviour_entries">
+	<string-array name="pref_behaviour_entries" translatable="false">
 		<item>@string/pref_behaviour_entries_keep_file</item>
 		<item>@string/pref_behaviour_entries_move</item>
 		<item>@string/pref_behaviour_entries_delete_file</item>
 	</string-array>
 
-	<string-array name="pref_behaviour_entryValues">
+	<string-array name="pref_behaviour_entryValues" translatable="false">
 		<item>NOTHING</item>
 		<item>MOVE</item>
 		<item>DELETE</item>
 	</string-array>
 
-	<string-array name="upload_files_behaviour">
-		<item>move to nextcloud folder</item>
-		<item>only upload</item>
-		<item>upload and delete from source</item>
+	<string-array name="upload_files_behaviour" translatable="false">
+		<item>@string/uploader_upload_files_behaviour_move_to_nextcloud_folder</item>
+		<item>@string/uploader_upload_files_behaviour_only_upload</item>
+		<item>@string/uploader_upload_files_behaviour_upload_and_delete_from_source</item>
+	</string-array>
+
+	<string-array name="menu_items_sort_by_options" translatable="false">
+		<item>@string/menu_item_sort_by_name</item>
+		<item>@string/menu_item_sort_by_date</item>
+		<item>@string/menu_item_sort_by_size</item>
 	</string-array>
 </resources>

+ 6 - 5
res/values/strings.xml

@@ -14,11 +14,9 @@
     <string name="actionbar_send_file">Send</string>
     <string name="actionbar_sort">Sort</string>
     <string name="actionbar_sort_title">Sort by</string>
-    <string-array name="actionbar_sortby">
-    	<item>A-Z</item>
-    	<item>Newest - Oldest</item>
-    	<item>Biggest - Smallest</item>
-    </string-array>
+    <string name="menu_item_sort_by_name">A - Z</string>
+    <string name="menu_item_sort_by_date">Newest - Oldest</string>
+    <string name="menu_item_sort_by_size">Biggest - Smallest</string>
     <string name="drawer_item_all_files">All files</string>
     <string name="drawer_item_on_device">On device</string>
     <string name="drawer_item_settings">Settings</string>
@@ -71,6 +69,9 @@
     <string name="uploader_error_message_read_permission_not_granted">%1$s is not allowed to read a received file</string>
     <string name="uploader_error_message_source_file_not_found">File to upload was not found in its location. Please check whether the file exists.</string>
     <string name="uploader_error_message_source_file_not_copied">An error occurred while copying the file to a temporary folder. Please try to send again.</string>
+    <string name="uploader_upload_files_behaviour_move_to_nextcloud_folder">move to nextcloud folder</string>
+    <string name="uploader_upload_files_behaviour_only_upload">only upload</string>
+    <string name="uploader_upload_files_behaviour_upload_and_delete_from_source">upload and delete from source</string>
     <string name="file_list_seconds_ago">seconds ago</string>
     <string name="file_list_empty">Nothing in here. Upload something!</string>
     <string name="file_list_loading">Loading&#8230;</string>

+ 1 - 1
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -574,7 +574,7 @@ public class FileDisplayActivity extends HookActivity
 
                 AlertDialog.Builder builder = new AlertDialog.Builder(this);
                 builder.setTitle(R.string.actionbar_sort_title)
-                        .setSingleChoiceItems(R.array.actionbar_sortby, sortOrder,
+                        .setSingleChoiceItems(R.array.menu_items_sort_by_options, sortOrder,
                                 new DialogInterface.OnClickListener() {
                                     public void onClick(DialogInterface dialog, int which) {
                                         switch (which) {