From: David A. Velasco Date: Wed, 5 Dec 2012 22:23:10 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/sync_review_2' X-Git-Tag: oc-android-1.4.3~80 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/279670c303c6b5e2c5a437b712e8d5ecf6f8b1a7?ds=inline;hp=-c Merge remote-tracking branch 'origin/sync_review_2' --- 279670c303c6b5e2c5a437b712e8d5ecf6f8b1a7 diff --combined res/values/strings.xml index 77b7a324,88a93ebf..3d99144e --- a/res/values/strings.xml +++ b/res/values/strings.xml @@@ -1,10 -1,11 +1,10 @@@ - Hello World, OwnCloudMainScreen! ownCloud Password: Username: Login - Welcome to your ownCloud + Welcome Files Music Contacts @@@ -12,9 -13,9 +12,9 @@@ Bookmarks Settings Setup Account - There are no ownCloud accounts on your device. In order to use this App, you need to create one. + There is no account set up on your device. In order to use this App, you need to create one. - ownCloud Android client\n\nversion: %1$s + %1$s Android App\n\nversion: %2$s Refresh Upload @@@ -29,41 -30,41 +29,41 @@@ Add new session Create image thumbnails Select an account - Choose, which of your accounts the app should use. - Device tracking - Enable ownCloud to track your device location - Your ownCloud keeps track of this device - Update interval + Choose which of your accounts the app should use. + Device Tracking + Enable this App to track your device location + This App keeps track of this device + Update Interval Update every %1$s minutes Accounts - Manage accounts - ownCloud App PIN - Protect your ownCloud client - Enable instant uploading + Manage Accounts + App PIN + Protect your client + Enable instant uploads Instantly upload photos taken by camera - ownCloud URL + URL Username Password - I am new to ownCloud - Wrong URL given - Wrong session name + I am new to %1$s + Incorrect address given + Incorrect session name Files No file selected for upload Username Password Web address Show password? - Connect to your ownCloud + Connect to your %1$s Connect Upload No account found - There are no ownCloud accounts on your device. Please setup an account first. + There are no %1$s accounts on your device. Please setup an account first. Setup Quit No content to upload No content was received. Nothing to upload. - ownCloud is not allowed to access the shared content + %1$s is not allowed to access the shared content Uploading Create directory for upload There are no files in this folder.\nNew files can be added with the \"Upload\" menu option. @@@ -84,7 -85,7 +84,7 @@@ Cancel upload Cancel Save & Exit - Leave ownCloud + Leave %1$s Error About @@@ -96,15 -97,15 +96,15 @@@ Uploading … %1$d%% Uploading %2$s Upload succeeded - %1$s was successfully upload - %1$d files were successfully upload + %1$s was successfully uploaded + %1$d files were successfully uploaded Upload failed Upload of %1$s could not be completed Upload failed: %1$d/%2$d files were upload Downloading … %1$d%% Downloading %2$s Download succeeded - %1$s was successfully download + %1$s was successfully downloaded Download failed Download of %1$s could not be completed Choose account @@@ -115,19 -116,31 +115,31 @@@ %1$d kept-in-sync files could not be sync\'ed Kept-in-sync files failed Contents of %1$d files could not be sync\'ed (%2$d conflicts) + Some local files were forgotten + %1$d files out of the ownCloud directory could not be copied into + "As of version 1.3.16, files uploaded from this device are copied into the local %1$s folder to prevent data loss when a single file is synced with multiple accounts.\n\nDue to this change, all files uploaded in previous versions of this app were copied into the %2$s folder. However, an error prevented the completion of this operation during account synchronization. You may either leave the file(s) as is and remove the link to %3$s, or move the file(s) into the %1$s directory and retain the link to %4$s.\n\nListed below are the local file(s), and the the remote file(s) in %5$s they were linked to. + + "Move all" + "All files were moved" + "Some files could not be moved" + "Local: %1$s" + "Remote: %1$s" + + There is not space enough to copy the selected files into the %1$s folder. Would like to move them into instead? + Use Secure Connection - ownCloud cannot track your device. Please check your location settings + %1$s cannot track your device. Please check your location settings Please, insert your App PIN Please, insert your new App PIN - Enter ownCloud App PIN + Enter your App PIN The PIN will be requested every time the app is started - Reenter ownCloud App PIN, please - Remove your ownCloud App PIN - Both ownCloud App PIN are not the same - Incorrect ownCloud App PIN - ownCloud App PIN removed - ownCloud App PIN stored + Please, reenter your App PIN + Remove your App PIN + The App PINs are not the same + Incorrect App PIN + App PIN removed + App PIN stored 15 Minutes @@@ -142,38 -155,35 +154,38 @@@ Trying to login… No network connection - No network connection have been detected, check your Internet connection and try again. + No network connection has been detected, check your Internet connection and try again. Connect anyway Secure connection unavailable. - Application couldn\'t establish a secure connection to server. Although non secure connection is available. You may continue or cancel. + The Application cannot establish a secure connection to the server. A non secure connection is available. You may continue or cancel. Connection established Testing connection… - Malformed ownCloud configuration - It seems that your ownCloud instance is not correctly configured. Contact your administrator for more details. + Malformed server configuration + It seems that your server instance is not correctly configured. Contact your administrator for more details. Unknown error occurred! - Unknown error occurred. Please contact authors and include logs from your device. + An unknown error occurred. Please contact support and include logs from your device. Couldn\'t find host Couldn\'t find the entered host. Please check hostname and server availability and try again. - ownCloud instance not found - Application couldn\'t find ownClound instance at given path. Please check your path and try again. + Server instance not found + Application couldn\'t find a server instance at the given path. Please check your path and try again. The server took too long to respond Malformed URL SSL initialization failed Unverified SSL server\'s identity - Unrecognized ownCloud server version + Unrecognized server version Couldn\'t establish connection Secure connection established Login details + Invalid login / password + Wrong path given + Internal server error, code %1$d - Application terminated unexpectedly. Would you like to submit crash report? + Application terminated unexpectedly. Would you like to submit a crash report? Send report Don\'t send report Extensions available! - Looks like your ownCloud instance is supporting advanced extensions. Would you like to see extensions available for android ? + Looks like your server instance is supporting advanced extensions. Would you like to see extensions available for android ? Keep file up to date Share Rename @@@ -186,11 -196,11 +198,11 @@@ Remove from server Remote and local - "Successful removal" - "Removal could not be completed" + "Removal succeeded" + "Removal failed" Enter a new name - "Local copy could not be renamed; try a differente new name" + "Local copy could not be renamed; try a different name" "Rename could not be completed" Remote file could not be checked @@@ -200,14 -210,14 +212,14 @@@ Wait a moment - "Unexpected problem ; please, try other app to select the file" + "Unexpected problem ; please select the file from a different app" No file was selected Warning The identity of the site could not be verified - The server certificate is not trusted - The server certificate expired - - The server certificate is too young + - The server certificate valid dates are in the future - The URL does not match the hostname in the certificate The server certificate could not be obtained Do you want to trust this certificate anyway? @@@ -231,11 -241,13 +243,15 @@@ This is a placeholder Upload pictures via WiFi only + /InstantUpload + Update conflict Remote file %s is not synchronized with local file. Continuing will replace content of file on server. Keep both Overwrite Don\'t upload + + + %1$s could not be copied to %2$s local directory + diff --combined src/com/owncloud/android/Uploader.java index b21a024b,3f67dc2a..138f68e7 --- a/src/com/owncloud/android/Uploader.java +++ b/src/com/owncloud/android/Uploader.java @@@ -129,7 -129,7 +129,7 @@@ public class Uploader extends ListActiv case DIALOG_NO_ACCOUNT: builder.setIcon(android.R.drawable.ic_dialog_alert); builder.setTitle(R.string.uploader_wrn_no_account_title); - builder.setMessage(R.string.uploader_wrn_no_account_text); + builder.setMessage(String.format(getString(R.string.uploader_wrn_no_account_text), getString(R.string.app_name))); builder.setCancelable(false); builder.setPositiveButton(R.string.uploader_wrn_no_account_setup_btn_text, new OnClickListener() { @Override @@@ -257,7 -257,7 +257,7 @@@ // click on folder in the list Log.d(TAG, "on item click"); Vector tmpfiles = mStorageManager.getDirectoryContent(mFile); - if (tmpfiles == null) return; + if (tmpfiles.size() <= 0) return; // filter on dirtype Vector files = new Vector(); for (OCFile f : tmpfiles) @@@ -325,7 -325,7 +325,7 @@@ mFile = mStorageManager.getFileByPath(full_path); if (mFile != null) { Vector files = mStorageManager.getDirectoryContent(mFile); - if (files != null) { + if (files.size() > 0) { List> data = new LinkedList>(); for (OCFile f : files) { HashMap h = new HashMap(); @@@ -432,8 -432,7 +432,8 @@@ finish(); } catch (SecurityException e) { - Toast.makeText(this, getString(R.string.uploader_error_forbidden_content), Toast.LENGTH_LONG).show(); + String message = String.format(getString(R.string.uploader_error_forbidden_content), getString(R.string.app_name)); + Toast.makeText(this, message, Toast.LENGTH_LONG).show(); } } diff --combined src/com/owncloud/android/ui/activity/FileDisplayActivity.java index 71d2a48c,ff846ef0..cfee79d4 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@@ -372,16 -372,16 +372,16 @@@ public class FileDisplayActivity extend */ public void onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && resultCode == RESULT_OK) { - requestSimpleUpload(data); + if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) { + requestSimpleUpload(data, resultCode); - } else if (requestCode == ACTION_SELECT_MULTIPLE_FILES && resultCode == RESULT_OK) { - requestMultipleUpload(data); + } else if (requestCode == ACTION_SELECT_MULTIPLE_FILES && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) { + requestMultipleUpload(data, resultCode); } } - private void requestMultipleUpload(Intent data) { + private void requestMultipleUpload(Intent data, int resultCode) { String[] filePaths = data.getStringArrayExtra(UploadFilesActivity.EXTRA_CHOSEN_FILES); if (filePaths != null) { String[] remotePaths = new String[filePaths.length]; @@@ -400,6 -400,8 +400,8 @@@ i.putExtra(FileUploader.KEY_LOCAL_FILE, filePaths); i.putExtra(FileUploader.KEY_REMOTE_FILE, remotePaths); i.putExtra(FileUploader.KEY_UPLOAD_TYPE, FileUploader.UPLOAD_MULTIPLE_FILES); + if (resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE) + i.putExtra(FileUploader.KEY_LOCAL_BEHAVIOUR, FileUploader.LOCAL_BEHAVIOUR_MOVE); startService(i); } else { @@@ -411,7 -413,7 +413,7 @@@ } - private void requestSimpleUpload(Intent data) { + private void requestSimpleUpload(Intent data, int resultCode) { String filepath = null; try { Uri selectedImageUri = data.getData(); @@@ -451,6 -453,8 +453,8 @@@ i.putExtra(FileUploader.KEY_LOCAL_FILE, filepath); i.putExtra(FileUploader.KEY_REMOTE_FILE, remotepath); i.putExtra(FileUploader.KEY_UPLOAD_TYPE, FileUploader.UPLOAD_SINGLE_FILE); + if (resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE) + i.putExtra(FileUploader.KEY_LOCAL_BEHAVIOUR, FileUploader.LOCAL_BEHAVIOUR_MOVE); startService(i); } @@@ -591,8 -595,7 +595,8 @@@ dialog.dismiss(); } }); - builder.setNegativeButton(R.string.common_exit, new OnClickListener() { + String message = String.format(getString(R.string.common_exit), getString(R.string.app_name)); + builder.setNegativeButton(message, new OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); finish(); @@@ -608,7 -611,7 +612,7 @@@ PackageInfo pkg; try { pkg = getPackageManager().getPackageInfo(getPackageName(), 0); - builder.setMessage(String.format(getString(R.string.about_message), pkg.versionName)); + builder.setMessage(String.format(getString(R.string.about_message), getString(R.string.app_name), pkg.versionName)); builder.setIcon(android.R.drawable.ic_menu_info_details); dialog = builder.create(); } catch (NameNotFoundException e) { @@@ -684,6 -687,7 +688,7 @@@ if (item == 0) { //if (!mDualPane) { Intent action = new Intent(FileDisplayActivity.this, UploadFilesActivity.class); + action.putExtra(UploadFilesActivity.EXTRA_ACCOUNT, AccountUtils.getCurrentOwnCloudAccount(FileDisplayActivity.this)); startActivityForResult(action, ACTION_SELECT_MULTIPLE_FILES); //} else { // TODO create and handle new fragment LocalFileListFragment