diff options
Diffstat (limited to 'apps/files_sharing')
41 files changed, 416 insertions, 208 deletions
diff --git a/apps/files_sharing/css/404.css b/apps/files_sharing/css/404.css index 160a8f83fc3..7542c7cfae1 100644 --- a/apps/files_sharing/css/404.css +++ b/apps/files_sharing/css/404.css @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ #body-login .error-broken-link{ - text-align:left;color:#fff; + text-align:start;color:#fff; } #body-login .error-broken-link ul{ diff --git a/apps/files_sharing/l10n/cs.js b/apps/files_sharing/l10n/cs.js index 342b9e4f588..97cb49425d6 100644 --- a/apps/files_sharing/l10n/cs.js +++ b/apps/files_sharing/l10n/cs.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "Předání souboru", "Upload files to {foldername}." : "Nahrát soubory do {foldername}", "By uploading files, you agree to the terms of service." : "Nahráním souborů souhlasíte s podmínkami služby.", + "Successfully uploaded files" : "Soubory úspěšně nahrány", "View terms of service" : "Zobrazit smluvní podmínky", "Terms of service" : "Všeobecné podmínky", "Upload files to {folder}" : "Nahrát soubory do {folder}", @@ -313,6 +314,7 @@ OC.L10N.register( "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Tuto metodu použijte pro nasdílení souborů jednotlivcům nebo týmům ve vaší organizaci. Pokud příjemce už má přístup ke sdílení, ale nemůže ho nalézt, můžete mu přístup usnadnit zasláním vnitřního odkazu na sdílení.", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Tuto metodu používejte pro sdílení souborů s jednotlivci nebo organizacemi vně té vaší. Soubory a složky je možné nasdílet prostřednictvím veřejných odkazů na sdílení a e-mailových adres. Je také možné nasdílet ostatním Nextcloud účtům hostovaným na různých instancích a to prostřednictvím jejich identifikátorů v rámci federovaného cloudu.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Sdílení, která nejsou součástí interních nebo externích sdílení. Toto mohou být sdílení z aplikací nebo jiných zdrojů.", + "Share with accounts, teams, federated cloud IDs" : "Nasdílejte účtům, týmům, identifikátorům v rámci federovaného cloudu", "Share with accounts and teams" : "Nasdílet účtům a týmům", "Email, federated cloud ID" : "E-mail, identif. federovaného cloudu", "Unable to load the shares list" : "Nedaří se načíst seznam sdílení", diff --git a/apps/files_sharing/l10n/cs.json b/apps/files_sharing/l10n/cs.json index 8e6393fd417..b5f512d20e7 100644 --- a/apps/files_sharing/l10n/cs.json +++ b/apps/files_sharing/l10n/cs.json @@ -255,6 +255,7 @@ "File drop" : "Předání souboru", "Upload files to {foldername}." : "Nahrát soubory do {foldername}", "By uploading files, you agree to the terms of service." : "Nahráním souborů souhlasíte s podmínkami služby.", + "Successfully uploaded files" : "Soubory úspěšně nahrány", "View terms of service" : "Zobrazit smluvní podmínky", "Terms of service" : "Všeobecné podmínky", "Upload files to {folder}" : "Nahrát soubory do {folder}", @@ -311,6 +312,7 @@ "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Tuto metodu použijte pro nasdílení souborů jednotlivcům nebo týmům ve vaší organizaci. Pokud příjemce už má přístup ke sdílení, ale nemůže ho nalézt, můžete mu přístup usnadnit zasláním vnitřního odkazu na sdílení.", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Tuto metodu používejte pro sdílení souborů s jednotlivci nebo organizacemi vně té vaší. Soubory a složky je možné nasdílet prostřednictvím veřejných odkazů na sdílení a e-mailových adres. Je také možné nasdílet ostatním Nextcloud účtům hostovaným na různých instancích a to prostřednictvím jejich identifikátorů v rámci federovaného cloudu.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Sdílení, která nejsou součástí interních nebo externích sdílení. Toto mohou být sdílení z aplikací nebo jiných zdrojů.", + "Share with accounts, teams, federated cloud IDs" : "Nasdílejte účtům, týmům, identifikátorům v rámci federovaného cloudu", "Share with accounts and teams" : "Nasdílet účtům a týmům", "Email, federated cloud ID" : "E-mail, identif. federovaného cloudu", "Unable to load the shares list" : "Nedaří se načíst seznam sdílení", diff --git a/apps/files_sharing/l10n/de.js b/apps/files_sharing/l10n/de.js index ce2b7c73e3f..b2fb1dc3159 100644 --- a/apps/files_sharing/l10n/de.js +++ b/apps/files_sharing/l10n/de.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "Dateiablage", "Upload files to {foldername}." : "Dateien hochladen nach {foldername}.", "By uploading files, you agree to the terms of service." : "Durch das Hochladen von Dateien stimmst du den Nutzungsbedingungen zu.", + "Successfully uploaded files" : "Dateien wurden hochgeladen", "View terms of service" : "Nutzungsbedingungen anzeigen", "Terms of service" : "Nutzungsbedingungen", "Upload files to {folder}" : "Dateien hochladen nach {folder}", diff --git a/apps/files_sharing/l10n/de.json b/apps/files_sharing/l10n/de.json index 0dbe6cc8141..5edc31fe79c 100644 --- a/apps/files_sharing/l10n/de.json +++ b/apps/files_sharing/l10n/de.json @@ -255,6 +255,7 @@ "File drop" : "Dateiablage", "Upload files to {foldername}." : "Dateien hochladen nach {foldername}.", "By uploading files, you agree to the terms of service." : "Durch das Hochladen von Dateien stimmst du den Nutzungsbedingungen zu.", + "Successfully uploaded files" : "Dateien wurden hochgeladen", "View terms of service" : "Nutzungsbedingungen anzeigen", "Terms of service" : "Nutzungsbedingungen", "Upload files to {folder}" : "Dateien hochladen nach {folder}", diff --git a/apps/files_sharing/l10n/de_DE.js b/apps/files_sharing/l10n/de_DE.js index c825e4c948f..69abf34bd75 100644 --- a/apps/files_sharing/l10n/de_DE.js +++ b/apps/files_sharing/l10n/de_DE.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "Dateiablage", "Upload files to {foldername}." : "Dateien hochladen nach {foldername}.", "By uploading files, you agree to the terms of service." : "Durch das Hochladen von Dateien stimmen Sie den Nutzungsbedingungen zu.", + "Successfully uploaded files" : "Dateien wurden hochgeladen", "View terms of service" : "Nutzungsbedingungen anzeigen", "Terms of service" : "Nutzungsbedingungen", "Upload files to {folder}" : "Dateien hochladen nach {folder}", diff --git a/apps/files_sharing/l10n/de_DE.json b/apps/files_sharing/l10n/de_DE.json index 19c796cfd66..33b5d08bade 100644 --- a/apps/files_sharing/l10n/de_DE.json +++ b/apps/files_sharing/l10n/de_DE.json @@ -255,6 +255,7 @@ "File drop" : "Dateiablage", "Upload files to {foldername}." : "Dateien hochladen nach {foldername}.", "By uploading files, you agree to the terms of service." : "Durch das Hochladen von Dateien stimmen Sie den Nutzungsbedingungen zu.", + "Successfully uploaded files" : "Dateien wurden hochgeladen", "View terms of service" : "Nutzungsbedingungen anzeigen", "Terms of service" : "Nutzungsbedingungen", "Upload files to {folder}" : "Dateien hochladen nach {folder}", diff --git a/apps/files_sharing/l10n/en_GB.js b/apps/files_sharing/l10n/en_GB.js index dc48e5526ee..bfef88bf61a 100644 --- a/apps/files_sharing/l10n/en_GB.js +++ b/apps/files_sharing/l10n/en_GB.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "File drop", "Upload files to {foldername}." : "Upload files to {foldername}.", "By uploading files, you agree to the terms of service." : "By uploading files, you agree to the terms of service.", + "Successfully uploaded files" : "Successfully uploaded files", "View terms of service" : "View terms of service", "Terms of service" : "Terms of service", "Upload files to {folder}" : "Upload files to {folder}", diff --git a/apps/files_sharing/l10n/en_GB.json b/apps/files_sharing/l10n/en_GB.json index ae93f32a6b2..202aa25d2ad 100644 --- a/apps/files_sharing/l10n/en_GB.json +++ b/apps/files_sharing/l10n/en_GB.json @@ -255,6 +255,7 @@ "File drop" : "File drop", "Upload files to {foldername}." : "Upload files to {foldername}.", "By uploading files, you agree to the terms of service." : "By uploading files, you agree to the terms of service.", + "Successfully uploaded files" : "Successfully uploaded files", "View terms of service" : "View terms of service", "Terms of service" : "Terms of service", "Upload files to {folder}" : "Upload files to {folder}", diff --git a/apps/files_sharing/l10n/et_EE.js b/apps/files_sharing/l10n/et_EE.js index bbf9425b62d..3ab0c7c797b 100644 --- a/apps/files_sharing/l10n/et_EE.js +++ b/apps/files_sharing/l10n/et_EE.js @@ -80,11 +80,12 @@ OC.L10N.register( "Sharing %s failed because the back end does not support ScienceMesh shares" : "„%s“ jagamine ei õnnestunud, sest taustateenus ei toeta ScienceMeshi meedia jagamist", "Unknown share type" : "Tundmatu jagamise tüüp", "Not a directory" : "Ei ole kaust", - "Could not lock node" : "Sõlme ei õnnestunud lukustada", + "Could not lock node" : "Sõlme lukustamine ei õnnestunud", "Public upload is only possible for publicly shared folders" : "Avalik üleslaadminie on võimalik ainult avalikult jagatud kaustades", "Share must at least have READ or CREATE permissions" : "jaosmeedial peavad olema vähemalt logemis- ja loomisõigused", + "Share must have READ permission if UPDATE or DELETE permission is set" : "Kui jaosmeedial on muutmis ja kustutamisõigus, siis peab olema ka lugemisõigus", "Public upload disabled by the administrator" : "Avalik üleslaadimine on administraatori poolt keelatud", - "Could not lock path" : "Ei saanud rada lukustada", + "Could not lock path" : "Asukoha lukustamine ei õnnestunud", "no sharing rights on this item" : "selle objekti kontekstis pole jagamisõigusi", "You are not allowed to edit incoming shares" : "Sul pole lubatud vastuvõetud jaosmeediat muuta", "Wrong or no update parameter given" : "Antud vale või aegunud parameeter", @@ -230,7 +231,7 @@ OC.L10N.register( "Create a new share link" : "Loo uus jagamislink", "Quick share options, the current selected is \"{selectedOption}\"" : "Kiirjagamise valikud, hetkel on valitud „{selectedOption}“", "View only" : "Ainult vaatamine", - "Can edit" : "Võib redigeerida", + "Can edit" : "Võib muuta", "Custom permissions" : "Kohandatud õigused", "Resharing is not allowed" : "Edasijagamine pole lubatud", "Name or email …" : "Nimi või e-posti aadress…", @@ -253,6 +254,7 @@ OC.L10N.register( "File drop" : "Failiedastus", "Upload files to {foldername}." : "Laadi failid üles kausta {foldername}.", "By uploading files, you agree to the terms of service." : "Faile üleslaadides nõustud sa kasutustingimustega.", + "Successfully uploaded files" : "Failide üleslaadimine õnnestus", "View terms of service" : "Vaata kasutustingimusi", "Terms of service" : "Kasutustingimused", "Upload files to {folder}" : "Laadi failid üles kausta {folder}", @@ -356,7 +358,7 @@ OC.L10N.register( "File requests" : "Failipäringud", "List of file requests." : "Failipäringute loend.", "No file requests" : "Failipäringuid ei leidu", - "File requests you have created will show up here" : "Sinu loodud failipäringus saavad olema nähtavad siin.", + "File requests you have created will show up here" : "Sinu loodud failipäringud saavad olema nähtavad siin.", "Deleted shares" : "Kustutatud jagamised", "List of shares you left." : "Jaosmeedia loend, kust sa oled lahkunud.", "No deleted shares" : "Kustutatud jagamisi pole", diff --git a/apps/files_sharing/l10n/et_EE.json b/apps/files_sharing/l10n/et_EE.json index d5a086f454a..e746432509a 100644 --- a/apps/files_sharing/l10n/et_EE.json +++ b/apps/files_sharing/l10n/et_EE.json @@ -78,11 +78,12 @@ "Sharing %s failed because the back end does not support ScienceMesh shares" : "„%s“ jagamine ei õnnestunud, sest taustateenus ei toeta ScienceMeshi meedia jagamist", "Unknown share type" : "Tundmatu jagamise tüüp", "Not a directory" : "Ei ole kaust", - "Could not lock node" : "Sõlme ei õnnestunud lukustada", + "Could not lock node" : "Sõlme lukustamine ei õnnestunud", "Public upload is only possible for publicly shared folders" : "Avalik üleslaadminie on võimalik ainult avalikult jagatud kaustades", "Share must at least have READ or CREATE permissions" : "jaosmeedial peavad olema vähemalt logemis- ja loomisõigused", + "Share must have READ permission if UPDATE or DELETE permission is set" : "Kui jaosmeedial on muutmis ja kustutamisõigus, siis peab olema ka lugemisõigus", "Public upload disabled by the administrator" : "Avalik üleslaadimine on administraatori poolt keelatud", - "Could not lock path" : "Ei saanud rada lukustada", + "Could not lock path" : "Asukoha lukustamine ei õnnestunud", "no sharing rights on this item" : "selle objekti kontekstis pole jagamisõigusi", "You are not allowed to edit incoming shares" : "Sul pole lubatud vastuvõetud jaosmeediat muuta", "Wrong or no update parameter given" : "Antud vale või aegunud parameeter", @@ -228,7 +229,7 @@ "Create a new share link" : "Loo uus jagamislink", "Quick share options, the current selected is \"{selectedOption}\"" : "Kiirjagamise valikud, hetkel on valitud „{selectedOption}“", "View only" : "Ainult vaatamine", - "Can edit" : "Võib redigeerida", + "Can edit" : "Võib muuta", "Custom permissions" : "Kohandatud õigused", "Resharing is not allowed" : "Edasijagamine pole lubatud", "Name or email …" : "Nimi või e-posti aadress…", @@ -251,6 +252,7 @@ "File drop" : "Failiedastus", "Upload files to {foldername}." : "Laadi failid üles kausta {foldername}.", "By uploading files, you agree to the terms of service." : "Faile üleslaadides nõustud sa kasutustingimustega.", + "Successfully uploaded files" : "Failide üleslaadimine õnnestus", "View terms of service" : "Vaata kasutustingimusi", "Terms of service" : "Kasutustingimused", "Upload files to {folder}" : "Laadi failid üles kausta {folder}", @@ -354,7 +356,7 @@ "File requests" : "Failipäringud", "List of file requests." : "Failipäringute loend.", "No file requests" : "Failipäringuid ei leidu", - "File requests you have created will show up here" : "Sinu loodud failipäringus saavad olema nähtavad siin.", + "File requests you have created will show up here" : "Sinu loodud failipäringud saavad olema nähtavad siin.", "Deleted shares" : "Kustutatud jagamised", "List of shares you left." : "Jaosmeedia loend, kust sa oled lahkunud.", "No deleted shares" : "Kustutatud jagamisi pole", diff --git a/apps/files_sharing/l10n/eu.js b/apps/files_sharing/l10n/eu.js index 5ff41b708cb..5c933b4fec9 100644 --- a/apps/files_sharing/l10n/eu.js +++ b/apps/files_sharing/l10n/eu.js @@ -90,6 +90,8 @@ OC.L10N.register( "You are not allowed to edit incoming shares" : "Ez duzu baimenik zuri partekaturikoak editatzeko", "Wrong or no update parameter given" : "Eguneraketa parametrorik ez da eman edo okerra da", "\"Sending the password by Nextcloud Talk\" for sharing a file or folder failed because Nextcloud Talk is not enabled." : "\"Nextcloud Talk-ek pasahitza bidaltzeak\" huts egin du ez dagoelako Nextcloud Talk gaituta fitxategi edo karpeta bat partekatzeko.", + "Custom share link tokens have been disabled by the administrator" : "Administratzaileak esteka pertsonalizatuen tokenak sortzeko aukera ezgaitu du", + "Tokens must contain at least 1 character and may only contain letters, numbers, or a hyphen" : "Tokenek gutxienez karaktere 1 izan behar dute, eta letrak, zenbakiak edo marratxo bat baino ezin dituzte eduki", "Invalid date. Format must be YYYY-MM-DD" : "Data baliogabea. UUU-HH-EE gisako formatua izan behar du", "No sharing rights on this item" : "Ez dago baimenik fitxategi hau partekatzeko", "Invalid share attributes provided: \"%s\"" : "Baliogabeko partekatze atributuak eman dira: \"%s\"", @@ -97,6 +99,7 @@ OC.L10N.register( "No mail notification configured for this share type" : "Partekatze mota honentzat ez dago email jakinarazpenik konfiguratuta", "Wrong password" : "Pasahitz okerra", "Error while sending mail notification" : "Errorea email jakinarazpena bidaltzean", + "Failed to generate a unique token" : "Ezin izan da token bakar bat sortu", "This share does not exist or is no longer available" : "Partekatze hau ez dago edo jada ez dago erabilgarri", "shared by %s" : "%s erabiltzaileak partekatua", "Download" : "Deskargatu", @@ -182,6 +185,8 @@ OC.L10N.register( "Set default folder for accepted shares" : "Ezarri onartutako partekatzeen karpeta lehenetsia", "Reset" : "Berrezarri", "Reset folder to system default" : "Berrezarri karpeta sistemaren balio lehenetsietara", + "Share expiration: " : "Partekatzearen iraungitze-data:", + "Share Expiration" : "Partekatzearen iraungitze-data", "group" : "taldea", "conversation" : "elkarrizketa", "remote" : "urrunekoa", @@ -245,11 +250,14 @@ OC.L10N.register( "Deck board" : "Deck mahaia", "ScienceMesh" : "ScienceMesh", "on {server}" : "{server} zerbitzarian", + "Enter external recipients" : "Sartu kanpoko hartzaileak", + "Search for internal recipients" : "Bilatu barruko hartzaileak", "Note from" : "Oharra bidali du", "Note:" : "Oharra:", "File drop" : "Fitxategiak jaregin", "Upload files to {foldername}." : "Igo fitxategiak {foldername}(e)ra.", "By uploading files, you agree to the terms of service." : "Fitxategiak igotzean, zerbitzu-baldintzak onartzen dituzu.", + "Successfully uploaded files" : "Fitxategiak ongi igo dira", "View terms of service" : "Ikusi zerbitzu-balditzak", "Terms of service" : "Erabilera baldintzak", "Upload files to {folder}" : "Igo fitxategiak {folder}(e)ra", @@ -272,12 +280,18 @@ OC.L10N.register( "Edit" : "Aldatu", "Share" : "Partekatu", "Delete" : "Ezabatu", + "Password field cannot be empty" : "Pasahitz-eremua ezin da hutsik egon", "Replace current password" : "Aldatu uneko pasahitza", + "Failed to generate a new token" : "Ezin izan da token berri bat sortu", "Allow upload and editing" : "Onartu igotzea eta editatzea", "Allow editing" : "Baimendu editatzea", "Upload only" : "Igoera soilik", "Advanced settings" : "Ezarpen aurreratuak", "Share label" : "Partekatu etiketa", + "Share link token" : "Partekatzeko esteka-tokena", + "Set the public share link token to something easy to remember or generate a new token. It is not recommended to use a guessable token for shares which contain sensitive information." : "Ezarri partekatze-estekaren token publikoa gogoratzeko erraza den zerbait, edo sortu token berria. Ez da gomendagarria informazio sentikorra duten partekatzeetako tokenak asma daitezkeenak erabiltzea.", + "Generating…" : "Sortzen...", + "Generate new token" : "Sortu token berria", "Set password" : "Pasahitza ezarri", "Password expires {passwordExpirationTime}" : "Pasahitza {passwordExpirationTime} iraungiko da", "Password expired" : "Pasahitza iraungi da", @@ -288,6 +302,7 @@ OC.L10N.register( "Allow download and sync" : "Baimendu deskargatu eta sinkronizatzea", "Note to recipient" : "Oharra hartzailearentzat", "Enter a note for the share recipient" : "Sartu ohar bat partekatzearen hartzailearentzat", + "Show files in grid view" : "Erakutsi fitxategiak sareta ikuspegian", "Delete share" : "Ezabatu partekatzea", "Others with access" : "Sarbidea duten beste erabiltzaileak", "No other accounts with access found" : "Ez da aurkitu sarbidea duen beste konturik", @@ -296,12 +311,22 @@ OC.L10N.register( "Unable to fetch inherited shares" : "Ezin izan dira heredatutako partekatzeak eskuratu", "Link shares" : "Lotu partekatzeak", "Shares" : "Partekatzeak", + "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Erabili metodo hau zure erakundeko banako edo taldeekin fitxategiak partekatzeko. Hartzaileak dagoeneko baimena badu partekatutako elementurako baina ezin badu aurkitu, bidali iezaiozu barneko partekatze-esteka, sarbidea errazteko.", + "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Erabili metodo hau zure erakundeaz kanpoko banako edo erakundeekin fitxategiak partekatzeko. Fitxategiak eta karpetak parteka ditzakezu esteka publikoen bidez edo helbide elektronikoen bidez. Bestelako Nextcloud kontuetara ere parteka ditzakezu, beste instantziatan daudenak, haien federatutako hodeiaren ID-a erabiliz.", + "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Barneko zein kanpoko partekatzeetan sartzen ez diren partekatzeak. Hauetakoren bat aplikazioetatik edo beste iturri batzuetatik etorritako partekatzeak izan daitezke.", + "Share with accounts, teams, federated cloud IDs" : "Partekatu kontuekin, taldeekin edo federatutako hodeien ID-ekin", + "Share with accounts and teams" : "Partekatu kontuekin eta taldeekin", + "Email, federated cloud ID" : "Posta elektroniko, federatutako hodeien ID", "Unable to load the shares list" : "Ezin izan da partekatzeen zerrenda kargatu", "Expires {relativetime}" : "Iraungitzea: {relativetime}", "this share just expired." : "partekatze hau oraintxe iraungi da.", "Shared with you by {owner}" : "{owner} erabiltzaileak zurekin partekatua", "Internal shares" : "Barneko partekatzeak", + "Internal shares explanation" : "Barneko partekatzeen azalpena ", "External shares" : "Kanpoko sareak", + "External shares explanation" : "Kanpoko partekatzeen azalpena", + "Additional shares" : "Partekatze gehigarriak", + "Additional shares explanation" : "Partekatze gehigarrien azalpena", "Link to a file" : "Esteka fitxategi batera", "_Accept share_::_Accept shares_" : ["Onartu partekatzea","Onartu partekatzeak"], "Open in Files" : "Ireki Fitxategiak aplikazioan", @@ -395,6 +420,8 @@ OC.L10N.register( "_1 email address already added_::_{count} email addresses already added_" : ["Helbide elektroniko 1 gehitu da dagoeneko","{count} helbide elektroniko gehitu dira dagoeneko"], "_1 email address added_::_{count} email addresses added_" : ["Helbide elektroniko 1 gehitu da","{count} helbide elektroniko gehitu dira"], "Search for share recipients" : "Bilatu partekatze-hartzaileak", - "No recommendations. Start typing." : "Gomendiorik ez. Hasi idazten." + "No recommendations. Start typing." : "Gomendiorik ez. Hasi idazten.", + "Share with accounts, teams, federated cloud id" : "Partekatu kontuekin, taldeekin edo federatutako hodeien ID-ekin", + "Email, federated cloud id" : "Posta elektroniko, federatutako hodeien ID" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_sharing/l10n/eu.json b/apps/files_sharing/l10n/eu.json index fd592005648..40eac16d694 100644 --- a/apps/files_sharing/l10n/eu.json +++ b/apps/files_sharing/l10n/eu.json @@ -88,6 +88,8 @@ "You are not allowed to edit incoming shares" : "Ez duzu baimenik zuri partekaturikoak editatzeko", "Wrong or no update parameter given" : "Eguneraketa parametrorik ez da eman edo okerra da", "\"Sending the password by Nextcloud Talk\" for sharing a file or folder failed because Nextcloud Talk is not enabled." : "\"Nextcloud Talk-ek pasahitza bidaltzeak\" huts egin du ez dagoelako Nextcloud Talk gaituta fitxategi edo karpeta bat partekatzeko.", + "Custom share link tokens have been disabled by the administrator" : "Administratzaileak esteka pertsonalizatuen tokenak sortzeko aukera ezgaitu du", + "Tokens must contain at least 1 character and may only contain letters, numbers, or a hyphen" : "Tokenek gutxienez karaktere 1 izan behar dute, eta letrak, zenbakiak edo marratxo bat baino ezin dituzte eduki", "Invalid date. Format must be YYYY-MM-DD" : "Data baliogabea. UUU-HH-EE gisako formatua izan behar du", "No sharing rights on this item" : "Ez dago baimenik fitxategi hau partekatzeko", "Invalid share attributes provided: \"%s\"" : "Baliogabeko partekatze atributuak eman dira: \"%s\"", @@ -95,6 +97,7 @@ "No mail notification configured for this share type" : "Partekatze mota honentzat ez dago email jakinarazpenik konfiguratuta", "Wrong password" : "Pasahitz okerra", "Error while sending mail notification" : "Errorea email jakinarazpena bidaltzean", + "Failed to generate a unique token" : "Ezin izan da token bakar bat sortu", "This share does not exist or is no longer available" : "Partekatze hau ez dago edo jada ez dago erabilgarri", "shared by %s" : "%s erabiltzaileak partekatua", "Download" : "Deskargatu", @@ -180,6 +183,8 @@ "Set default folder for accepted shares" : "Ezarri onartutako partekatzeen karpeta lehenetsia", "Reset" : "Berrezarri", "Reset folder to system default" : "Berrezarri karpeta sistemaren balio lehenetsietara", + "Share expiration: " : "Partekatzearen iraungitze-data:", + "Share Expiration" : "Partekatzearen iraungitze-data", "group" : "taldea", "conversation" : "elkarrizketa", "remote" : "urrunekoa", @@ -243,11 +248,14 @@ "Deck board" : "Deck mahaia", "ScienceMesh" : "ScienceMesh", "on {server}" : "{server} zerbitzarian", + "Enter external recipients" : "Sartu kanpoko hartzaileak", + "Search for internal recipients" : "Bilatu barruko hartzaileak", "Note from" : "Oharra bidali du", "Note:" : "Oharra:", "File drop" : "Fitxategiak jaregin", "Upload files to {foldername}." : "Igo fitxategiak {foldername}(e)ra.", "By uploading files, you agree to the terms of service." : "Fitxategiak igotzean, zerbitzu-baldintzak onartzen dituzu.", + "Successfully uploaded files" : "Fitxategiak ongi igo dira", "View terms of service" : "Ikusi zerbitzu-balditzak", "Terms of service" : "Erabilera baldintzak", "Upload files to {folder}" : "Igo fitxategiak {folder}(e)ra", @@ -270,12 +278,18 @@ "Edit" : "Aldatu", "Share" : "Partekatu", "Delete" : "Ezabatu", + "Password field cannot be empty" : "Pasahitz-eremua ezin da hutsik egon", "Replace current password" : "Aldatu uneko pasahitza", + "Failed to generate a new token" : "Ezin izan da token berri bat sortu", "Allow upload and editing" : "Onartu igotzea eta editatzea", "Allow editing" : "Baimendu editatzea", "Upload only" : "Igoera soilik", "Advanced settings" : "Ezarpen aurreratuak", "Share label" : "Partekatu etiketa", + "Share link token" : "Partekatzeko esteka-tokena", + "Set the public share link token to something easy to remember or generate a new token. It is not recommended to use a guessable token for shares which contain sensitive information." : "Ezarri partekatze-estekaren token publikoa gogoratzeko erraza den zerbait, edo sortu token berria. Ez da gomendagarria informazio sentikorra duten partekatzeetako tokenak asma daitezkeenak erabiltzea.", + "Generating…" : "Sortzen...", + "Generate new token" : "Sortu token berria", "Set password" : "Pasahitza ezarri", "Password expires {passwordExpirationTime}" : "Pasahitza {passwordExpirationTime} iraungiko da", "Password expired" : "Pasahitza iraungi da", @@ -286,6 +300,7 @@ "Allow download and sync" : "Baimendu deskargatu eta sinkronizatzea", "Note to recipient" : "Oharra hartzailearentzat", "Enter a note for the share recipient" : "Sartu ohar bat partekatzearen hartzailearentzat", + "Show files in grid view" : "Erakutsi fitxategiak sareta ikuspegian", "Delete share" : "Ezabatu partekatzea", "Others with access" : "Sarbidea duten beste erabiltzaileak", "No other accounts with access found" : "Ez da aurkitu sarbidea duen beste konturik", @@ -294,12 +309,22 @@ "Unable to fetch inherited shares" : "Ezin izan dira heredatutako partekatzeak eskuratu", "Link shares" : "Lotu partekatzeak", "Shares" : "Partekatzeak", + "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Erabili metodo hau zure erakundeko banako edo taldeekin fitxategiak partekatzeko. Hartzaileak dagoeneko baimena badu partekatutako elementurako baina ezin badu aurkitu, bidali iezaiozu barneko partekatze-esteka, sarbidea errazteko.", + "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Erabili metodo hau zure erakundeaz kanpoko banako edo erakundeekin fitxategiak partekatzeko. Fitxategiak eta karpetak parteka ditzakezu esteka publikoen bidez edo helbide elektronikoen bidez. Bestelako Nextcloud kontuetara ere parteka ditzakezu, beste instantziatan daudenak, haien federatutako hodeiaren ID-a erabiliz.", + "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Barneko zein kanpoko partekatzeetan sartzen ez diren partekatzeak. Hauetakoren bat aplikazioetatik edo beste iturri batzuetatik etorritako partekatzeak izan daitezke.", + "Share with accounts, teams, federated cloud IDs" : "Partekatu kontuekin, taldeekin edo federatutako hodeien ID-ekin", + "Share with accounts and teams" : "Partekatu kontuekin eta taldeekin", + "Email, federated cloud ID" : "Posta elektroniko, federatutako hodeien ID", "Unable to load the shares list" : "Ezin izan da partekatzeen zerrenda kargatu", "Expires {relativetime}" : "Iraungitzea: {relativetime}", "this share just expired." : "partekatze hau oraintxe iraungi da.", "Shared with you by {owner}" : "{owner} erabiltzaileak zurekin partekatua", "Internal shares" : "Barneko partekatzeak", + "Internal shares explanation" : "Barneko partekatzeen azalpena ", "External shares" : "Kanpoko sareak", + "External shares explanation" : "Kanpoko partekatzeen azalpena", + "Additional shares" : "Partekatze gehigarriak", + "Additional shares explanation" : "Partekatze gehigarrien azalpena", "Link to a file" : "Esteka fitxategi batera", "_Accept share_::_Accept shares_" : ["Onartu partekatzea","Onartu partekatzeak"], "Open in Files" : "Ireki Fitxategiak aplikazioan", @@ -393,6 +418,8 @@ "_1 email address already added_::_{count} email addresses already added_" : ["Helbide elektroniko 1 gehitu da dagoeneko","{count} helbide elektroniko gehitu dira dagoeneko"], "_1 email address added_::_{count} email addresses added_" : ["Helbide elektroniko 1 gehitu da","{count} helbide elektroniko gehitu dira"], "Search for share recipients" : "Bilatu partekatze-hartzaileak", - "No recommendations. Start typing." : "Gomendiorik ez. Hasi idazten." + "No recommendations. Start typing." : "Gomendiorik ez. Hasi idazten.", + "Share with accounts, teams, federated cloud id" : "Partekatu kontuekin, taldeekin edo federatutako hodeien ID-ekin", + "Email, federated cloud id" : "Posta elektroniko, federatutako hodeien ID" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_sharing/l10n/fa.js b/apps/files_sharing/l10n/fa.js index 21c1715227e..e2148a257d0 100644 --- a/apps/files_sharing/l10n/fa.js +++ b/apps/files_sharing/l10n/fa.js @@ -15,6 +15,7 @@ OC.L10N.register( "You removed yourself" : "شما خدتان را حذف کردید", "Share for {user} expired" : "اشتراک برای {user} منقضی شده است", "Share expired" : "اشتراک منقضی شد", + "{actor} shared {file} with you" : "{actor} {file} را با شما به اشتراک گذاشت", "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "یک پرونده یا پوشه به اشتراک گذاشته شده از طریق پست یا از طریق لینک عمومی بارگیری شد", "A file or folder was shared from <strong>another server</strong>" : "یک پرونده یا پوشه از سرور دیگر به اشتراک گذاشته شد", "Sharing" : "اشتراک گذاری", @@ -150,6 +151,7 @@ OC.L10N.register( "Unable to fetch inherited shares" : "واگذاری سهام ارثی امکان پذیر نیست", "Shares" : "اشتراک گذاری ها", "Unable to load the shares list" : "لیست سهام بارگیری نمی شود", + "Expires {relativetime}" : "منقضی در {relativetime}", "this share just expired." : "این اشتراک تازه منقضی شد", "Shared with you by {owner}" : "به اشتراک گذاشته شده با شما توسط {owner}", "Link to a file" : "پیوند به یک پرونده", @@ -158,6 +160,7 @@ OC.L10N.register( "_Reject share_::_Reject shares_" : ["Reject share","Reject shares"], "_Restore share_::_Restore shares_" : ["Restore share","Restore shares"], "Shared" : "به اشتراک گذاشته شده ", + "Shared multiple times with different people" : "Shared multiple times with different people", "Shared with others" : "موارد به اشتراک گذاشته شده با دیگران", "Public file share" : "اشتراک عمومی پرونده", "Publicly shared file." : "پرونده بصورت عمومی به اشتراک گذاشته شده است", diff --git a/apps/files_sharing/l10n/fa.json b/apps/files_sharing/l10n/fa.json index 444d6173913..03df10efc91 100644 --- a/apps/files_sharing/l10n/fa.json +++ b/apps/files_sharing/l10n/fa.json @@ -13,6 +13,7 @@ "You removed yourself" : "شما خدتان را حذف کردید", "Share for {user} expired" : "اشتراک برای {user} منقضی شده است", "Share expired" : "اشتراک منقضی شد", + "{actor} shared {file} with you" : "{actor} {file} را با شما به اشتراک گذاشت", "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "یک پرونده یا پوشه به اشتراک گذاشته شده از طریق پست یا از طریق لینک عمومی بارگیری شد", "A file or folder was shared from <strong>another server</strong>" : "یک پرونده یا پوشه از سرور دیگر به اشتراک گذاشته شد", "Sharing" : "اشتراک گذاری", @@ -148,6 +149,7 @@ "Unable to fetch inherited shares" : "واگذاری سهام ارثی امکان پذیر نیست", "Shares" : "اشتراک گذاری ها", "Unable to load the shares list" : "لیست سهام بارگیری نمی شود", + "Expires {relativetime}" : "منقضی در {relativetime}", "this share just expired." : "این اشتراک تازه منقضی شد", "Shared with you by {owner}" : "به اشتراک گذاشته شده با شما توسط {owner}", "Link to a file" : "پیوند به یک پرونده", @@ -156,6 +158,7 @@ "_Reject share_::_Reject shares_" : ["Reject share","Reject shares"], "_Restore share_::_Restore shares_" : ["Restore share","Restore shares"], "Shared" : "به اشتراک گذاشته شده ", + "Shared multiple times with different people" : "Shared multiple times with different people", "Shared with others" : "موارد به اشتراک گذاشته شده با دیگران", "Public file share" : "اشتراک عمومی پرونده", "Publicly shared file." : "پرونده بصورت عمومی به اشتراک گذاشته شده است", diff --git a/apps/files_sharing/l10n/fr.js b/apps/files_sharing/l10n/fr.js index 53adc1f132c..f99ebfc1530 100644 --- a/apps/files_sharing/l10n/fr.js +++ b/apps/files_sharing/l10n/fr.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "Dépôt de fichier", "Upload files to {foldername}." : "Téléverser les fichiers vers {foldername}.", "By uploading files, you agree to the terms of service." : "En téléversant des fichiers, vous acceptez les conditions d'utilisation du service.", + "Successfully uploaded files" : "Fichiers téléversés avec succès", "View terms of service" : "Voir les conditions d'utilisation du service", "Terms of service" : "Conditions d'utilisation", "Upload files to {folder}" : "Téléverser les fichiers dans {folder}", diff --git a/apps/files_sharing/l10n/fr.json b/apps/files_sharing/l10n/fr.json index 58055c96295..ecec9e15f07 100644 --- a/apps/files_sharing/l10n/fr.json +++ b/apps/files_sharing/l10n/fr.json @@ -255,6 +255,7 @@ "File drop" : "Dépôt de fichier", "Upload files to {foldername}." : "Téléverser les fichiers vers {foldername}.", "By uploading files, you agree to the terms of service." : "En téléversant des fichiers, vous acceptez les conditions d'utilisation du service.", + "Successfully uploaded files" : "Fichiers téléversés avec succès", "View terms of service" : "Voir les conditions d'utilisation du service", "Terms of service" : "Conditions d'utilisation", "Upload files to {folder}" : "Téléverser les fichiers dans {folder}", diff --git a/apps/files_sharing/l10n/ja.js b/apps/files_sharing/l10n/ja.js index 3c82171b04b..6185d4fcfc2 100644 --- a/apps/files_sharing/l10n/ja.js +++ b/apps/files_sharing/l10n/ja.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "ファイルを転送", "Upload files to {foldername}." : "{foldername}にファイルをアップロード", "By uploading files, you agree to the terms of service." : "ファイルをアップロードすることで、利用規約に同意したことになります。", + "Successfully uploaded files" : "ファイルのアップロードに成功しました", "View terms of service" : "利用規約を見る", "Terms of service" : "サービス利用規約", "Upload files to {folder}" : "{folder}にファイルをアップロード", diff --git a/apps/files_sharing/l10n/ja.json b/apps/files_sharing/l10n/ja.json index 30b967a6848..fe3629aa4da 100644 --- a/apps/files_sharing/l10n/ja.json +++ b/apps/files_sharing/l10n/ja.json @@ -255,6 +255,7 @@ "File drop" : "ファイルを転送", "Upload files to {foldername}." : "{foldername}にファイルをアップロード", "By uploading files, you agree to the terms of service." : "ファイルをアップロードすることで、利用規約に同意したことになります。", + "Successfully uploaded files" : "ファイルのアップロードに成功しました", "View terms of service" : "利用規約を見る", "Terms of service" : "サービス利用規約", "Upload files to {folder}" : "{folder}にファイルをアップロード", diff --git a/apps/files_sharing/l10n/pt_BR.js b/apps/files_sharing/l10n/pt_BR.js index f75b225aae5..b8c05daa750 100644 --- a/apps/files_sharing/l10n/pt_BR.js +++ b/apps/files_sharing/l10n/pt_BR.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "Depósito de arquivos", "Upload files to {foldername}." : "Subir arquivos para {foldername}.", "By uploading files, you agree to the terms of service." : "Ao enviar arquivos, você concorda com os termos de serviço.", + "Successfully uploaded files" : "Arquivos carregados com sucesso", "View terms of service" : "Ver os termos de serviço", "Terms of service" : "Termos de serviço", "Upload files to {folder}" : "Enviar arquivos para {folder}", diff --git a/apps/files_sharing/l10n/pt_BR.json b/apps/files_sharing/l10n/pt_BR.json index d1b9e77d278..827e07c452b 100644 --- a/apps/files_sharing/l10n/pt_BR.json +++ b/apps/files_sharing/l10n/pt_BR.json @@ -255,6 +255,7 @@ "File drop" : "Depósito de arquivos", "Upload files to {foldername}." : "Subir arquivos para {foldername}.", "By uploading files, you agree to the terms of service." : "Ao enviar arquivos, você concorda com os termos de serviço.", + "Successfully uploaded files" : "Arquivos carregados com sucesso", "View terms of service" : "Ver os termos de serviço", "Terms of service" : "Termos de serviço", "Upload files to {folder}" : "Enviar arquivos para {folder}", diff --git a/apps/files_sharing/l10n/sr.js b/apps/files_sharing/l10n/sr.js index 48323c82d47..4a2c7230e0e 100644 --- a/apps/files_sharing/l10n/sr.js +++ b/apps/files_sharing/l10n/sr.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "Место за упуштање фајлова", "Upload files to {foldername}." : "Отпреми фајлове у {foldername}.", "By uploading files, you agree to the terms of service." : "Отпремањем фајлова, слажете се са условима коришћења.", + "Successfully uploaded files" : "Фајлови су успешно отпремљени", "View terms of service" : "Прикажи услове коришћења", "Terms of service" : "Услови коришћења", "Upload files to {folder}" : "Отпреми фајлове у {folder}", diff --git a/apps/files_sharing/l10n/sr.json b/apps/files_sharing/l10n/sr.json index 04897bc3598..64fb1ab2187 100644 --- a/apps/files_sharing/l10n/sr.json +++ b/apps/files_sharing/l10n/sr.json @@ -255,6 +255,7 @@ "File drop" : "Место за упуштање фајлова", "Upload files to {foldername}." : "Отпреми фајлове у {foldername}.", "By uploading files, you agree to the terms of service." : "Отпремањем фајлова, слажете се са условима коришћења.", + "Successfully uploaded files" : "Фајлови су успешно отпремљени", "View terms of service" : "Прикажи услове коришћења", "Terms of service" : "Услови коришћења", "Upload files to {folder}" : "Отпреми фајлове у {folder}", diff --git a/apps/files_sharing/l10n/sv.js b/apps/files_sharing/l10n/sv.js index e5af3c5e4c3..afd677b187b 100644 --- a/apps/files_sharing/l10n/sv.js +++ b/apps/files_sharing/l10n/sv.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "Filinkast", "Upload files to {foldername}." : "Ladda upp filer till {foldername}.", "By uploading files, you agree to the terms of service." : "Genom att ladda upp filer godkänner du användarvillkoren.", + "Successfully uploaded files" : "Filer har laddats upp", "View terms of service" : "Visa användarvillkoren", "Terms of service" : "Användarvillkor", "Upload files to {folder}" : "Ladda upp filer till {folder}", diff --git a/apps/files_sharing/l10n/sv.json b/apps/files_sharing/l10n/sv.json index 8be901a9c3d..89e44650c43 100644 --- a/apps/files_sharing/l10n/sv.json +++ b/apps/files_sharing/l10n/sv.json @@ -255,6 +255,7 @@ "File drop" : "Filinkast", "Upload files to {foldername}." : "Ladda upp filer till {foldername}.", "By uploading files, you agree to the terms of service." : "Genom att ladda upp filer godkänner du användarvillkoren.", + "Successfully uploaded files" : "Filer har laddats upp", "View terms of service" : "Visa användarvillkoren", "Terms of service" : "Användarvillkor", "Upload files to {folder}" : "Ladda upp filer till {folder}", diff --git a/apps/files_sharing/l10n/zh_CN.js b/apps/files_sharing/l10n/zh_CN.js index 404be9f7ab4..5d051eb9950 100644 --- a/apps/files_sharing/l10n/zh_CN.js +++ b/apps/files_sharing/l10n/zh_CN.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "文件拖放", "Upload files to {foldername}." : "将文件上传到 {foldername}。", "By uploading files, you agree to the terms of service." : "上传文件即表示您同意服务条款。", + "Successfully uploaded files" : "已成功上传文件", "View terms of service" : "查看服务条款", "Terms of service" : "服务条款", "Upload files to {folder}" : "将文件上传到 {folder}", diff --git a/apps/files_sharing/l10n/zh_CN.json b/apps/files_sharing/l10n/zh_CN.json index 2ea3efde3bb..5cd693a66be 100644 --- a/apps/files_sharing/l10n/zh_CN.json +++ b/apps/files_sharing/l10n/zh_CN.json @@ -255,6 +255,7 @@ "File drop" : "文件拖放", "Upload files to {foldername}." : "将文件上传到 {foldername}。", "By uploading files, you agree to the terms of service." : "上传文件即表示您同意服务条款。", + "Successfully uploaded files" : "已成功上传文件", "View terms of service" : "查看服务条款", "Terms of service" : "服务条款", "Upload files to {folder}" : "将文件上传到 {folder}", diff --git a/apps/files_sharing/l10n/zh_HK.js b/apps/files_sharing/l10n/zh_HK.js index dd435890210..b06485d52ae 100644 --- a/apps/files_sharing/l10n/zh_HK.js +++ b/apps/files_sharing/l10n/zh_HK.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "檔案拖放", "Upload files to {foldername}." : "上傳檔案至 {foldername}。", "By uploading files, you agree to the terms of service." : "上傳檔案即表示您同意服務條款。", + "Successfully uploaded files" : "檔案上傳成功", "View terms of service" : "檢視服務條款", "Terms of service" : "服務條款", "Upload files to {folder}" : "上傳檔案到 {folder}", diff --git a/apps/files_sharing/l10n/zh_HK.json b/apps/files_sharing/l10n/zh_HK.json index 4f6fe38e858..67d1f31894f 100644 --- a/apps/files_sharing/l10n/zh_HK.json +++ b/apps/files_sharing/l10n/zh_HK.json @@ -255,6 +255,7 @@ "File drop" : "檔案拖放", "Upload files to {foldername}." : "上傳檔案至 {foldername}。", "By uploading files, you agree to the terms of service." : "上傳檔案即表示您同意服務條款。", + "Successfully uploaded files" : "檔案上傳成功", "View terms of service" : "檢視服務條款", "Terms of service" : "服務條款", "Upload files to {folder}" : "上傳檔案到 {folder}", diff --git a/apps/files_sharing/l10n/zh_TW.js b/apps/files_sharing/l10n/zh_TW.js index fc86c1306e7..9f2a7ae3b85 100644 --- a/apps/files_sharing/l10n/zh_TW.js +++ b/apps/files_sharing/l10n/zh_TW.js @@ -257,6 +257,7 @@ OC.L10N.register( "File drop" : "檔案投遞", "Upload files to {foldername}." : "上傳檔案至 {foldername}。", "By uploading files, you agree to the terms of service." : "上傳檔案即表示您同意服務條款。", + "Successfully uploaded files" : "已成功上傳檔案", "View terms of service" : "檢視服務條款", "Terms of service" : "服務條款", "Upload files to {folder}" : "上傳檔案到 {folder}", diff --git a/apps/files_sharing/l10n/zh_TW.json b/apps/files_sharing/l10n/zh_TW.json index af5b6ecabf5..35e7ec603d5 100644 --- a/apps/files_sharing/l10n/zh_TW.json +++ b/apps/files_sharing/l10n/zh_TW.json @@ -255,6 +255,7 @@ "File drop" : "檔案投遞", "Upload files to {foldername}." : "上傳檔案至 {foldername}。", "By uploading files, you agree to the terms of service." : "上傳檔案即表示您同意服務條款。", + "Successfully uploaded files" : "已成功上傳檔案", "View terms of service" : "檢視服務條款", "Terms of service" : "服務條款", "Upload files to {folder}" : "上傳檔案到 {folder}", diff --git a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php index 686ba32fd49..645250ab2b5 100644 --- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php +++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php @@ -91,6 +91,9 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider 'disclaimer', $this->appConfig->getValueString('core', 'shareapi_public_link_disclaimertext'), ); + // file drops do not request the root folder so we need to provide label and note if available + $this->initialState->provideInitialState('label', $share->getLabel()); + $this->initialState->provideInitialState('note', $share->getNote()); } // Set up initial state $this->initialState->provideInitialState('isPublic', true); @@ -149,10 +152,7 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider $headerActions = []; if ($view !== 'public-file-drop' && !$share->getHideDownload()) { // The download URL is used for the "download" header action as well as in some cases for the direct link - $downloadUrl = $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.downloadShare', [ - 'token' => $token, - 'filename' => ($shareNode instanceof File) ? $shareNode->getName() : null, - ]); + $downloadUrl = $this->urlGenerator->getAbsoluteURL('/public.php/dav/files/' . $token . '/?accept=zip'); // If not a file drop, then add the download header action $headerActions[] = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $downloadUrl, 0, (string)$shareNode->getSize()); diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json index 68420dde80e..89c82843939 100644 --- a/apps/files_sharing/openapi.json +++ b/apps/files_sharing/openapi.json @@ -1490,6 +1490,13 @@ 1 ] } + }, + { + "name": "X-NC-Preview", + "in": "header", + "schema": { + "type": "string" + } } ], "responses": { @@ -1574,11 +1581,13 @@ "password": { "type": "string", "nullable": true, + "default": null, "description": "Password of the share" }, "dir": { "type": "string", "nullable": true, + "default": null, "description": "Subdirectory to get info about" }, "depth": { @@ -1782,12 +1791,14 @@ "path": { "type": "string", "nullable": true, + "default": null, "description": "Path of the share" }, "permissions": { "type": "integer", "format": "int64", "nullable": true, + "default": null, "description": "Permissions for the share" }, "shareType": { @@ -1799,11 +1810,13 @@ "shareWith": { "type": "string", "nullable": true, + "default": null, "description": "The entity this should be shared with" }, "publicUpload": { "type": "string", "nullable": true, + "default": null, "enum": [ "true", "false" @@ -1818,11 +1831,13 @@ "sendPasswordByTalk": { "type": "string", "nullable": true, + "default": null, "description": "Send the password for the share over Talk" }, "expireDate": { "type": "string", "nullable": true, + "default": null, "description": "The expiry date of the share in the user's timezone at 00:00. If $expireDate is not supplied or set to `null`, the system default will be used." }, "note": { @@ -1838,11 +1853,13 @@ "attributes": { "type": "string", "nullable": true, + "default": null, "description": "Additional attributes for the share" }, "sendMail": { "type": "string", "nullable": true, + "default": null, "enum": [ "false", "true" @@ -2297,56 +2314,67 @@ "type": "integer", "format": "int64", "nullable": true, + "default": null, "description": "New permissions" }, "password": { "type": "string", "nullable": true, + "default": null, "description": "New password" }, "sendPasswordByTalk": { "type": "string", "nullable": true, + "default": null, "description": "New condition if the password should be send over Talk" }, "publicUpload": { "type": "string", "nullable": true, + "default": null, "description": "New condition if public uploading is allowed" }, "expireDate": { "type": "string", "nullable": true, + "default": null, "description": "New expiry date" }, "note": { "type": "string", "nullable": true, + "default": null, "description": "New note" }, "label": { "type": "string", "nullable": true, + "default": null, "description": "New label" }, "hideDownload": { "type": "string", "nullable": true, + "default": null, "description": "New condition if the download should be hidden" }, "attributes": { "type": "string", "nullable": true, + "default": null, "description": "New additional attributes" }, "sendMail": { "type": "string", "nullable": true, + "default": null, "description": "if the share should be send by mail. Considering the share already exists, no mail will be send after the share is updated. You will have to use the sendMail action to send the mail." }, "token": { "type": "string", "nullable": true, + "default": null, "description": "New token" } } @@ -3099,7 +3127,8 @@ "description": "Limit to specific item types", "schema": { "type": "string", - "nullable": true + "nullable": true, + "default": null } }, { @@ -3128,6 +3157,7 @@ "description": "Limit to specific share types", "schema": { "nullable": true, + "default": null, "oneOf": [ { "type": "integer", @@ -3267,6 +3297,7 @@ "description": "Limit to specific share types", "schema": { "nullable": true, + "default": null, "oneOf": [ { "type": "integer", diff --git a/apps/files_sharing/src/files_views/publicFileDrop.ts b/apps/files_sharing/src/files_views/publicFileDrop.ts index 0d782d48fc7..65756e83c74 100644 --- a/apps/files_sharing/src/files_views/publicFileDrop.ts +++ b/apps/files_sharing/src/files_views/publicFileDrop.ts @@ -4,7 +4,8 @@ */ import type { VueConstructor } from 'vue' -import { Folder, Permission, View, davRemoteURL, davRootPath, getNavigation } from '@nextcloud/files' +import { Folder, Permission, View, getNavigation } from '@nextcloud/files' +import { defaultRemoteURL, defaultRootPath } from '@nextcloud/files/dav' import { loadState } from '@nextcloud/initial-state' import { translate as t } from '@nextcloud/l10n' import svgCloudUpload from '@mdi/svg/svg/cloud-upload.svg?raw' @@ -45,8 +46,8 @@ export default () => { // Fake a writeonly folder as root folder: new Folder({ id: 0, - source: `${davRemoteURL}${davRootPath}`, - root: davRootPath, + source: `${defaultRemoteURL}${defaultRootPath}`, + root: defaultRootPath, owner: null, permissions: Permission.CREATE, }), diff --git a/apps/files_sharing/src/views/FilesViewFileDropEmptyContent.vue b/apps/files_sharing/src/views/FilesViewFileDropEmptyContent.vue index 5571e5e9f5d..33fec9af028 100644 --- a/apps/files_sharing/src/views/FilesViewFileDropEmptyContent.vue +++ b/apps/files_sharing/src/views/FilesViewFileDropEmptyContent.vue @@ -5,13 +5,29 @@ <template> <NcEmptyContent class="file-drop-empty-content" data-cy-files-sharing-file-drop - :name="t('files_sharing', 'File drop')"> + :name="name"> <template #icon> <NcIconSvgWrapper :svg="svgCloudUpload" /> </template> <template #description> - {{ t('files_sharing', 'Upload files to {foldername}.', { foldername }) }} - {{ disclaimer === '' ? '' : t('files_sharing', 'By uploading files, you agree to the terms of service.') }} + <p> + {{ shareNote || t('files_sharing', 'Upload files to {foldername}.', { foldername }) }} + </p> + <p v-if="disclaimer"> + {{ t('files_sharing', 'By uploading files, you agree to the terms of service.') }} + </p> + <NcNoteCard v-if="getSortedUploads().length" + class="file-drop-empty-content__note-card" + type="success"> + <h2 id="file-drop-empty-content__heading"> + {{ t('files_sharing', 'Successfully uploaded files') }} + </h2> + <ul aria-labelledby="file-drop-empty-content__heading" class="file-drop-empty-content__list"> + <li v-for="file in getSortedUploads()" :key="file"> + {{ file }} + </li> + </ul> + </NcNoteCard> </template> <template #action> <template v-if="disclaimer"> @@ -34,16 +50,24 @@ </NcEmptyContent> </template> +<script lang="ts"> +/* eslint-disable import/first */ + +// We need this on module level rather than on the instance as view will be refreshed by the files app after uploading +const uploads = new Set<string>() +</script> + <script setup lang="ts"> import { loadState } from '@nextcloud/initial-state' import { translate as t } from '@nextcloud/l10n' -import { getUploader, UploadPicker } from '@nextcloud/upload' +import { getUploader, UploadPicker, UploadStatus } from '@nextcloud/upload' import { ref } from 'vue' import NcButton from '@nextcloud/vue/components/NcButton' import NcDialog from '@nextcloud/vue/components/NcDialog' import NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent' import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper' +import NcNoteCard from '@nextcloud/vue/components/NcNoteCard' import svgCloudUpload from '@mdi/svg/svg/cloud-upload.svg?raw' defineProps<{ @@ -51,17 +75,62 @@ defineProps<{ }>() const disclaimer = loadState<string>('files_sharing', 'disclaimer', '') +const shareLabel = loadState<string>('files_sharing', 'label', '') +const shareNote = loadState<string>('files_sharing', 'note', '') + +const name = shareLabel || t('files_sharing', 'File drop') + const showDialog = ref(false) const uploadDestination = getUploader().destination -</script> -<style scoped> -:deep(.terms-of-service-dialog) { - min-height: min(100px, 20vh); +getUploader() + .addNotifier((upload) => { + if (upload.status === UploadStatus.FINISHED && upload.file.name) { + // if a upload is finished and is not a meta upload (name is set) + // then we add the upload to the list of finished uploads to be shown to the user + uploads.add(upload.file.name) + } + }) + +/** + * Get the previous uploads as sorted list + */ +function getSortedUploads() { + return [...uploads].sort((a, b) => a.localeCompare(b)) } -/* TODO fix in library */ -.file-drop-empty-content :deep(.empty-content__action) { - display: flex; - gap: var(--default-grid-baseline); +</script> + +<style scoped lang="scss"> +.file-drop-empty-content { + margin: auto; + max-width: max(50vw, 300px); + + .file-drop-empty-content__note-card { + width: fit-content; + margin-inline: auto; + } + + #file-drop-empty-content__heading { + margin-block: 0 10px; + font-weight: bold; + font-size: 20px; + } + + .file-drop-empty-content__list { + list-style: inside; + max-height: min(350px, 33vh); + overflow-y: scroll; + padding-inline-end: calc(2 * var(--default-grid-baseline)); + } + + :deep(.terms-of-service-dialog) { + min-height: min(100px, 20vh); + } + + /* TODO fix in library */ + :deep(.empty-content__action) { + display: flex; + gap: var(--default-grid-baseline); + } } </style> diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php index 888b2cdd596..769516cda85 100644 --- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php +++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php @@ -11,6 +11,7 @@ use OCP\Federation\ICloudId; use OCP\Federation\ICloudIdManager; use OCP\IDBConnection; use OCP\Server; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; @@ -24,20 +25,9 @@ use Test\TestCase; */ class CleanupRemoteStoragesTest extends TestCase { - /** - * @var CleanupRemoteStorages - */ - private $command; - - /** - * @var IDBConnection - */ - private $connection; - - /** - * @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject - */ - private $cloudIdManager; + protected IDBConnection $connection; + protected CleanupRemoteStorages $command; + private ICloudIdManager&MockObject $cloudIdManager; private $storages = [ ['id' => 'shared::7b4a322b22f9d0047c38d77d471ce3cf', 'share_token' => 'f2c69dad1dc0649f26976fd210fc62e1', 'remote' => 'https://hostname.tld/owncloud1', 'user' => 'user1'], @@ -77,7 +67,7 @@ class CleanupRemoteStoragesTest extends TestCase { foreach ($this->storages as &$storage) { if (isset($storage['id'])) { $storageQuery->setParameter('id', $storage['id']); - $storageQuery->execute(); + $storageQuery->executeStatement(); $storage['numeric_id'] = $storageQuery->getLastInsertId(); } @@ -121,13 +111,13 @@ class CleanupRemoteStoragesTest extends TestCase { foreach ($this->storages as $storage) { if (isset($storage['id'])) { $storageQuery->setParameter('id', $storage['id']); - $storageQuery->execute(); + $storageQuery->executeStatement(); } if (isset($storage['share_token'])) { $shareExternalQuery->setParameter('share_token', $storage['share_token']); $shareExternalQuery->setParameter('remote', $storage['remote']); - $shareExternalQuery->execute(); + $shareExternalQuery->executeStatement(); } } @@ -174,14 +164,13 @@ class CleanupRemoteStoragesTest extends TestCase { ->getMock(); // parent folder, `files`, ´test` and `welcome.txt` => 4 elements - + $outputCalls = []; $output ->expects($this->any()) ->method('writeln') - ->withConsecutive( - ['5 remote storage(s) need(s) to be checked'], - ['5 remote share(s) exist'], - ); + ->willReturnCallback(function (string $text) use (&$outputCalls) { + $outputCalls[] = $text; + }); $this->cloudIdManager ->expects($this->any()) @@ -206,5 +195,10 @@ class CleanupRemoteStoragesTest extends TestCase { $this->assertFalse($this->doesStorageExist($this->storages[3]['numeric_id'])); $this->assertTrue($this->doesStorageExist($this->storages[4]['numeric_id'])); $this->assertFalse($this->doesStorageExist($this->storages[5]['numeric_id'])); + + $this->assertEquals([ + '5 remote storage(s) need(s) to be checked', + '5 remote share(s) exist', + ], array_slice($outputCalls, 0, 2)); } } diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index 02c133ee5d1..f245f0a25c7 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -1542,84 +1542,129 @@ class ShareAPIControllerTest extends TestCase { $this->assertEquals($expected, $result->getData()); } - public function testCanAccessShare(): void { - $share = $this->getMockBuilder(IShare::class)->getMock(); + public function testCanAccessShareAsOwner(): void { + $share = $this->createMock(IShare::class); $share->method('getShareOwner')->willReturn($this->currentUser); $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } - $share = $this->getMockBuilder(IShare::class)->getMock(); + public function testCanAccessShareAsSharer(): void { + $share = $this->createMock(IShare::class); $share->method('getSharedBy')->willReturn($this->currentUser); $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } - $share = $this->getMockBuilder(IShare::class)->getMock(); + public function testCanAccessShareAsSharee(): void { + $share = $this->createMock(IShare::class); $share->method('getShareType')->willReturn(IShare::TYPE_USER); $share->method('getSharedWith')->willReturn($this->currentUser); $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } - $file = $this->getMockBuilder(File::class)->getMock(); + public function testCannotAccessLinkShare(): void { + $share = $this->createMock(IShare::class); + $share->method('getShareType')->willReturn(IShare::TYPE_LINK); + $share->method('getNodeId')->willReturn(42); - $userFolder = $this->getMockBuilder(Folder::class)->getMock(); + $userFolder = $this->createMock(Folder::class); $this->rootFolder->method('getUserFolder') ->with($this->currentUser) ->willReturn($userFolder); + $this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } + + /** + * @dataProvider dataCanAccessShareWithPermissions + */ + public function testCanAccessShareWithPermissions(int $permissions, bool $expected): void { + $share = $this->createMock(IShare::class); + $share->method('getShareType')->willReturn(IShare::TYPE_USER); + $share->method('getSharedWith')->willReturn($this->createMock(IUser::class)); + $share->method('getNodeId')->willReturn(42); + + $file = $this->createMock(File::class); + + $userFolder = $this->getMockBuilder(Folder::class)->getMock(); $userFolder->method('getFirstNodeById') ->with($share->getNodeId()) ->willReturn($file); $userFolder->method('getById') ->with($share->getNodeId()) ->willReturn([$file]); + $this->rootFolder->method('getUserFolder') + ->with($this->currentUser) + ->willReturn($userFolder); $file->method('getPermissions') - ->will($this->onConsecutiveCalls(Constants::PERMISSION_SHARE, Constants::PERMISSION_READ)); + ->willReturn($permissions); - // getPermissions -> share - $share = $this->getMockBuilder(IShare::class)->getMock(); - $share->method('getShareType')->willReturn(IShare::TYPE_USER); - $share->method('getSharedWith')->willReturn($this->getMockBuilder(IUser::class)->getMock()); - $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + if ($expected) { + $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } else { + $this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } + } - // getPermissions -> read - $share = $this->getMockBuilder(IShare::class)->getMock(); - $share->method('getShareType')->willReturn(IShare::TYPE_USER); - $share->method('getSharedWith')->willReturn($this->getMockBuilder(IUser::class)->getMock()); - $this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + public static function dataCanAccessShareWithPermissions(): array { + return [ + [Constants::PERMISSION_SHARE, true], + [Constants::PERMISSION_READ, false], + [Constants::PERMISSION_READ | Constants::PERMISSION_SHARE, true], + ]; + } - $share = $this->getMockBuilder(IShare::class)->getMock(); + /** + * @dataProvider dataCanAccessShareAsGroupMember + */ + public function testCanAccessShareAsGroupMember(string $group, bool $expected): void { + $share = $this->createMock(IShare::class); $share->method('getShareType')->willReturn(IShare::TYPE_GROUP); - $share->method('getSharedWith')->willReturn('group'); + $share->method('getSharedWith')->willReturn($group); + $share->method('getNodeId')->willReturn(42); + + $file = $this->createMock(File::class); + + $userFolder = $this->createMock(Folder::class); + $userFolder->method('getFirstNodeById') + ->with($share->getNodeId()) + ->willReturn($file); + $userFolder->method('getById') + ->with($share->getNodeId()) + ->willReturn([$file]); + $this->rootFolder->method('getUserFolder') + ->with($this->currentUser) + ->willReturn($userFolder); $user = $this->createMock(IUser::class); $this->userManager->method('get') ->with($this->currentUser) ->willReturn($user); - $group = $this->getMockBuilder(IGroup::class)->getMock(); + $group = $this->createMock(IGroup::class); $group->method('inGroup')->with($user)->willReturn(true); - $group2 = $this->getMockBuilder(IGroup::class)->getMock(); + $group2 = $this->createMock(IGroup::class); $group2->method('inGroup')->with($user)->willReturn(false); $this->groupManager->method('get')->willReturnMap([ ['group', $group], ['group2', $group2], - ['groupnull', null], + ['group-null', null], ]); - $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); - $share = $this->createMock(IShare::class); - $share->method('getShareType')->willReturn(IShare::TYPE_GROUP); - $share->method('getSharedWith')->willReturn('group2'); - $this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); - - // null group - $share = $this->createMock(IShare::class); - $share->method('getShareType')->willReturn(IShare::TYPE_GROUP); - $share->method('getSharedWith')->willReturn('groupnull'); - $this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + if ($expected) { + $this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } else { + $this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + } + } - $share = $this->createMock(IShare::class); - $share->method('getShareType')->willReturn(IShare::TYPE_LINK); - $this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share])); + public static function dataCanAccessShareAsGroupMember(): array { + return [ + ['group', true], + ['group2', false], + ['group-null', false], + ]; } public function dataCanAccessRoomShare() { @@ -1675,8 +1720,11 @@ class ShareAPIControllerTest extends TestCase { ->with('spreed') ->willReturn(true); - $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') - ->setMethods(['canAccessShare']) + // This is not possible anymore with PHPUnit 10+ + // as `setMethods` was removed and now real reflection is used, thus the class needs to exist. + // $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') + $helper = $this->getMockBuilder(\stdClass::class) + ->addMethods(['canAccessShare']) ->getMock(); $helper->method('canAccessShare') ->with($share, $this->currentUser) @@ -2492,8 +2540,11 @@ class ShareAPIControllerTest extends TestCase { ->with('spreed') ->willReturn(true); - $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') - ->setMethods(['createShare']) + // This is not possible anymore with PHPUnit 10+ + // as `setMethods` was removed and now real reflection is used, thus the class needs to exist. + // $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') + $helper = $this->getMockBuilder(\stdClass::class) + ->addMethods(['createShare']) ->getMock(); $helper->method('createShare') ->with( @@ -2598,7 +2649,10 @@ class ShareAPIControllerTest extends TestCase { ->with('spreed') ->willReturn(true); - $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') + // This is not possible anymore with PHPUnit 10+ + // as `setMethods` was removed and now real reflection is used, thus the class needs to exist. + // $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') + $helper = $this->getMockBuilder(\stdClass::class) ->addMethods(['createShare']) ->getMock(); $helper->method('createShare') @@ -5093,8 +5147,11 @@ class ShareAPIControllerTest extends TestCase { ->with('spreed') ->willReturn(true); - $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') - ->setMethods(['formatShare', 'canAccessShare']) + // This is not possible anymore with PHPUnit 10+ + // as `setMethods` was removed and now real reflection is used, thus the class needs to exist. + // $helper = $this->getMockBuilder('\OCA\Talk\Share\Helper\ShareAPIController') + $helper = $this->getMockBuilder(\stdClass::class) + ->addMethods(['formatShare', 'canAccessShare']) ->getMock(); $helper->method('formatShare') ->with($share) diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 58cbb4e0b82..a6bef1bed56 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -261,8 +261,12 @@ class ShareControllerTest extends \Test\TestCase { ['files_sharing.sharecontroller.showShare', ['token' => 'token'], 'shareUrl'], // this share is not an image to the default preview is used ['files_sharing.PublicPreview.getPreview', ['x' => 256, 'y' => 256, 'file' => $share->getTarget(), 'token' => 'token'], 'previewUrl'], - // for the direct link - ['files_sharing.sharecontroller.downloadShare', ['token' => 'token', 'filename' => $filename ], 'downloadUrl'], + ]); + + $this->urlGenerator->expects($this->once()) + ->method('getAbsoluteURL') + ->willReturnMap([ + ['/public.php/dav/files/token/?accept=zip', 'downloadUrl'], ]); $this->previewManager->method('isMimeSupported')->with('text/plain')->willReturn(true); @@ -395,6 +399,8 @@ class ShareControllerTest extends \Test\TestCase { ->setPassword('password') ->setShareOwner('ownerUID') ->setSharedBy('initiatorUID') + ->setNote('The note') + ->setLabel('A label') ->setNode($file) ->setTarget("/$filename") ->setToken('token'); @@ -474,6 +480,8 @@ class ShareControllerTest extends \Test\TestCase { 'disclaimer' => 'My disclaimer text', 'owner' => 'ownerUID', 'ownerDisplayName' => 'ownerDisplay', + 'note' => 'The note', + 'label' => 'A label', ]; $response = $this->shareController->showShare(); @@ -483,9 +491,9 @@ class ShareControllerTest extends \Test\TestCase { $csp = new ContentSecurityPolicy(); $csp->addAllowedFrameDomain('\'self\''); $expectedResponse = new PublicTemplateResponse('files', 'index'); - $expectedResponse->setParams(['pageTitle' => $filename]); + $expectedResponse->setParams(['pageTitle' => 'A label']); $expectedResponse->setContentSecurityPolicy($csp); - $expectedResponse->setHeaderTitle($filename); + $expectedResponse->setHeaderTitle('A label'); $expectedResponse->setHeaderDetails('shared by ownerDisplay'); $expectedResponse->setHeaderActions([ new LinkMenuAction($this->l10n->t('Direct link'), 'icon-public', 'shareUrl'), @@ -552,8 +560,12 @@ class ShareControllerTest extends \Test\TestCase { ['files_sharing.sharecontroller.showShare', ['token' => 'token'], 'shareUrl'], // this share is not an image to the default preview is used ['files_sharing.PublicPreview.getPreview', ['x' => 256, 'y' => 256, 'file' => $share->getTarget(), 'token' => 'token'], 'previewUrl'], - // for the direct link - ['files_sharing.sharecontroller.downloadShare', ['token' => 'token', 'filename' => $filename ], 'downloadUrl'], + ]); + + $this->urlGenerator->expects($this->once()) + ->method('getAbsoluteURL') + ->willReturnMap([ + ['/public.php/dav/files/token/?accept=zip', 'downloadUrl'], ]); $this->previewManager->method('isMimeSupported')->with('text/plain')->willReturn(true); diff --git a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php index f2df74fd01b..571647829f2 100644 --- a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php @@ -15,15 +15,13 @@ use OCP\IRequest; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager as ShareManager; use OCP\Share\IShare; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class ShareInfoControllerTest extends TestCase { - /** @var ShareInfoController */ - private $controller; - - /** @var ShareManager|\PHPUnit\Framework\MockObject\MockObject */ - private $shareManager; + protected ShareInfoController $controller; + protected ShareManager&MockObject $shareManager; protected function setUp(): void { @@ -31,14 +29,11 @@ class ShareInfoControllerTest extends TestCase { $this->shareManager = $this->createMock(ShareManager::class); - $this->controller = $this->getMockBuilder(ShareInfoController::class) - ->setConstructorArgs([ - 'files_sharing', - $this->createMock(IRequest::class), - $this->shareManager - ]) - ->setMethods(['addROWrapper']) - ->getMock(); + $this->controller = new ShareInfoController( + 'files_sharing', + $this->createMock(IRequest::class), + $this->shareManager + ); } public function testNoShare(): void { diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php index 611392c286e..5314d1ec00f 100644 --- a/apps/files_sharing/tests/External/ManagerTest.php +++ b/apps/files_sharing/tests/External/ManagerTest.php @@ -33,6 +33,7 @@ use OCP\IUserSession; use OCP\OCS\IDiscoveryService; use OCP\Server; use OCP\Share\IShare; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; use Test\Traits\UserTrait; @@ -46,42 +47,19 @@ use Test\Traits\UserTrait; class ManagerTest extends TestCase { use UserTrait; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ - protected $contactsManager; - - /** @var Manager|\PHPUnit\Framework\MockObject\MockObject * */ - private $manager; - - /** @var \OC\Files\Mount\Manager */ - private $mountManager; - - /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */ - private $clientService; - - /** @var ICloudFederationProviderManager|\PHPUnit\Framework\MockObject\MockObject */ - private $cloudFederationProviderManager; - - /** @var ICloudFederationFactory|\PHPUnit\Framework\MockObject\MockObject */ - private $cloudFederationFactory; - - /** @var \PHPUnit\Framework\MockObject\MockObject|IGroupManager */ - private $groupManager; - - /** @var \PHPUnit\Framework\MockObject\MockObject|IUserManager */ - private $userManager; - - /** @var LoggerInterface */ - private $logger; - - private $uid; - - /** - * @var IUser - */ - private $user; - private $testMountProvider; - /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */ - private $eventDispatcher; + protected string $uid; + protected IUser $user; + protected MountProvider $testMountProvider; + protected IEventDispatcher&MockObject $eventDispatcher; + protected LoggerInterface&MockObject $logger; + protected \OC\Files\Mount\Manager $mountManager; + protected IManager&MockObject $contactsManager; + protected Manager&MockObject $manager; + protected IClientService&MockObject $clientService; + protected ICloudFederationProviderManager&MockObject $cloudFederationProviderManager; + protected ICloudFederationFactory&MockObject $cloudFederationFactory; + protected IGroupManager&MockObject $groupManager; + protected IUserManager&MockObject $userManager; protected function setUp(): void { parent::setUp(); @@ -169,7 +147,7 @@ class ManagerTest extends TestCase { $this->eventDispatcher, $this->logger, ] - )->setMethods(['tryOCMEndPoint'])->getMock(); + )->onlyMethods(['tryOCMEndPoint'])->getMock(); } private function setupMounts() { @@ -222,14 +200,12 @@ class ManagerTest extends TestCase { if ($isGroup) { $this->manager->expects($this->never())->method('tryOCMEndPoint'); } else { - $this->manager->method('tryOCMEndPoint') - ->withConsecutive( - ['http://localhost', 'token1', '2342', 'accept'], - ['http://localhost', 'token3', '2342', 'decline'], - )->willReturnOnConsecutiveCalls( - false, - false, - ); + $this->manager->expects(self::atLeast(2)) + ->method('tryOCMEndPoint') + ->willReturnMap([ + ['http://localhost', 'token1', '2342', 'accept', false], + ['http://localhost', 'token3', '2342', 'decline', false], + ]); } // Add a share for "user" diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index 285af51f022..4a1eb673a06 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -20,29 +20,21 @@ use OCP\IUserManager; use OCP\Share\IAttributes as IShareAttributes; use OCP\Share\IManager; use OCP\Share\IShare; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; /** * @group DB */ class MountProviderTest extends \Test\TestCase { - /** @var MountProvider */ - private $provider; - /** @var IConfig|MockObject */ - private $config; + protected MountProvider $provider; - /** @var IUser|MockObject */ - private $user; - - /** @var IStorageFactory|MockObject */ - private $loader; - - /** @var IManager|MockObject */ - private $shareManager; - - /** @var LoggerInterface|MockObject */ - private $logger; + protected IUser&MockObject $user; + protected IConfig&MockObject $config; + protected IManager&MockObject $shareManager; + protected IStorageFactory&MockObject $loader; + protected LoggerInterface&MockObject $logger; protected function setUp(): void { parent::setUp(); @@ -144,38 +136,34 @@ class MountProviderTest extends \Test\TestCase { ]; // tests regarding circles and sciencemesh are made in the apps themselves. $circleShares = []; - $sciencemeshShares = []; + $scienceMeshShares = []; $this->user->expects($this->any()) ->method('getUID') ->willReturn('user1'); $this->shareManager->expects($this->exactly(6)) ->method('getSharedWith') - ->withConsecutive( - ['user1', IShare::TYPE_USER], - ['user1', IShare::TYPE_GROUP, null, -1], - ['user1', IShare::TYPE_CIRCLE, null, -1], - ['user1', IShare::TYPE_ROOM, null, -1], - ['user1', IShare::TYPE_DECK, null, -1], - ['user1', IShare::TYPE_SCIENCEMESH, null, -1], - )->willReturnOnConsecutiveCalls( - $userShares, - $groupShares, - $circleShares, - $roomShares, - $deckShares, - $sciencemeshShares - ); + ->willReturnMap([ + ['user1', IShare::TYPE_USER, null, -1, 0, $userShares], + ['user1', IShare::TYPE_GROUP, null, -1, 0, $groupShares], + ['user1', IShare::TYPE_CIRCLE, null, -1, 0, $circleShares], + ['user1', IShare::TYPE_ROOM, null, -1, 0, $roomShares], + ['user1', IShare::TYPE_DECK, null, -1, 0, $deckShares], + ['user1', IShare::TYPE_SCIENCEMESH, null, -1, 0, $scienceMeshShares], + ]); + $this->shareManager->expects($this->any()) ->method('newShare') ->willReturnCallback(function () use ($rootFolder, $userManager) { return new Share($rootFolder, $userManager); }); + $mounts = $this->provider->getMountsForUser($this->user, $this->loader); $this->assertCount(4, $mounts); $this->assertInstanceOf('OCA\Files_Sharing\SharedMount', $mounts[0]); $this->assertInstanceOf('OCA\Files_Sharing\SharedMount', $mounts[1]); $this->assertInstanceOf('OCA\Files_Sharing\SharedMount', $mounts[2]); $this->assertInstanceOf('OCA\Files_Sharing\SharedMount', $mounts[3]); + /** @var OCA\Files_Sharing\SharedMount[] $mounts */ $mountedShare1 = $mounts[0]->getShare(); $this->assertEquals('2', $mountedShare1->getId()); $this->assertEquals('user2', $mountedShare1->getShareOwner()); @@ -204,7 +192,7 @@ class MountProviderTest extends \Test\TestCase { $this->assertEquals(31, $mountedShare4->getPermissions()); } - public function mergeSharesDataProvider() { + public static function mergeSharesDataProvider(): array { // note: the user in the specs here is the shareOwner not recipient // the recipient is always "user1" return [ @@ -368,24 +356,18 @@ class MountProviderTest extends \Test\TestCase { $circleShares = []; $roomShares = []; $deckShares = []; - $sciencemeshShares = []; + $scienceMeshShares = []; $this->shareManager->expects($this->exactly(6)) ->method('getSharedWith') - ->withConsecutive( - ['user1', IShare::TYPE_USER], - ['user1', IShare::TYPE_GROUP, null, -1], - ['user1', IShare::TYPE_CIRCLE, null, -1], - ['user1', IShare::TYPE_ROOM, null, -1], - ['user1', IShare::TYPE_DECK, null, -1], - ['user1', IShare::TYPE_SCIENCEMESH, null, -1], - )->willReturnOnConsecutiveCalls( - $userShares, - $groupShares, - $circleShares, - $roomShares, - $deckShares, - $sciencemeshShares - ); + ->willReturnMap([ + ['user1', IShare::TYPE_USER, null, -1, 0, $userShares], + ['user1', IShare::TYPE_GROUP, null, -1, 0, $groupShares], + ['user1', IShare::TYPE_CIRCLE, null, -1, 0, $circleShares], + ['user1', IShare::TYPE_ROOM, null, -1, 0, $roomShares], + ['user1', IShare::TYPE_DECK, null, -1, 0, $deckShares], + ['user1', IShare::TYPE_SCIENCEMESH, null, -1, 0, $scienceMeshShares], + ]); + $this->shareManager->expects($this->any()) ->method('newShare') ->willReturnCallback(function () use ($rootFolder, $userManager) { @@ -407,6 +389,7 @@ class MountProviderTest extends \Test\TestCase { $this->assertInstanceOf('OCA\Files_Sharing\SharedMount', $mount); // supershare + /** @var OCA\Files_Sharing\SharedMount $mount */ $share = $mount->getShare(); $this->assertEquals($expectedShare[0], $share->getId()); |