Browse Source

Merge branch 'develop' of git@github.com:owncloud/android.git into
developNew

Conflicts:
res/values-fr/strings.xml

tobiasKaminsky 10 years ago
parent
commit
b2158a8673

+ 1 - 1
owncloud-android-library

@@ -1 +1 @@
-Subproject commit 2799b3e853c79e8ebb37051c92dfcc43f8d63788
+Subproject commit 5bd0d7387712ce3f53869294761ac4d8537841cd

+ 0 - 11
res/menu/file_select_all.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-    <item
-        android:id="@+id/actionbar_select_all"
-        android:icon="@android:drawable/checkbox_off_background"
-        android:orderInCategory="1"
-        android:showAsAction="always"
-        android:title="actionbar_select_all"/>
-    
-
-</menu>

+ 0 - 299
res/values-fr/strings.xml

@@ -1,299 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<resources>
-  <string name="about_android">%1$s Android App</string>
-  <string name="about_version">version %1$s</string>
-  <string name="actionbar_sync">Actualiser le compte</string>
-  <string name="actionbar_upload">Téléverser</string>
-  <string name="actionbar_upload_from_apps">Contenu d\'autres applications</string>
-  <string name="actionbar_upload_files">Fichiers</string>
-  <string name="actionbar_open_with">Ouvrir avec</string>
-  <string name="actionbar_mkdir">Nouveau dossier</string>
-  <string name="actionbar_settings">Paramètres</string>
-  <string name="actionbar_see_details">Détails</string>
-  <string name="actionbar_send_file">Envoyer</string>
-  <string name="actionbar_sort">Trier</string>
-  <string name="actionbar_sort_title">Trier par</string>
-  <string-array name="actionbar_sortby">
-    <item>A-Z</item>
-    <item>Plus récent - Plus ancien</item>
-  </string-array>
-  <!--TODO re-enable when server-side folder size calculation is available   
-    	<item>Biggest - Smallest</item>-->
-  <string name="prefs_category_general">Général</string>
-  <string name="prefs_category_more">Plus</string>
-  <string name="prefs_accounts">Comptes</string>
-  <string name="prefs_manage_accounts">Gestion des comptes utilisateur</string>
-  <string name="prefs_pincode">Utilisation d\'un code de sécurité</string>
-  <string name="prefs_pincode_summary">Protéger l\'accès aux données manipulées par le client</string>
-  <string name="prefs_instant_upload">Téléchargements instantanés d\'images</string>
-  <string name="prefs_instant_upload_summary">Téléversement instantané des photos prises par la caméra</string>
-  <string name="prefs_instant_video_upload">Téléchargements instantanés de vidéos</string>
-  <string name="prefs_instant_video_upload_summary">Téléversement instantané des vidéos prises par la caméra</string>
-  <string name="prefs_log_title">Activer les logs</string>
-  <string name="prefs_log_summary">Utilisé pour enregistrer les problèmes dans les logs</string>
-  <string name="prefs_log_title_history">Historique des logs</string>
-  <string name="prefs_log_summary_history">Cela affiche les logs enregistrés</string>
-  <string name="prefs_log_delete_history_button">Supprimer l\'historique</string>
-  <string name="prefs_help">Aide</string>
-  <string name="prefs_recommend">Recommander à un ami</string>
-  <string name="prefs_feedback">Commentaires</string>
-  <string name="prefs_imprint">Empreinte</string>
-  <string name="prefs_remember_last_share_location">Mémoriser l\'emplacement de partage</string>
-  <string name="prefs_remember_last_upload_location_summary">Mémoriser le dernier emplacement d\'upload</string>
-  <string name="recommend_subject">Essayez %1$s sur votre smartphone&amp;nbsp;!</string>
-  <string name="recommend_text">J\'aimerais vous inviter à utiliser %1$s sur votre smartphone !
-Téléchargez-le ici&amp;nbsp;: %2$s</string>
-  <string name="auth_check_server">Vérifier le serveur</string>
-  <string name="auth_host_url">Adresse du serveur https://…</string>
-  <string name="auth_username">Nom d\'utilisateur</string>
-  <string name="auth_password">Mot de passe</string>
-  <string name="auth_register">Nouveau dans %1$s&amp;nbsp;?</string>
-  <string name="sync_string_files">Fichiers</string>
-  <string name="setup_btn_connect">Connecter</string>
-  <string name="uploader_btn_upload_text">Téléverser</string>
-  <string name="uploader_top_message">Sélectionner le dossier d\'envoi&amp;nbsp;:</string>
-  <string name="uploader_wrn_no_account_title">Aucun compte n\'a été trouvé</string>
-  <string name="uploader_wrn_no_account_text">Aucun compte %1$s n\'a été trouvé. Veuillez commencer par en configurer un.</string>
-  <string name="uploader_wrn_no_account_setup_btn_text">Paramètres</string>
-  <string name="uploader_wrn_no_account_quit_btn_text">Quitter</string>
-  <string name="uploader_wrn_no_content_title">Rien à envoyer</string>
-  <string name="uploader_wrn_no_content_text">Aucun contenu reçu. Rien à envoyer.</string>
-  <string name="uploader_error_forbidden_content">%1$s n\'est pas autorisé à accéder au contenu partagé</string>
-  <string name="uploader_info_uploading">Téléversement</string>
-  <string name="file_list_seconds_ago">il y a quelques secondes</string>
-  <string name="file_list_empty">Il n\'y a rien ici&amp;nbsp;! Envoyez donc quelque chose :)</string>
-  <string name="file_list_loading">Chargement…</string>
-  <string name="local_file_list_empty">Aucun fichier n\'est présent dans ce dossier.</string>
-  <string name="filedetails_select_file">Effleurez un fichier pour afficher les informations complémentaires</string>
-  <string name="filedetails_size">Taille :</string>
-  <string name="filedetails_type">Type :</string>
-  <string name="filedetails_created">Créé le :</string>
-  <string name="filedetails_modified">Modifié le :</string>
-  <string name="filedetails_download">Télécharger</string>
-  <string name="filedetails_sync_file">Actualiser le fichier</string>
-  <string name="filedetails_renamed_in_upload_msg">Le fichier a été renommé en %s pendant le téléversement</string>
-  <string name="action_share_file">Partager le lien</string>
-  <string name="action_unshare_file">Ne plus partager ce lien</string>
-  <string name="common_yes">Oui</string>
-  <string name="common_no">Non</string>
-  <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Annuler le téléchargement</string>
-  <string name="common_cancel_upload">Annuler l\'envoi</string>
-  <string name="common_cancel">Annuler</string>
-  <string name="common_save_exit">Sauvegarder &amp; Quitter</string>
-  <string name="common_error">Erreur</string>
-  <string name="common_loading">Chargement…</string>
-  <string name="common_error_unknown">Erreur inconnue </string>
-  <string name="about_title">À propos de</string>
-  <string name="change_password">Changer de mot de passe</string>
-  <string name="delete_account">Effacer ce compte</string>
-  <string name="create_account">Créer un compte</string>
-  <string name="upload_chooser_title">Téléverser un fichier depuis…</string>
-  <string name="uploader_info_dirname">Nom du dossier</string>
-  <string name="uploader_upload_in_progress_ticker">Téléversement…</string>
-  <string name="uploader_upload_in_progress_content">Envoi du fichier %2$s : %1$d%% effectués</string>
-  <string name="uploader_upload_succeeded_ticker">Téléversement réussi</string>
-  <string name="uploader_upload_succeeded_content_single">Le fichier %1$s a été envoyé avec succès</string>
-  <string name="uploader_upload_failed_ticker">Échec de l\'envoi</string>
-  <string name="uploader_upload_failed_content_single">L\'envoi de %1$s a échoué</string>
-  <string name="uploader_upload_failed_credentials_error">Le téléversement a échoué, vous devez vous connecter à nouveau</string>
-  <string name="downloader_download_in_progress_ticker">Téléchargement en cours…</string>
-  <string name="downloader_download_in_progress_content">Téléchargement en cours de %2$s, %1$d%% effectués</string>
-  <string name="downloader_download_succeeded_ticker">Téléchargement réussi</string>
-  <string name="downloader_download_succeeded_content">%1$s a été téléchargé avec succès</string>
-  <string name="downloader_download_failed_ticker">Le téléchargement a échoué</string>
-  <string name="downloader_download_failed_content">Le téléchargement de %1$s a échoué</string>
-  <string name="downloader_not_downloaded_yet">Pas encore téléchargé</string>
-  <string name="downloader_download_failed_credentials_error">Le téléchargement a échoué, vous devez vous connecter à nouveau</string>
-  <string name="common_choose_account">Choisissez un compte</string>
-  <string name="sync_fail_ticker">La synchronisation a échoué</string>
-  <string name="sync_fail_ticker_unauthorized">Échec de la synchronisation, vous devez vous reconnecter à nouveau</string>
-  <string name="sync_fail_content">La synchronisation de %1$s ne peut pas être complétée</string>
-  <string name="sync_fail_content_unauthorized">Mot de passe invalide pour %1$s</string>
-  <string name="sync_conflicts_in_favourites_ticker">Des conflits ont été trouvés</string>
-  <string name="sync_conflicts_in_favourites_content">%1$d fichiers à garder synchronisés n\'ont put être synchronisé</string>
-  <string name="sync_fail_in_favourites_ticker">La synchronisation des fichiers a échoué</string>
-  <string name="sync_fail_in_favourites_content">Le contenu de %1$d fichiers n\'a pu être synchronisé (%2$d conflits)</string>
-  <string name="sync_foreign_files_forgotten_ticker">Certains fichiers locaux ont été oubliés</string>
-  <string name="sync_foreign_files_forgotten_content">%1$d fichiers du dossier %2$s n\'ont pas pu être copiés dans</string>
-  <string name="sync_foreign_files_forgotten_explanation">Depuis la version 1.3.16, les fichiers envoyé depuis ce périphérique sont copiés dans le dossier local %1$s pour éviter une perte de données lorsqu\'un même fichier est synchronisé avec plusieurs comptes.
-
-En raison de cette modification, tous les fichiers envoyés avec des versions antérieures de cette application ont été copiés dans le dossier %2$s. Cependant une erreur a empêché l\'achèvement de cette opération pendant la synchronisation du compte. Vous pouvez soit laisser les fichiers tels quels et supprimer le lien vers %3$s, soit déplacer les fichiers dans le dossier %1$s et garder le lien vers %4$s.
-
-Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxquels ils étaient liés.</string>
-  <string name="sync_current_folder_was_removed">Le dossier %1$s n\'existe plus</string>
-  <string name="foreign_files_move">Tout déplacer</string>
-  <string name="foreign_files_success">Tous les fichiers ont été déplacés</string>
-  <string name="foreign_files_fail">Certains fichiers n\'ont pu être déplacés</string>
-  <string name="foreign_files_local_text">Local&amp;nbsp;: %1$s</string>
-  <string name="foreign_files_remote_text">Distant : %1$s</string>
-  <string name="upload_query_move_foreign_files">Il n\'y a pas assez de place disponible pour copier les fichiers sélectionnés dans le dossier %1$s. Voulez-vous quand même les déplacer ?</string>
-  <string name="pincode_enter_pin_code">Veuillez saisir votre code de sécurité</string>
-  <string name="pincode_configure_your_pin">Veuillez saisir votre code de sécurité </string>
-  <string name="pincode_configure_your_pin_explanation">Le code PIN vous sera demandé à chaque lancement de l\'application</string>
-  <string name="pincode_reenter_your_pincode">Veuillez saisir à nouveau votre code de sécurité</string>
-  <string name="pincode_remove_your_pincode">Retirer le code de sécurité</string>
-  <string name="pincode_mismatch">Les deux codes saisis ne concordent pas</string>
-  <string name="pincode_wrong">Code de sécurité incorrect</string>
-  <string name="pincode_removed">Code de sécurité retiré</string>
-  <string name="pincode_stored">Code de sécurité enregistré</string>
-  <string name="media_notif_ticker">%1$s lecteur de musique</string>
-  <string name="media_state_playing">%1$s (lecture)</string>
-  <string name="media_state_loading">%1$s (chargement)</string>
-  <string name="media_event_done">%1$s pourcentage de lecture finie</string>
-  <string name="media_err_nothing_to_play">Fichier média introuvable </string>
-  <string name="media_err_no_account">Aucun compte n\'a été trouvé</string>
-  <string name="media_err_not_in_owncloud">Le fichier n\'est pas dans un compte valide</string>
-  <string name="media_err_unsupported">Le codec de ce média n\'est pas pris en charge </string>
-  <string name="media_err_io">Le fichier média ne peut pas être lu</string>
-  <string name="media_err_malformed">Le fichier média n\'est pas correctement encodé</string>
-  <string name="media_err_timeout">Délai dépassé pour la lecture du morceau.</string>
-  <string name="media_err_invalid_progressive_playback">Le fichier média ne peut pas être diffusé</string>
-  <string name="media_err_unknown">Le fichier média ne peut être joué avec le lecteur standard</string>
-  <string name="media_err_security_ex">Erreur de sécurité à la lecture de %1$s</string>
-  <string name="media_err_io_ex">Erreur de lecture de fichier à la lecture de %1$s</string>
-  <string name="media_err_unexpected">Erreur inattendue à la lecture de %1$s </string>
-  <string name="media_rewind_description">Bouton de rembobinage</string>
-  <string name="media_play_pause_description">Bouton de lecture ou de pause</string>
-  <string name="media_forward_description">Bouton d\'avance rapide</string>
-  <string name="auth_getting_authorization">Demande d\'autorisation…</string>
-  <string name="auth_trying_to_login">Tentative de connexion…</string>
-  <string name="auth_no_net_conn_title">Pas de connexion réseau</string>
-  <string name="auth_nossl_plain_ok_title">Connexion sécurisée non disponible</string>
-  <string name="auth_connection_established">Connexion établie</string>
-  <string name="auth_testing_connection">Test de la connexion…</string>
-  <string name="auth_not_configured_title">Configuration du serveur erronée</string>
-  <string name="auth_account_not_new">Un compte pour le même utilisateur et serveur existe déjà sur ce périphérique</string>
-  <string name="auth_account_not_the_same">L\'utilisateur entré ne correspond pas à l\'utilisateur de ce compte</string>
-  <string name="auth_unknown_error_title">Une erreur inconnue s\'est produite</string>
-  <string name="auth_unknown_host_title">Impossible de trouver l\'hôte</string>
-  <string name="auth_incorrect_path_title">Aucune instance du serveur n\'a été trouvée</string>
-  <string name="auth_timeout_title">Le serveur met trop longtemps à répondre</string>
-  <string name="auth_incorrect_address_title">Adresse invalide</string>
-  <string name="auth_ssl_general_error_title">Échec de l\'initialisation SSL</string>
-  <string name="auth_ssl_unverified_server_title">Impossible de vérifier l\'identité du serveur SSL</string>
-  <string name="auth_bad_oc_version_title">La version du serveur n\'est pas reconnue</string>
-  <string name="auth_wrong_connection_title">Impossible d\'établir la connexion</string>
-  <string name="auth_secure_connection">Connexion sécurisée établie</string>
-  <string name="auth_unauthorized">Nom d\'utilisateur ou mot de passe incorrect</string>
-  <string name="auth_oauth_error">Échec d\'autorisation</string>
-  <string name="auth_oauth_error_access_denied">Accès refusé par le serveur d\'autorisation</string>
-  <string name="auth_wtf_reenter_URL">État inattendu&amp;nbsp;; veuillez entrer à nouveau l\'URL du serveur</string>
-  <string name="auth_expired_oauth_token_toast">Votre autorisation a expiré. Merci de vous authentifier à nouveau</string>
-  <string name="auth_expired_basic_auth_toast">Veuillez saisir le mot de passe courant</string>
-  <string name="auth_expired_saml_sso_token_toast">Votre session a expiré. Merci de vous reconnecter</string>
-  <string name="auth_connecting_auth_server">Connexion au serveur d\'authentification…</string>
-  <string name="auth_unsupported_auth_method">Le serveur ne prend pas en charge pas cette méthode d\'authentification</string>
-  <string name="auth_unsupported_multiaccount">%1$s ne prend pas en charge les comptes multiples</string>
-  <string name="auth_fail_get_user_name">Votre serveur a retourné un identifiant d\'utilisateur incorrect. Veuillez prendre contact avec votre administrateur
-</string>
-  <string name="auth_can_not_auth_against_server">Impossible de s\'authentifier sur ce serveur</string>
-  <string name="fd_keep_in_sync">Maintenir le fichier à jour</string>
-  <string name="common_rename">Renommer</string>
-  <string name="common_remove">Supprimer</string>
-  <string name="confirmation_remove_alert">Voulez-vous vraiment supprimer %1$s&amp;nbsp;?</string>
-  <string name="confirmation_remove_folder_alert">Voulez-vous vraiment supprimer %1$s et son contenu&amp;nbsp;?</string>
-  <string name="confirmation_remove_local">Local seulement</string>
-  <string name="confirmation_remove_folder_local">Le contenu local uniquement</string>
-  <string name="confirmation_remove_remote">Effacer du serveur</string>
-  <string name="confirmation_remove_remote_and_local">Les deux distant et local</string>
-  <string name="remove_success_msg">Suppression effectuée avec succès</string>
-  <string name="remove_fail_msg">Suppression impossible</string>
-  <string name="rename_dialog_title">Entrez un nouveau nom</string>
-  <string name="rename_local_fail_msg">La version locale ne peut être renommée, veuillez réessayer avec un nom différent</string>
-  <string name="rename_server_fail_msg">Renommage impossible</string>
-  <string name="sync_file_fail_msg">Le fichier distant n\'a pu être vérifié</string>
-  <string name="sync_file_nothing_to_do_msg">Le contenu des fichiers est déjà synchronisé</string>
-  <string name="create_dir_fail_msg">Le dossier n\'a pas pu être créé</string>
-  <string name="filename_forbidden_characters">Caractères interdits&amp;nbsp;: / \\ &amp;lt; &amp;gt; : " | ? *</string>
-  <string name="filename_empty">Le nom du fichier ne peut pas être vide</string>
-  <string name="wait_a_moment">Veuillez patienter</string>
-  <string name="filedisplay_unexpected_bad_get_content">Problème inattendu. Veuillez essayer une autre application pour la sélection du fichier</string>
-  <string name="filedisplay_no_file_selected">Aucun fichier sélectionné</string>
-  <string name="activity_chooser_title">Envoyer un lien à…</string>
-  <string name="oauth_check_onoff">Connexion avec oAuth2</string>
-  <string name="oauth_login_connection">Connexion au serveur oAuth2…</string>
-  <string name="ssl_validator_header">L\'identité du site ne peut être vérifiée</string>
-  <string name="ssl_validator_reason_cert_not_trusted">- Le certificat du serveur n\'est pas sûr</string>
-  <string name="ssl_validator_reason_cert_expired">- Le certificat du serveur a expiré</string>
-  <string name="ssl_validator_reason_cert_not_yet_valid">- Le certificat du serveur n\'est pas encore valide</string>
-  <string name="ssl_validator_reason_hostname_not_verified">- L\'URL ne correspond pas au nom d\'hôte du certificat</string>
-  <string name="ssl_validator_question">Voulez-vous tout de même faire confiance à ce certificat&amp;nbsp;?</string>
-  <string name="ssl_validator_not_saved">Impossible de sauvegarder le certificat</string>
-  <string name="ssl_validator_btn_details_see">Détails</string>
-  <string name="ssl_validator_btn_details_hide">Masquer</string>
-  <string name="ssl_validator_label_subject">Délivré à&amp;nbsp;:</string>
-  <string name="ssl_validator_label_issuer">Délivré par&amp;nbsp;:</string>
-  <string name="ssl_validator_label_CN">Nom d\'usage&amp;nbsp;:</string>
-  <string name="ssl_validator_label_O">Organisation&amp;nbsp;:</string>
-  <string name="ssl_validator_label_OU">Unité organisationnelle&amp;nbsp;:</string>
-  <string name="ssl_validator_label_C">Pays&amp;nbsp;:</string>
-  <string name="ssl_validator_label_ST">Région&amp;nbsp;:</string>
-  <string name="ssl_validator_label_L">Localisation&amp;nbsp;:</string>
-  <string name="ssl_validator_label_validity">Validité&amp;nbsp;:</string>
-  <string name="ssl_validator_label_validity_from">De&amp;nbsp;:</string>
-  <string name="ssl_validator_label_validity_to">À&amp;nbsp;:</string>
-  <string name="ssl_validator_label_signature">Signature&amp;nbsp;:</string>
-  <string name="ssl_validator_label_signature_algorithm">Algorithme&amp;nbsp;:</string>
-  <string name="ssl_validator_null_cert">Impossible d\'afficher le certificat.</string>
-  <string name="ssl_validator_no_info_about_error">- Aucune information sur l\'erreur</string>
-  <string name="placeholder_sentence">Ceci est un espace réservé</string>
-  <string name="placeholder_filename">placeholder.txt</string>
-  <string name="placeholder_filetype">Image PNG</string>
-  <string name="placeholder_filesize">389 Ko</string>
-  <string name="placeholder_timestamp">18/05/2012 12:23</string>
-  <string name="placeholder_media_time">12:23:45</string>
-  <string name="instant_upload_on_wifi">Téléverser les images via une connexion WiFi uniquement</string>
-  <string name="instant_video_upload_on_wifi">Téléverser les vidéos via une connexion WiFi uniquement</string>
-  <string name="instant_upload_path">/TéléversementInstantané</string>
-  <string name="conflict_title">Conflit de mise à jour</string>
-  <string name="conflict_message">Le fichier distant %s n\'est pas synchronisé avec le fichier local. En choisissant de continuer, vous remplacerez le contenu de fichier sur le serveur.</string>
-  <string name="conflict_keep_both">Garder les deux versions</string>
-  <string name="conflict_overwrite">Écraser</string>
-  <string name="conflict_dont_upload">Ne pas téléverser</string>
-  <string name="preview_image_description">Prévisualisation de l\'image</string>
-  <string name="preview_image_error_unknown_format">Cette image ne peut pas être affichée</string>
-  <string name="error__upload__local_file_not_copied">%1$s n\'a pas pu être copié dans le dossier local %2$s</string>
-  <string name="prefs_instant_upload_path_title">Chemin d\'accès pour le téléversement</string>
-  <string name="share_link_no_support_share_api">Désolé, le partage n\'est pas disponible sur votre serveur. Veuillez contacter votre administrateur.</string>
-  <string name="share_link_file_no_exist">Impossible de partager. Vérifiez que le fichier est bien présent</string>
-  <string name="share_link_file_error">Une erreur est survenue lors de la tentative de partage de ce fichier ou répertoire</string>
-  <string name="unshare_link_file_no_exist">Impossible de supprimer le partage. Vérifiez que le fichier est bien présent</string>
-  <string name="unshare_link_file_error">Une erreur est survenue lors de la tentative d’annulation du partage de ce fichier ou répertoire</string>
-  <string name="activity_chooser_send_file_title">Envoyer</string>
-  <string name="copy_link">Copier le lien</string>
-  <string name="clipboard_text_copied">Copié dans le presse-papiers</string>
-  <string name="error_cant_bind_to_operations_service">Erreur critique&amp;nbsp;: impossible de réaliser des opérations</string>
-  <string name="network_error_socket_exception">Une erreur s\'est produite pendant la connection au serveur</string>
-  <string name="network_error_socket_timeout_exception">Une erreur est survenue pendant l\'attente du serveur. L\'opération n\'a pas pu être effectuée.</string>
-  <string name="network_error_connect_timeout_exception">Une erreur est survenue pendant l\'attente du serveur. L\'opération n\'a pas pu être effectuée.</string>
-  <string name="network_host_not_available">L\'opération n\'a pas pu être terminée, le serveur n\'est pas disponible.</string>
-  <string name="empty"></string>
-  <string name="forbidden_permissions">Vous ne possédez pas les droits suffisants %s</string>
-  <string name="forbidden_permissions_rename">afin de renommer ce fichier</string>
-  <string name="forbidden_permissions_delete">afin d’effacer ce fichier</string>
-  <string name="share_link_forbidden_permissions">afin de partager ce fichier</string>
-  <string name="unshare_link_forbidden_permissions">afin de ne plus partager ce fichier</string>
-  <string name="forbidden_permissions_create">afin de créer ce fichier</string>
-  <string name="uploader_upload_forbidden_permissions">afin d’importer dans ce répertoire</string>
-  <string name="downloader_download_file_not_found">Ce fichier n’est plus disponible sur le serveur</string>
-  <string name="prefs_category_accounts">Comptes</string>
-  <string name="prefs_add_account">Ajouter un compte</string>
-  <string name="auth_redirect_non_secure_connection_title">La connexion sécurisée est redirigée via une route non-sécurisée.</string>
-  <string name="actionbar_logger">Journaux</string>
-  <string name="log_send_history_button">Envoyer l\'historique</string>
-  <string name="log_mail_subject">Journaux de l\'application Android ownCloud</string>
-  <string name="log_progress_dialog_text">Chargement des données...</string>
-  <string name="saml_authentication_required_text">Authentification requise</string>
-  <string name="saml_authentication_wrong_pass">Mot de passe incorrect</string>
-  <string name="actionbar_move">Déplacer</string>
-  <string name="file_list_empty_moving">Il n\'y a rien ici. Vous pouvez ajouter un dossier !</string>
-  <string name="move_choose_button_text">Choisir</string>
-  <string name="move_file_not_found">Impossible de déplacer. Vérifiez que le fichier existe</string>
-  <string name="move_file_invalid_into_descendent">Il n\'est pas possible de déplacer un dossier vers un de ses descendants</string>
-  <string name="move_file_invalid_overwrite">Le fichier existe déjà dans le dossier de destination</string>
-  <string name="move_file_error">Une erreur est survenue lors de la tentative de déplacement de ce fichier ou dossier</string>
-  <string name="forbidden_permissions_move">de déplacer ce fichier</string>
-  <string name="prefs_category_instant_uploading">Téléchargements instantanés</string>
-  <string name="prefs_category_security">Sécurité</string>
-</resources>

+ 31 - 31
res/values-pt-rPT/strings.xml

@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
-  <string name="about_android">%1$s Aplicação(ões) Android</string>
+  <string name="about_android">%1$s App(s) Android</string>
   <string name="about_version">versão %1$s</string>
   <string name="actionbar_sync">Atualizar conta</string>
   <string name="actionbar_upload">Enviar</string>
@@ -51,15 +51,15 @@
   <string name="setup_btn_connect">Ligar</string>
   <string name="uploader_btn_upload_text">Enviar</string>
   <string name="uploader_top_message">Escolha a pasta de envio:</string>
-  <string name="uploader_wrn_no_account_title">Nenhuma conta encontrada</string>
-  <string name="uploader_wrn_no_account_text">Não tem nenhuma conta  %1$s no seu dispositivo. Configure uma conta.</string>
+  <string name="uploader_wrn_no_account_title">A conta não foi encontrada</string>
+  <string name="uploader_wrn_no_account_text">Não tem nenhuma conta  %1$s no seu dispositivo. Por favor, configure primeiro uma conta.</string>
   <string name="uploader_wrn_no_account_setup_btn_text">Configurar</string>
   <string name="uploader_wrn_no_account_quit_btn_text">Sair</string>
-  <string name="uploader_wrn_no_content_title">Sem conteúdo para carregar</string>
+  <string name="uploader_wrn_no_content_title">Sem conteúdo para enviar</string>
   <string name="uploader_wrn_no_content_text">Não foi recebido nenhum conteúdo. Nada para enviar.</string>
   <string name="uploader_error_forbidden_content">O  %1$s não está autorizado a aceder aos ficheiro partilhados.</string>
   <string name="uploader_info_uploading">A enviar</string>
-  <string name="file_list_seconds_ago">Minutos atrás</string>
+  <string name="file_list_seconds_ago">segundos atrás</string>
   <string name="file_list_empty">Vazio. Envie alguma coisa!</string>
   <string name="file_list_loading">A carregar ...</string>
   <string name="local_file_list_empty">Não existem ficheiros nesta pasta.</string>
@@ -215,12 +215,12 @@
   <string name="ssl_validator_question">Quer confiar neste certificado de qualquer maneira?</string>
   <string name="ssl_validator_not_saved">O certificado não pôde ser guardado</string>
   <string name="ssl_validator_btn_details_see">Detalhes</string>
-  <string name="ssl_validator_btn_details_hide">Esconder</string>
+  <string name="ssl_validator_btn_details_hide">Ocultar</string>
   <string name="ssl_validator_label_subject">Emitido para:</string>
   <string name="ssl_validator_label_issuer">Emitido por:</string>
   <string name="ssl_validator_label_CN">Nome comum.</string>
   <string name="ssl_validator_label_O">Organização:</string>
-  <string name="ssl_validator_label_OU">Unidade organizaconal.</string>
+  <string name="ssl_validator_label_OU">Unidade organizacional.</string>
   <string name="ssl_validator_label_C">País:</string>
   <string name="ssl_validator_label_ST">Estado:</string>
   <string name="ssl_validator_label_L">Localização:</string>
@@ -229,33 +229,33 @@
   <string name="ssl_validator_label_validity_to">Para:</string>
   <string name="ssl_validator_label_signature">Assinatura:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritmo</string>
-  <string name="ssl_validator_null_cert">O certificado não pôde ser mostrado.</string>
-  <string name="ssl_validator_no_info_about_error">- Nenhuma informação acerca do erro</string>
+  <string name="ssl_validator_null_cert">Não foi possível mostrar o certificado.</string>
+  <string name="ssl_validator_no_info_about_error">- Nenhuma informação sobre o erro</string>
   <string name="placeholder_sentence">Isto é uma variável.</string>
   <string name="placeholder_filename">placeholder.txt</string>
   <string name="placeholder_filetype">Imagem PNG</string>
   <string name="placeholder_filesize">389 KB</string>
-  <string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
+  <string name="placeholder_timestamp">2012/05/18 12:23</string>
   <string name="placeholder_media_time">12:23:45</string>
-  <string name="instant_upload_on_wifi">Enviar fotografias apenas via WiFi</string>
-  <string name="instant_video_upload_on_wifi">Enviar videos apenas por WiFi</string>
-  <string name="instant_upload_path">/Upload-Instantâneo </string>
-  <string name="conflict_title">Conflito na actualização</string>
+  <string name="instant_upload_on_wifi">Só enviar as fotografias via wi-fi</string>
+  <string name="instant_video_upload_on_wifi">Só enviar os vídeos por wi-fi</string>
+  <string name="instant_upload_path">/Envio Instantâneo </string>
+  <string name="conflict_title">Conflito na atualização</string>
   <string name="conflict_message">O ficheiro remoto %s não está sincronizado com o ficheiro local. Se continuar ira substituir o ficheiro no servidor.</string>
-  <string name="conflict_keep_both">Manter os dois</string>
-  <string name="conflict_overwrite">Sobrepor</string>
+  <string name="conflict_keep_both">Manter ambos</string>
+  <string name="conflict_overwrite">Substituir</string>
   <string name="conflict_dont_upload">Não enviar.</string>
-  <string name="preview_image_description">Pré-Visualização da imagem</string>
+  <string name="preview_image_description">Pré-Visualizar imagem</string>
   <string name="preview_image_error_unknown_format">Esta imagem não pode ser mostrada</string>
   <string name="error__upload__local_file_not_copied">Não foi possível copiar %1$s para a pasta local %2$s</string>
-  <string name="prefs_instant_upload_path_title">Caminho de Upload</string>
+  <string name="prefs_instant_upload_path_title">Caminho de \'A Enviar\'</string>
   <string name="share_link_no_support_share_api">Lamentamos mas não é possível partilhar através do seu servidor. Por favor contacte o seu administrador.</string>
   <string name="share_link_file_no_exist">Não é possivel partilhar. Por favor verifique se o ficheiro existe</string>
   <string name="share_link_file_error">Ocorreu um erro enquanto tentava partilhar este ficheiro ou pasta</string>
   <string name="unshare_link_file_no_exist">Não é possível retirar a partilha. Verifique se o ficheiro existe</string>
   <string name="unshare_link_file_error">Ocorreu um erro enquanto retirava a partilha deste ficheiro ou pasta</string>
   <string name="activity_chooser_send_file_title">Enviar</string>
-  <string name="copy_link">Copiar ligação</string>
+  <string name="copy_link">Copiar hiperligação</string>
   <string name="clipboard_text_copied">Copiado para a área de transferência</string>
   <string name="error_cant_bind_to_operations_service">Erro crítico: não é possível executar as operações</string>
   <string name="network_error_socket_exception">Ocorreu um erro durante a ligação ao servidos.</string>
@@ -263,31 +263,31 @@
   <string name="network_error_connect_timeout_exception">Ocorreu um erro durante a ligação ao servidor, não foi possível realizar a operação.</string>
   <string name="network_host_not_available">A operação não foi concluída, o servidor está inacessível.</string>
   <string name="empty"></string>
-  <string name="forbidden_permissions">Você não tem permissão %s</string>
+  <string name="forbidden_permissions">Não tem permissão %s</string>
   <string name="forbidden_permissions_rename">para renomear este ficheiro</string>
-  <string name="forbidden_permissions_delete">para eliminar este ficheiro</string>
+  <string name="forbidden_permissions_delete">para apagar este ficheiro</string>
   <string name="share_link_forbidden_permissions">para partilhar este ficheiro</string>
-  <string name="unshare_link_forbidden_permissions">para eliminar a partilha deste ficheiro</string>
+  <string name="unshare_link_forbidden_permissions">para cancelar a partilha deste ficheiro</string>
   <string name="forbidden_permissions_create">para criar o ficheiro</string>
-  <string name="uploader_upload_forbidden_permissions">para carregar dentro desta pasta</string>
+  <string name="uploader_upload_forbidden_permissions">para enviar nesta pasta</string>
   <string name="downloader_download_file_not_found">O ficheiro não está mais disponível no servidor</string>
   <string name="prefs_category_accounts">Contas</string>
   <string name="prefs_add_account">Adicionar conta</string>
   <string name="auth_redirect_non_secure_connection_title">Ligação segura é redireccionada para um caminho inseguro.</string>
-  <string name="actionbar_logger">Logs</string>
+  <string name="actionbar_logger">Registos de Alterações</string>
   <string name="log_send_history_button">Enviar Histórico</string>
-  <string name="log_mail_subject">Logs da app ownCloud Android</string>
-  <string name="log_progress_dialog_text">A carregar os dados...</string>
+  <string name="log_mail_subject">Registos das alterações da app ownCloud Android</string>
+  <string name="log_progress_dialog_text">A carregar os dados ...</string>
   <string name="saml_authentication_required_text">Autenticação necessária</string>
-  <string name="saml_authentication_wrong_pass">Password errada</string>
+  <string name="saml_authentication_wrong_pass">Palavra-passe errada</string>
   <string name="actionbar_move">Mover</string>
   <string name="file_list_empty_moving">Não está aqui nada. Pode adicionar uma pasta!</string>
-  <string name="move_choose_button_text">Escolha</string>
-  <string name="move_file_not_found">Não é possível mover. Verifique se o ficheiro existe</string>
+  <string name="move_choose_button_text">Escolher</string>
+  <string name="move_file_not_found">Não é possível mover. Por favor, verifique se o ficheiro existe</string>
   <string name="move_file_invalid_into_descendent">Não é possível mover esta pasta deste modo</string>
   <string name="move_file_invalid_overwrite">O ficheiro já existe na pasta de destino</string>
-  <string name="move_file_error">Um erro ocorreu ao tentar mover este ficheiro ou pasta</string>
+  <string name="move_file_error">Ocorreu um ocorreu quando tentava mover este ficheiro ou pasta</string>
   <string name="forbidden_permissions_move">para mover este ficheiro</string>
-  <string name="prefs_category_instant_uploading">Uploads Instantâneos</string>
+  <string name="prefs_category_instant_uploading">Envios Instantâneos</string>
   <string name="prefs_category_security">Segurança</string>
 </resources>

+ 36 - 12
src/com/owncloud/android/files/services/FileUploader.java

@@ -73,6 +73,7 @@ import com.owncloud.android.operations.common.SyncOperation;
 import com.owncloud.android.ui.activity.FileActivity;
 import com.owncloud.android.ui.activity.FileDisplayActivity;
 import com.owncloud.android.utils.ErrorMessageAdapter;
+import com.owncloud.android.utils.UriUtils;
 
 
 
@@ -120,6 +121,9 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
     private NotificationCompat.Builder mNotificationBuilder;
     private int mLastPercent;
 
+    private static final String MIME_TYPE_PDF = "application/pdf";
+    private static final String FILE_EXTENSION_PDF = ".pdf";
+
     
     public static String getUploadFinishMessage() {
         return FileUploader.class.getName().toString() + UPLOAD_FINISH_MESSAGE;
@@ -646,18 +650,6 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
 
     private OCFile obtainNewOCFileToUpload(String remotePath, String localPath, String mimeType,
             FileDataStorageManager storageManager) {
-        OCFile newFile = new OCFile(remotePath);
-        newFile.setStoragePath(localPath);
-        newFile.setLastSyncDateForProperties(0);
-        newFile.setLastSyncDateForData(0);
-
-        // size
-        if (localPath != null && localPath.length() > 0) {
-            File localFile = new File(localPath);
-            newFile.setFileLength(localFile.length());
-            newFile.setLastSyncDateForData(localFile.lastModified());
-        } // don't worry about not assigning size, the problems with localPath
-          // are checked when the UploadFileOperation instance is created
 
         // MIME type
         if (mimeType == null || mimeType.length() <= 0) {
@@ -671,6 +663,25 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
         if (mimeType == null) {
             mimeType = "application/octet-stream";
         }
+
+        if (isPdfFileFromContentProviderWithoutExtension(localPath, mimeType)){
+            remotePath += FILE_EXTENSION_PDF;
+        }
+
+        OCFile newFile = new OCFile(remotePath);
+        newFile.setStoragePath(localPath);
+        newFile.setLastSyncDateForProperties(0);
+        newFile.setLastSyncDateForData(0);
+
+        // size
+        if (localPath != null && localPath.length() > 0) {
+            File localFile = new File(localPath);
+            newFile.setFileLength(localFile.length());
+            newFile.setLastSyncDateForData(localFile.lastModified());
+        } // don't worry about not assigning size, the problems with localPath
+          // are checked when the UploadFileOperation instance is created
+
+
         newFile.setMimetype(mimeType);
 
         return newFile;
@@ -856,4 +867,17 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
         sendStickyBroadcast(end);
     }
 
+    /**
+     * Checks if content provider, using the content:// scheme, returns a file with mime-type 
+     * 'application/pdf' but file has not extension
+     * @param localPath
+     * @param mimeType
+     * @return true if is needed to add the pdf file extension to the file
+     */
+    private boolean isPdfFileFromContentProviderWithoutExtension(String localPath, String mimeType) {
+        return localPath.startsWith(UriUtils.URI_CONTENT_SCHEME) && 
+                mimeType.equals(MIME_TYPE_PDF) && 
+                !localPath.endsWith(FILE_EXTENSION_PDF);
+    }
+
 }

+ 73 - 47
src/com/owncloud/android/operations/UploadFileOperation.java

@@ -31,11 +31,16 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.httpclient.methods.RequestEntity;
 
+import android.accounts.Account;
+import android.content.Context;
+import android.net.Uri;
+
+import com.owncloud.android.MainApp;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.files.services.FileUploader;
-import com.owncloud.android.lib.common.network.ProgressiveDataTransferer;
-import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
 import com.owncloud.android.lib.common.OwnCloudClient;
+import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
+import com.owncloud.android.lib.common.network.ProgressiveDataTransferer;
 import com.owncloud.android.lib.common.operations.OperationCancelledException;
 import com.owncloud.android.lib.common.operations.RemoteOperation;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
@@ -45,9 +50,7 @@ import com.owncloud.android.lib.resources.files.ChunkedUploadRemoteFileOperation
 import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
 import com.owncloud.android.lib.resources.files.UploadRemoteFileOperation;
 import com.owncloud.android.utils.FileStorageUtils;
-
-import android.accounts.Account;
-import android.content.Context;
+import com.owncloud.android.utils.UriUtils;
 
 
 /**
@@ -92,10 +95,9 @@ public class UploadFileOperation extends RemoteOperation {
             throw new IllegalArgumentException("Illegal NULL account in UploadFileOperation creation");
         if (file == null)
             throw new IllegalArgumentException("Illegal NULL file in UploadFileOperation creation");
-        if (file.getStoragePath() == null || file.getStoragePath().length() <= 0
-                || !(new File(file.getStoragePath()).exists())) {
+        if (file.getStoragePath() == null || file.getStoragePath().length() <= 0) {
             throw new IllegalArgumentException(
-                    "Illegal file in UploadFileOperation; storage path invalid or file not found: "
+                    "Illegal file in UploadFileOperation; storage path invalid: "
                             + file.getStoragePath());
         }
 
@@ -218,52 +220,77 @@ public class UploadFileOperation extends RemoteOperation {
                                    // copied
 
                 } else {
+
                     String temporalPath = FileStorageUtils.getTemporalPath(mAccount.name) + mFile.getRemotePath();
                     mFile.setStoragePath(temporalPath);
                     temporalFile = new File(temporalPath);
-                    if (!mOriginalStoragePath.equals(temporalPath)) { // preventing
-                                                                      // weird
-                                                                      // but
-                                                                      // possible
-                                                                      // situation
-                        InputStream in = null;
-                        OutputStream out = null;
-                        try {
-                            File temporalParent = temporalFile.getParentFile();
-                            temporalParent.mkdirs();
-                            if (!temporalParent.isDirectory()) {
-                                throw new IOException("Unexpected error: parent directory could not be created");
-                            }
-                            temporalFile.createNewFile();
-                            if (!temporalFile.isFile()) {
-                                throw new IOException("Unexpected error: target file could not be created");
-                            }
-                            in = new FileInputStream(originalFile);
+
+                    File temporalParent = temporalFile.getParentFile();
+                    temporalParent.mkdirs();
+                    if (!temporalParent.isDirectory()) {
+                        throw new IOException("Unexpected error: parent directory could not be created");
+                    }
+                    temporalFile.createNewFile();
+                    if (!temporalFile.isFile()) {
+                        throw new IOException("Unexpected error: target file could not be created");
+                    }
+
+                    InputStream in = null;
+                    OutputStream out = null;
+
+                    try {
+
+                        // In case document provider schema as 'content://'
+                        if (mOriginalStoragePath.startsWith(UriUtils.URI_CONTENT_SCHEME)) {
+
+                            Uri uri = Uri.parse(mOriginalStoragePath);
+
+                            in = MainApp.getAppContext().getContentResolver().openInputStream(uri);
                             out = new FileOutputStream(temporalFile);
-                            byte[] buf = new byte[1024];
-                            int len;
-                            while ((len = in.read(buf)) > 0) {
-                                out.write(buf, 0, len);
-                            }
 
-                        } catch (Exception e) {
-                            result = new RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_COPIED);
-                            return result;
-
-                        } finally {
-                            try {
-                                if (in != null)
-                                    in.close();
-                            } catch (Exception e) {
-                                Log_OC.d(TAG, "Weird exception while closing input stream for " + mOriginalStoragePath + " (ignoring)", e);
+                            int nRead;
+                            byte[] data = new byte[16384];
+
+                            while ((nRead = in.read(data, 0, data.length)) != -1) {
+                                out.write(data, 0, nRead);
                             }
-                            try {
-                                if (out != null)
-                                    out.close();
-                            } catch (Exception e) {
-                                Log_OC.d(TAG, "Weird exception while closing output stream for " + expectedPath + " (ignoring)", e);
+
+                            out.flush();
+
+                        } else {
+                            if (!mOriginalStoragePath.equals(temporalPath)) { // preventing
+                                                                          // weird
+                                                                          // but
+                                                                          // possible
+                                                                          // situation
+
+                                in = new FileInputStream(originalFile);
+                                out = new FileOutputStream(temporalFile);
+                                byte[] buf = new byte[1024];
+                                int len;
+                                while ((len = in.read(buf)) > 0) {
+                                    out.write(buf, 0, len);
+                                }
                             }
                         }
+
+                    } catch (Exception e) {
+                        result = new RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_COPIED);
+                        return result;
+
+                    } finally {
+                        try {
+                            if (in != null)
+                                in.close();
+                        } catch (Exception e) {
+                            Log_OC.d(TAG, "Weird exception while closing input stream for " + mOriginalStoragePath + " (ignoring)", e);
+                        }
+                        try {
+                            if (out != null)
+                                out.close();
+                        } catch (Exception e) {
+                            Log_OC.d(TAG, "Weird exception while closing output stream for " + expectedPath + " (ignoring)", e);
+                        }
                     }
                 }
             }
@@ -417,5 +444,4 @@ public class UploadFileOperation extends RemoteOperation {
     public void cancel() {
         mUploadOperation.cancel();
     }
-
 }

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

@@ -31,6 +31,7 @@ import android.app.ProgressDialog;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.ContentResolver;
+import android.content.ContentUris;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -41,13 +42,18 @@ import android.content.SyncRequest;
 import android.content.res.Resources.NotFoundException;
 import android.database.Cursor;
 import android.net.Uri;
+import android.os.Build;
 import android.os.Bundle;
+import android.os.Environment;
 import android.os.IBinder;
 import android.preference.PreferenceManager;
+import android.provider.DocumentsContract;
 import android.provider.MediaStore;
+import android.provider.OpenableColumns;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
+import android.util.Log;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
@@ -101,6 +107,7 @@ import com.owncloud.android.ui.preview.PreviewMediaFragment;
 import com.owncloud.android.ui.preview.PreviewVideoActivity;
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.ErrorMessageAdapter;
+import com.owncloud.android.utils.UriUtils;
 
 
 /**
@@ -151,7 +158,7 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
     private String DIALOG_UNTRUSTED_CERT;
     
     private OCFile mWaitingToSend;
-    
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         Log_OC.d(TAG, "onCreate() start");
@@ -563,6 +570,11 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
             builder.setExpedited(true);
             builder.setManual(true);
             builder.syncOnce();
+
+            // Fix bug in Android Lollipop when you click on refresh the whole account
+            Bundle extras = new Bundle();
+            builder.setExtras(extras);
+
             SyncRequest request = builder.build();
             ContentResolver.requestSync(request);
         }
@@ -654,8 +666,12 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
 
     private void requestSimpleUpload(Intent data, int resultCode) {
         String filepath = null;
+        String mimeType = null;
+
+        Uri selectedImageUri = data.getData();
+
         try {
-            Uri selectedImageUri = data.getData();
+            mimeType = getContentResolver().getType(selectedImageUri);
 
             String filemanagerstring = selectedImageUri.getPath();
             String selectedImagePath = getPath(selectedImageUri);
@@ -687,10 +703,34 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
         }
         if (!remotepath.endsWith(OCFile.PATH_SEPARATOR))
             remotepath += OCFile.PATH_SEPARATOR;
-        remotepath += new File(filepath).getName();
+
+        if (filepath.startsWith(UriUtils.URI_CONTENT_SCHEME)) {
+
+            Cursor cursor = MainApp.getAppContext().getContentResolver()
+                    .query(Uri.parse(filepath), null, null, null, null, null);
+
+            try {
+                if (cursor != null && cursor.moveToFirst()) {
+                    String displayName = cursor.getString(
+                            cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
+                    Log.i(TAG, "Display Name: " + displayName + "; mimeType: " + mimeType);
+
+                    displayName.replace(File.separatorChar, '_');
+                    displayName.replace(File.pathSeparatorChar, '_');
+                    remotepath += displayName + DisplayUtils.getComposedFileExtension(filepath);
+
+                }
+            } finally {
+                cursor.close();
+            }
+
+        } else {
+            remotepath += new File(filepath).getName();
+        }
 
         i.putExtra(FileUploader.KEY_LOCAL_FILE, filepath);
         i.putExtra(FileUploader.KEY_REMOTE_FILE, remotepath);
+        i.putExtra(FileUploader.KEY_MIME_TYPE, mimeType);
         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);
@@ -866,22 +906,74 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
         return dialog;
     }
 
-
     /**
-     * Translates a content URI of an image to a physical path
-     * on the disk
+     * Translates a content URI of an content to a physical path on the disk
+     * 
      * @param uri The URI to resolve
-     * @return The path to the image or null if it could not be found
+     * @return The path to the content or null if it could not be found
      */
     public String getPath(Uri uri) {
-        String[] projection = { MediaStore.Images.Media.DATA };
-        Cursor cursor = managedQuery(uri, projection, null, null, null);
-        if (cursor != null) {
-            int column_index = cursor
-                    .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
-            cursor.moveToFirst();
-            return cursor.getString(column_index);
-        } 
+        final boolean isKitKatOrLater = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
+
+        // DocumentProvider
+        if (isKitKatOrLater && DocumentsContract.isDocumentUri(getApplicationContext(), uri)) {
+            // ExternalStorageProvider
+            if (UriUtils.isExternalStorageDocument(uri)) {
+                final String docId = DocumentsContract.getDocumentId(uri);
+                final String[] split = docId.split(":");
+                final String type = split[0];
+
+                if ("primary".equalsIgnoreCase(type)) {
+                    return Environment.getExternalStorageDirectory() + "/" + split[1];
+                }
+            }
+            // DownloadsProvider
+            else if (UriUtils.isDownloadsDocument(uri)) {
+
+                final String id = DocumentsContract.getDocumentId(uri);
+                final Uri contentUri = ContentUris.withAppendedId(Uri.parse("content://downloads/public_downloads"),
+                        Long.valueOf(id));
+
+                return UriUtils.getDataColumn(getApplicationContext(), contentUri, null, null);
+            }
+            // MediaProvider
+            else if (UriUtils.isMediaDocument(uri)) {
+                final String docId = DocumentsContract.getDocumentId(uri);
+                final String[] split = docId.split(":");
+                final String type = split[0];
+
+                Uri contentUri = null;
+                if ("image".equals(type)) {
+                    contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
+                } else if ("video".equals(type)) {
+                    contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
+                } else if ("audio".equals(type)) {
+                    contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
+                }
+
+                final String selection = "_id=?";
+                final String[] selectionArgs = new String[] { split[1] };
+
+                return UriUtils.getDataColumn(getApplicationContext(), contentUri, selection, selectionArgs);
+            }
+            // Documents providers returned as content://...
+            else if (UriUtils.isContentDocument(uri)) {
+                return uri.toString();
+            }
+        }
+        // MediaStore (and general)
+        else if ("content".equalsIgnoreCase(uri.getScheme())) {
+
+            // Return the remote address
+            if (UriUtils.isGooglePhotosUri(uri))
+                return uri.getLastPathSegment();
+
+            return UriUtils.getDataColumn(getApplicationContext(), uri, null, null);
+        }
+        // File
+        else if ("file".equalsIgnoreCase(uri.getScheme())) {
+            return uri.getPath();
+        }
         return null;
     }
 

+ 4 - 40
src/com/owncloud/android/ui/activity/UploadFilesActivity.java

@@ -34,9 +34,6 @@ import android.widget.TextView;
 
 import com.actionbarsherlock.app.ActionBar;
 import com.actionbarsherlock.app.ActionBar.OnNavigationListener;
-import com.actionbarsherlock.internal.view.menu.ActionMenuItemView;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
 import com.actionbarsherlock.view.MenuItem;
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
@@ -76,8 +73,6 @@ public class UploadFilesActivity extends FileActivity implements
     private static final String WAIT_DIALOG_TAG = "WAIT";
     private static final String QUERY_TO_MOVE_DIALOG_TAG = "QUERY_TO_MOVE";
     
-    private boolean selectAllToggled = false;
-    private Menu menu;
     
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -124,7 +119,6 @@ public class UploadFilesActivity extends FileActivity implements
         actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
         actionBar.setListNavigationCallbacks(mDirectories, this);
         
-        
         // wait dialog
         if (mCurrentDialog != null) {
             mCurrentDialog.dismiss();
@@ -133,15 +127,8 @@ public class UploadFilesActivity extends FileActivity implements
             
         Log_OC.d(TAG, "onCreate() end");
     }
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu items for use in the action bar
-        MenuInflater inflater = getSherlock().getMenuInflater();
-        inflater.inflate(R.menu.file_select_all, menu);     
-        this.menu = menu;
-        return true;
-    }
- 
+
+
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         boolean retval = true;
@@ -152,33 +139,12 @@ public class UploadFilesActivity extends FileActivity implements
                 }
                 break;
             }
-            case R.id.actionbar_select_all:{
-                if(selectAllToggled){
-                    toggleOffSelectAll();
-                }else{
-                    toggleOnSelectAll(item);
-                }
-                break;
-            }
             default:
                 retval = super.onOptionsItemSelected(item);
         }
         return retval;
     }
-    public void toggleOffSelectAll(MenuItem item){
-        selectAllToggled = false;
-        item.setIcon(android.R.drawable.checkbox_off_background);
-        mFileListFragment.deselectAll();
-    }
-    public void toggleOffSelectAll(){
-        MenuItem item = menu.findItem(R.id.actionbar_select_all);
-        toggleOffSelectAll(item);
-    }
-    public void toggleOnSelectAll(MenuItem item){
-        selectAllToggled = true;
-        item.setIcon(android.R.drawable.checkbox_on_background);        
-        mFileListFragment.selectAll();
-    }
+
     
     @Override
     public boolean onNavigationItemSelected(int itemPosition, long itemId) {
@@ -209,7 +175,6 @@ public class UploadFilesActivity extends FileActivity implements
             ActionBar actionBar = getSupportActionBar(); 
             actionBar.setDisplayHomeAsUpEnabled(false);
         } 
-        toggleOffSelectAll();
     }
 
     
@@ -277,11 +242,10 @@ public class UploadFilesActivity extends FileActivity implements
      * {@inheritDoc}
      */
     @Override
-    public void onDirectoryClick(File directory) { 
+    public void onDirectoryClick(File directory) {
         pushDirname(directory);
         ActionBar actionBar = getSupportActionBar();
         actionBar.setDisplayHomeAsUpEnabled(true);
-        toggleOffSelectAll();
     }
     
     

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

@@ -170,7 +170,7 @@ public class Uploader extends SherlockListActivity implements OnItemClickListene
         case DIALOG_MULTIPLE_ACCOUNT:
             CharSequence ac[] = new CharSequence[mAccountManager.getAccountsByType(MainApp.getAccountType()).length];
             for (int i = 0; i < ac.length; ++i) {
-                ac[i] = mAccountManager.getAccountsByType(MainApp.getAccountType())[i].name;
+                ac[i] = DisplayUtils.convertIdn(mAccountManager.getAccountsByType(MainApp.getAccountType())[i].name, false);
             }
             builder.setTitle(R.string.common_choose_account);
             builder.setItems(ac, new OnClickListener() {

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

@@ -98,33 +98,13 @@ public class LocalFileListFragment extends ExtendedListFragment {
         Log_OC.i(TAG, "onActivityCreated() stop");
     }
     
-    public void selectAll(){
-        int numberOfFiles = mAdapter.getCount();
-        for(int i = 0; i < numberOfFiles; i++){
-            File file = (File) mAdapter.getItem(i);
-            if (file != null) {                
-                if (!file.isDirectory()) {  
-                    /// Click on a file
-                    getListView().setItemChecked(i, true);                       
-                    // notify the change to the container Activity
-                    mContainerActivity.onFileClick(file);
-                }
-            }
-        }
-    }
-    
-    public void deselectAll(){        
-        mAdapter = new LocalFileListAdapter(mContainerActivity.getInitialDirectory(), getActivity());
-        setListAdapter(mAdapter);
-    }
     
     /**
      * Checks the file clicked over. Browses inside if it is a directory. Notifies the container activity in any case.
      */
     @Override
     public void onItemClick(AdapterView<?> l, View v, int position, long id) {
-        File file = (File) mAdapter.getItem(position);
-        
+        File file = (File) mAdapter.getItem(position); 
         if (file != null) {
             /// Click on a directory
             if (file.isDirectory()) {

+ 19 - 2
src/com/owncloud/android/utils/DisplayUtils.java

@@ -277,7 +277,24 @@ public class DisplayUtils {
             return url;
         }
     }
-    
+
+    /**
+     * Get the file extension if it is on path as type "content://.../DocInfo.doc"
+     * @param filepath: Content Uri converted to string format
+     * @return String: fileExtension (type '.pdf'). Empty if no extension
+     */
+    public static String getComposedFileExtension(String filepath) {
+        String fileExtension = "";
+        String fileNameInContentUri = filepath.substring(filepath.lastIndexOf("/"));
+
+        // Check if extension is included in uri
+        int pos = fileNameInContentUri.lastIndexOf('.');
+        if (pos >= 0) {
+            fileExtension = fileNameInContentUri.substring(pos);
+        }
+        return fileExtension;
+    }
+
     public static CharSequence getRelativeDateTimeString(Context c, long time, long minResolution, long transitionResolution, int flags){
         CharSequence dateString = "";
         
@@ -301,6 +318,6 @@ public class DisplayUtils {
             }
         }
         
-        return dateString.toString().split(",")[0];
+        return dateString.toString().split(",")[0];
     }
 }

+ 103 - 0
src/com/owncloud/android/utils/UriUtils.java

@@ -0,0 +1,103 @@
+/* ownCloud Android client application
+ *   Copyright (C) 2012-2014 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.utils;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+
+
+/**
+ * A helper class for some Uri operations.
+ */
+public class UriUtils {
+    
+    public static final String URI_CONTENT_SCHEME = "content://";
+    
+    
+    /**
+     * Get the value of the data column for this Uri. This is useful for
+     * MediaStore Uris, and other file-based ContentProviders.
+     * 
+     * @param context The context.
+     * @param uri The Uri to query.
+     * @param selection (Optional) Filter used in the query.
+     * @param selectionArgs (Optional) Selection arguments used in the query.
+     * @return The value of the _data column, which is typically a file path.
+     */
+    public static String getDataColumn(Context context, Uri uri, String selection, String[] selectionArgs) {
+
+        Cursor cursor = null;
+        final String column = "_data";
+        final String[] projection = { column };
+
+        try {
+            cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);
+            if (cursor != null && cursor.moveToFirst()) {
+
+                final int column_index = cursor.getColumnIndexOrThrow(column);
+                return cursor.getString(column_index);
+            }
+        } finally {
+            if (cursor != null)
+                cursor.close();
+        }
+        return null;
+    }
+
+    /**
+     * @param uri The Uri to check.
+     * @return Whether the Uri authority is ExternalStorageProvider.
+     */
+    public static boolean isExternalStorageDocument(Uri uri) {
+        return "com.android.externalstorage.documents".equals(uri.getAuthority());
+    }
+
+    /**
+     * @param uri The Uri to check.
+     * @return Whether the Uri authority is DownloadsProvider.
+     */
+    public static boolean isDownloadsDocument(Uri uri) {
+        return "com.android.providers.downloads.documents".equals(uri.getAuthority());
+    }
+
+    /**
+     * @param uri The Uri to check.
+     * @return Whether the Uri authority is MediaProvider.
+     */
+    public static boolean isMediaDocument(Uri uri) {
+        return "com.android.providers.media.documents".equals(uri.getAuthority());
+    }
+
+    /**
+     * @param uri The Uri to check.
+     * @return Whether the Uri authority is Google Photos.
+     */
+    public static boolean isGooglePhotosUri(Uri uri) {
+        return "com.google.android.apps.photos.content".equals(uri.getAuthority());
+    }
+
+    /**
+     * 
+     * @param uri The Uri to check.
+     * @return Whether the Uri is from a content provider as kind "content://..."
+     */
+    public static boolean isContentDocument(Uri uri) {
+        return uri.toString().startsWith(URI_CONTENT_SCHEME);
+    }
+}

+ 2 - 2
tests/.classpath

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/owncloud-android"/>
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
 	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
 	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="gen"/>
 	<classpathentry kind="output" path="bin/classes"/>
 </classpath>