瀏覽代碼

Merge branch 'master' of https://github.com/owncloud/android into material_buttons

Andy Scherzinger 9 年之前
父節點
當前提交
13a73dd568

+ 23 - 4
res/layout/file_actions.xml

@@ -3,12 +3,31 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:layout_margin="@dimen/standard_margin">
+    android:layout_margin="@dimen/standard_margin"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/file_actions_header"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="@dimen/standard_padding"
+        android:textColor="@color/black"
+        android:visibility="gone"
+        />
+
+    <View
+        android:id="@+id/file_actions_header_divider"
+        android:layout_width="match_parent"
+        android:layout_height="2dp"
+        android:background="@color/owncloud_blue"
+        android:visibility="gone"
+        />
 
     <ListView
         android:id="@+id/file_actions_list"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" >
-    </ListView>
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        />
 
-</LinearLayout> 
+</LinearLayout >

+ 11 - 0
res/values-nb-rNO/strings.xml

@@ -202,6 +202,8 @@
   <string name="confirmation_remove_folder_alert">Vil du virkelig fjerne %1$s inkludert innholdet?</string>
   <string name="confirmation_remove_local">Kun lokalt</string>
   <string name="confirmation_remove_folder_local">Kun lokalt</string>
+  <string name="confirmation_remove_remote">Fra server</string>
+  <string name="confirmation_remove_remote_and_local">Ekstern &amp; lokal</string>
   <string name="remove_success_msg">Fjerning var vellykket</string>
   <string name="remove_fail_msg">Fjerning mislyktes</string>
   <string name="rename_dialog_title">Skriv inn et nytt navn</string>
@@ -253,7 +255,11 @@
   <string name="instant_upload_on_wifi">Kun last opp bilder via WiFi</string>
   <string name="instant_video_upload_on_wifi">Last opp video kun via WiFi</string>
   <string name="instant_upload_path">/Direkteopplasting</string>
+  <string name="conflict_title">Filkonflikt</string>
+  <string name="conflict_message">Hvilke filer ønsker du å beholder? Hvis du velger begge versjonene, får den lokale filen lagt til et tall i navnet.</string>
   <string name="conflict_keep_both">Behold begge</string>
+  <string name="conflict_use_local_version">lokal versjon</string>
+  <string name="conflict_use_server_version">server-versjon</string>
   <string name="preview_image_description">Bildeforhåndsvisning</string>
   <string name="preview_image_error_unknown_format">Dette bildet kan ikke vises</string>
   <string name="error__upload__local_file_not_copied">%1$s kunne ikke kopieres til lokal mappe %2$s</string>
@@ -301,7 +307,11 @@
   <string name="move_file_invalid_overwrite">Filen finnes allerede i målmappen</string>
   <string name="move_file_error">En feil oppstod ved flytting av denne filen eller mappen</string>
   <string name="forbidden_permissions_move">å flytte denne filen</string>
+  <string name="copy_file_not_found">Kan ikke kopiere. Sjekk om filen eksisterer</string>
+  <string name="copy_file_invalid_into_descendent">Det er ikke mulig å kopiere en mappe inn i sin egen undermappe</string>
   <string name="copy_file_invalid_overwrite">Filen finnes allerede i målmappen</string>
+  <string name="copy_file_error">En feil oppstod ved kopiering av denne filen eller mappen</string>
+  <string name="forbidden_permissions_copy">å kopiere denne filen</string>
   <string name="prefs_category_instant_uploading">Umiddelbare opplastinger</string>
   <string name="prefs_category_security">Sikkerhet</string>
   <string name="prefs_instant_video_upload_path_title">Sti til video-opplasting</string>
@@ -309,6 +319,7 @@
   <string name="shared_subject_header">delte</string>
   <string name="with_you_subject_header">med deg</string>
   <string name="subject_token">%1$s delte \"%2$s\" med deg</string>
+  <string name="saml_subject_token">\"%1$s\" er blitt delt med deg</string>
   <string name="auth_refresh_button">Oppfrisk forbindelse</string>
   <string name="auth_host_address">Server-adresse</string>
   <string name="common_error_out_memory">Ikke nok minne</string>

+ 5 - 0
res/values-th-rTH/strings.xml

@@ -289,6 +289,7 @@
   <string name="downloader_download_file_not_found">ไฟล์ไม่พร้อมใช้งานบนเซิร์ฟเวอร์</string>
   <string name="prefs_category_accounts">บัญชี</string>
   <string name="prefs_add_account">เพิ่มบัญชี</string>
+  <string name="auth_redirect_non_secure_connection_title">เชื่อมต่อที่ปลอดภัยถูกเปลี่ยนเส้นทางผ่านเราเตอร์ที่ไม่ปลอดภัย</string>
   <string name="actionbar_logger">บันทึก</string>
   <string name="log_send_history_button">ส่งประวัติ</string>
   <string name="log_send_no_mail_app">ไม่พบการส่งบันทึกของแอพฯ ติดตั้งแอพฯเมล!</string>
@@ -304,7 +305,11 @@
   <string name="move_file_invalid_overwrite">มีไฟล์อยู่แล้วในโฟลเดอร์ปลายทาง</string>
   <string name="move_file_error">เกิดข้อผิดพลาดขณะพยายามที่จะย้ายไฟล์หรือโฟลเดอร์นี้</string>
   <string name="forbidden_permissions_move">เพื่อย้ายไฟล์นี้</string>
+  <string name="copy_file_not_found">ไม่สามารถคัดลอก กรุณาตรวจสอบว่ามีไฟล์นั้นอยู่</string>
+  <string name="copy_file_invalid_into_descendent">มันเป็นไปไม่ได้ที่จะคัดลอกลงในโฟลเดอร์โฟลเดอร์ย่อย</string>
   <string name="copy_file_invalid_overwrite">มีไฟล์อยู่แล้วในโฟลเดอร์ปลายทาง</string>
+  <string name="copy_file_error">เกิดข้อผิดพลาดขณะพยายามคัดลอกไฟล์หรือโฟลเดอร์นี้</string>
+  <string name="forbidden_permissions_copy">เพื่อคัดลอกไฟล์นี้</string>
   <string name="prefs_category_instant_uploading">อัพโหลดทันที</string>
   <string name="prefs_category_security">ความปลอดภัย</string>
   <string name="prefs_instant_video_upload_path_title">อัพโหลดเส้นทางวิดีโอ</string>

+ 14 - 2
src/com/owncloud/android/ui/dialog/FileActionsDialogFragment.java

@@ -12,6 +12,7 @@ import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.ArrayAdapter;
 import android.widget.ListView;
+import android.widget.TextView;
 
 import com.owncloud.android.R;
 import com.owncloud.android.ui.dialog.parcel.MenuItemParcelable;
@@ -27,6 +28,7 @@ public class FileActionsDialogFragment extends DialogFragment implements
         OnItemClickListener {
     private static final String ARG_ITEM_LIST = "ITEM_LIST";
     private static final String ARG_FILE_POSITION = "FILE_POSITION";
+    private static final String ARG_FILE_NAME = "FILE_NAME";
     public static final String FTAG_FILE_ACTIONS = "FILE_ACTIONS_FRAGMENT";
 
     private List<MenuItemParcelable> mMenuItems;
@@ -48,7 +50,7 @@ public class FileActionsDialogFragment extends DialogFragment implements
      * @param menu menu to be display.
      * @return Dialog ready to show.
      */
-    public static FileActionsDialogFragment newInstance(Menu menu, int filePosition) {
+    public static FileActionsDialogFragment newInstance(Menu menu, int filePosition, String fileName) {
         FileActionsDialogFragment fragment = new FileActionsDialogFragment();
         Bundle args = new Bundle();
 
@@ -57,6 +59,7 @@ public class FileActionsDialogFragment extends DialogFragment implements
 
         args.putParcelable(ARG_ITEM_LIST, menuParcelable);
         args.putInt(ARG_FILE_POSITION, filePosition);
+        args.putCharSequence(ARG_FILE_NAME, fileName);
 
         fragment.setArguments(args);
         return fragment;
@@ -80,7 +83,16 @@ public class FileActionsDialogFragment extends DialogFragment implements
         View view = inflater.inflate(R.layout.file_actions, null, false);
         mListView = (ListView) view.findViewById(R.id.file_actions_list);
 
-        getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+        CharSequence title =  getArguments().getCharSequence(ARG_FILE_NAME);
+        if(title != null && title.length() > 0) {
+            TextView header = (TextView)view.findViewById(R.id.file_actions_header);
+            header.setText(title);
+            header.setVisibility(View.VISIBLE);
+            view.findViewById(R.id.file_actions_header_divider).setVisibility(View.VISIBLE);
+        } else {
+            getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+        }
+
         return view;
     }
 

+ 1 - 1
src/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -193,7 +193,7 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
                 }
             }
 
-            FileActionsDialogFragment dialog = FileActionsDialogFragment.newInstance(menu, fileIndex);
+            FileActionsDialogFragment dialog = FileActionsDialogFragment.newInstance(menu, fileIndex, targetFile.getFileName());
             dialog.setTargetFragment(this, 0);
             dialog.show(getFragmentManager(), FileActionsDialogFragment.FTAG_FILE_ACTIONS);
         }