diff --git a/apps/files/src/components/DragAndDropNotice.vue b/apps/files/src/components/DragAndDropNotice.vue index 23ebf7cd296..bf9a318657f 100644 --- a/apps/files/src/components/DragAndDropNotice.vue +++ b/apps/files/src/components/DragAndDropNotice.vue @@ -85,7 +85,7 @@ export default defineComponent({ if (this.isQuotaExceeded) { return this.t('files', 'Your have used your space quota and cannot upload files anymore') } else if (!this.canUpload) { - return this.t('files', 'You don’t have permission to upload or create files here') + return this.t('files', 'You don\'t have permission to upload or create files here.') } return null }, diff --git a/apps/files/src/components/FilesListTableHeaderActions.vue b/apps/files/src/components/FilesListTableHeaderActions.vue index 8b9feec637a..23dd2f37ef3 100644 --- a/apps/files/src/components/FilesListTableHeaderActions.vue +++ b/apps/files/src/components/FilesListTableHeaderActions.vue @@ -300,7 +300,7 @@ export default defineComponent({ return } - showError(this.t('files', '"{displayName}" failed on some elements ', { displayName })) + showError(this.t('files', '"{displayName}" failed on some elements', { displayName })) return } diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 812521330b9..10073b69d37 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -189,7 +189,7 @@ export default defineComponent({ caption() { const defaultCaption = t('files', 'List of files and folders.') const viewCaption = this.currentView.caption || defaultCaption - const cantUploadCaption = this.cantUpload ? t('files', 'You don’t have permission to upload or create files here.') : null + const cantUploadCaption = this.cantUpload ? t('files', 'You don\'t have permission to upload or create files here.') : null const quotaExceededCaption = this.isQuotaExceeded ? t('files', 'You have used your space quota and cannot upload files anymore.') : null const sortableCaption = t('files', 'Column headers with buttons are sortable.') const virtualListNote = t('files', 'This list is not fully rendered for performance reasons. The files will be rendered as you navigate through the list.') diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 3dbcf5ae348..bc537f5fee7 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -13,7 +13,7 @@
l10n->t('Admin IP filtering isn’t applied.')); + return SetupResult::success($this->l10n->t('Admin IP filtering isn\'t applied.')); } if (!is_array($allowedAdminRanges)) { diff --git a/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php b/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php index 9854a039dd1..97e80c2aaa9 100644 --- a/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php +++ b/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php @@ -85,7 +85,7 @@ class DatabaseHasMissingIndices implements ISetupCheck { } } return SetupResult::warning( - $this->l10n->t('Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them. ') . $list . '.', + $this->l10n->t('Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them.') . "\n" . $list, $this->urlGenerator->linkToDocs('admin-long-running-migration-steps') ); } diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index d6a12c83123..7d0665ca630 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -426,7 +426,7 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider $initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; $initiatorEmailAddress = ($initiatorUser instanceof IUser) ? $initiatorUser->getEMailAddress() : null; - $plainBodyPart = $this->l->t("%1\$s shared %2\$s with you.\nYou should have already received a separate mail with a link to access it.\n", [$initiatorDisplayName, $filename]); + $plainBodyPart = $this->l->t('%1$s shared %2$s with you. You should have already received a separate mail with a link to access it.', [$initiatorDisplayName, $filename]); $htmlBodyPart = $this->l->t('%1$s shared %2$s with you. You should have already received a separate mail with a link to access it.', [$initiatorDisplayName, $filename]); $message = $this->mailer->createMessage(); diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 88d34297bbd..8db35602b2f 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -342,7 +342,7 @@ class Access extends LDAPUtility { return @$this->invokeLDAPMethod('exopPasswd', $userDN, '', $password) || @$this->invokeLDAPMethod('modReplace', $userDN, $password); } catch (ConstraintViolationException $e) { - throw new HintException('Password change rejected.', Util::getL10N('user_ldap')->t('Password change rejected. Hint: ') . $e->getMessage(), (int)$e->getCode()); + throw new HintException('Password change rejected.', Util::getL10N('user_ldap')->t('Password change rejected. Hint: %s', $e->getMessage()), (int)$e->getCode()); } } diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index 31f6d1cd79d..d23a8d30070 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -59,7 +59,7 @@ class Install extends Command { // ignore the OS X setup warning if (count($errors) !== 1 || - (string)$errors[0]['error'] !== 'Mac OS X is not supported and Nextcloud will not work properly on this platform. Use it at your own risk! ') { + (string)$errors[0]['error'] !== 'Mac OS X is not supported and Nextcloud will not work properly on this platform. Use it at your own risk!') { return 1; } } diff --git a/dist/files-main.js b/dist/files-main.js index 4c835cdf6ba..42b6a828d31 100644 --- a/dist/files-main.js +++ b/dist/files-main.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e,s,n,i={2748:(e,s,n)=>{var i=n(21777),a=n(65899),r=n(85471);const o=()=>(window._nc_files_pinia||(window._nc_files_pinia=(0,a.Ey)()),window._nc_files_pinia);var l=n(43627),d=n(94205),c=n(32981),m=n(35810),u=n(85168),g=n(53334),f=n(49264),p=n(5655);const h=(0,n(35947).YK)().setApp("files").detectUser().build();var v=n(61338),w=n(87485),A=n(65043);const b=()=>!0===(0,w.F)()?.files?.undelete,C=e=>e.every((e=>!0===e.attributes["is-mount-root"]&&"shared"===e.attributes["mount-type"])),y=e=>e.every((e=>!0===e.attributes["is-mount-root"]&&"external"===e.attributes["mount-type"])),x=(e,t)=>C(e)?1===e.length?(0,g.t)("files","Leave this share"):(0,g.t)("files","Leave these shares"):y(e)?1===e.length?(0,g.t)("files","Disconnect storage"):(0,g.t)("files","Disconnect storages"):"trashbin"!==t.id&&b()?(e=>{if(1===e.length)return!1;const t=e.some((e=>C([e]))),s=e.some((e=>!C([e])));return t&&s})(e)?(0,g.t)("files","Delete and unshare"):(e=>!e.some((e=>e.type!==m.pt.File)))(e)?1===e.length?(0,g.t)("files","Delete file"):(0,g.t)("files","Delete files"):(e=>!e.some((e=>e.type!==m.pt.Folder)))(e)?1===e.length?(0,g.t)("files","Delete folder"):(0,g.t)("files","Delete folders"):(0,g.t)("files","Delete"):(0,g.t)("files","Delete permanently"),k=async(e,t)=>{const s="trashbin"!==t.id&&b()?(0,g.n)("files","You are about to delete {count} item","You are about to delete {count} items",e.length,{count:e.length}):(0,g.n)("files","You are about to permanently delete {count} item","You are about to permanently delete {count} items",e.length,{count:e.length});return new Promise((n=>{window.OC.dialogs.confirmDestructive(s,(0,g.t)("files","Confirm deletion"),{type:window.OC.dialogs.YES_NO_BUTTONS,confirm:x(e,t),confirmClasses:"error",cancel:(0,g.t)("files","Cancel")},(e=>{n(e)}))}))},_=async e=>{await A.Ay.delete(e.encodedSource),(0,v.Ic)("files:node:deleted",e)},T=new f.A({concurrency:5}),S=new m.hY({id:"delete",displayName:x,iconSvgInline:e=>C(e)?p:y(e)?'':'',enabled:e=>!!(0,c.C)("files_trashbin","config").allow_delete&&e.length>0&&e.map((e=>e.permissions)).every((e=>!!(e&m.aX.DELETE))),async exec(e,t){try{let s=!0;const n=((new Error).stack||"").toLocaleLowerCase().includes("keydown");return b()&&!n||(s=await k([e],t)),!1===s?((0,u.cf)((0,g.Tl)("files","Deletion cancelled")),null):(await _(e),!0)}catch(t){return h.error("Error while deleting a file",{error:t,source:e.source,node:e}),!1}},async execBatch(e,t){let s=!0;if(b()?e.length>=5&&!C(e)&&!y(e)&&(s=await k(e,t)):s=await k(e,t),!1===s)return(0,u.cf)((0,g.Tl)("files","Deletion cancelled")),Promise.all(e.map((()=>null)));const n=e.map((e=>new Promise((t=>{T.add((async()=>{try{await _(e),t(!0)}catch(s){h.error("Error while deleting a file",{error:s,source:e.source,node:e}),t(!1)}}))}))));return Promise.all(n)},order:100});var L=n(71225),N=n(63814),F=n(82680),E=n(63006),U=n(11459);const I=new f.A({concurrency:5}),P=e=>e.some((e=>1!==e.attributes.favorite)),z=async(e,t,s)=>{try{const n=(0,N.Jv)("/apps/files/api/v1/files")+(0,L.O0)(e.path);return await A.Ay.post(n,{tags:s?[window.OC.TAG_FAVORITE]:[]}),"favorites"!==t.id||s||"/"!==e.dirname||(0,v.Ic)("files:node:deleted",e),r.Ay.set(e.attributes,"favorite",s?1:0),s?(0,v.Ic)("files:favorites:added",e):(0,v.Ic)("files:favorites:removed",e),!0}catch(t){const n=s?"adding a file to favourites":"removing a file from favourites";return h.error("Error while "+n,{error:t,source:e.source,node:e}),!1}},B=new m.hY({id:"favorite",displayName:e=>P(e)?(0,g.Tl)("files","Add to favorites"):(0,g.Tl)("files","Remove from favorites"),iconSvgInline:e=>P(e)?E:U,enabled:e=>!(0,F.f)()&&e.every((e=>e.root?.startsWith?.("/files")))&&e.every((e=>e.permissions!==m.aX.NONE)),async exec(e,t){const s=P([e]);return await z(e,t,s)},async execBatch(e,t){const s=P(e),n=e.map((e=>new Promise((n=>{I.add((async()=>{try{await z(e,t,s),n(!0)}catch(t){h.error("Error while adding file to favorite",{error:t,source:e.source,node:e}),n(!1)}}))}))));return Promise.all(n)},order:-50});var D=n(19664);const O=new m.hY({id:"rename",displayName:()=>(0,g.Tl)("files","Rename"),iconSvgInline:()=>D,enabled:(e,t)=>0!==e.length&&"public-file-share"!==t.id&&e.every((e=>Boolean(e.permissions&m.aX.DELETE))),exec:async e=>((0,v.Ic)("files:node:rename",e),null),order:10});var R=n(49981);const j=new m.hY({id:"details",displayName:()=>(0,g.Tl)("files","Open details"),iconSvgInline:()=>R,enabled:e=>!(0,F.f)()&&1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==m.aX.NONE)??!1),async exec(e,t,s){try{return window.OCA.Files.Sidebar.file===e.path?(h.debug("Sidebar already open for this file",{node:e}),null):(window.OCA.Files.Sidebar.setActiveTab("sharing"),await window.OCA.Files.Sidebar.open(e.path),window.OCP?.Files?.Router?.goToRoute(null,{view:t.id,fileid:String(e.fileid)},{...window.OCP.Files.Router.query,dir:s,opendetails:"true"},!0),null)}catch(e){return h.error("Error while opening sidebar",{error:e}),!1}},order:-50}),M=function(){const e=(0,a.nY)("active",{state:()=>({_initialized:!1,activeNode:null,activeView:null,activeAction:null}),actions:{setActiveNode(e){if(!e)throw new Error("Use clearActiveNode to clear the active node");h.debug("Setting active node",{node:e}),this.activeNode=e},clearActiveNode(){this.activeNode=null},onDeletedNode(e){this.activeNode&&this.activeNode.source===e.source&&this.clearActiveNode()},setActiveAction(e){this.activeAction=e},clearActiveAction(){this.activeAction=null},onChangedView(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;h.debug("Setting active view",{view:e}),this.activeView=e,this.clearActiveNode()}}}),t=e(...arguments),s=(0,m.bh)();return t._initialized||((0,v.B1)("files:node:deleted",t.onDeletedNode),t._initialized=!0,t.onChangedView(s.active),s.addEventListener("updateActive",(e=>{t.onChangedView(e.detail)}))),t},V=async e=>{const t=M(o()),s=window?.OCP?.Files?.Router?.query?.dir||"/",n=t.activeNode,i=t.activeView;if(!n||!i)return void h.error("No active node or view",{node:n,view:i});if(n.status===m.zI.LOADING)return void h.debug("Node is already loading",{node:n});if(!e.enabled([n],i))return void h.debug("Action is not not available for the current context",{action:e,node:n,view:i});let a=e.id;try{a=e.displayName([n],i)}catch(t){h.error("Error while getting action display name",{action:e,error:t})}try{r.Ay.set(n,"status",m.zI.LOADING),t.setActiveAction(e);const o=await e.exec(n,i,s);if(null==o)return;if(o)return void(0,u.Te)((0,g.t)("files",'"{displayName}" action executed successfully',{displayName:a}));(0,u.Qg)((0,g.t)("files",'"{displayName}" action failed',{displayName:a}))}catch(t){h.error("Error while executing action",{action:e,error:t}),(0,u.Qg)((0,g.t)("files",'"{displayName}" action failed',{displayName:a}))}finally{r.Ay.set(n,"status",void 0),t.clearActiveAction()}},$=(0,c.C)("files","config",{show_hidden:!1,crop_image_previews:!0,sort_favorites_first:!0,sort_folders_first:!0,grid_view:!1}),W=(0,a.nY)("userconfig",(()=>{const e=(0,r.KR)({...$});return(0,v.B1)("files:config:updated",(t=>{let{key:s,value:n}=t;return function(t,s){(0,r.hZ)(e.value,t,s)}(s,n)})),{userConfig:e,update:async function(e,t){null!==(0,i.HW)()&&await A.Ay.put((0,N.Jv)("/apps/files/api/v1/config/{key}",{key:e}),{value:t}),(0,v.Ic)("files:config:updated",{key:e,value:t})}}}));var H=n(22378);const q={name:"CogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var G=n(14486);const Y=(0,G.A)(q,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon cog-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var K=n(42530),Q=n(52439),X=n(27345),J=n(74246);function Z(e,t,s){var n,i=s||{},a=i.noTrailing,r=void 0!==a&&a,o=i.noLeading,l=void 0!==o&&o,d=i.debounceMode,c=void 0===d?void 0:d,m=!1,u=0;function g(){n&&clearTimeout(n)}function f(){for(var s=arguments.length,i=new Array(s),a=0;a