From 04267f5deb2b3519e37919c52685a7dcf623e7c0 Mon Sep 17 00:00:00 2001
From: Paul Neubauer <paulneubauer@live.de>
Date: Thu, 28 Apr 2022 11:58:18 +0200
Subject: [PATCH] Resolve PR issues

---
 .../InviteCollaborator/InviteCollaboratorForm.vue          | 7 ++++++-
 .../src/components/SideBar/Shares/SpaceMembers.vue         | 2 +-
 .../SideBar/Shares/__snapshots__/SpaceMembers.spec.js.snap | 6 +++---
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue
index d85a0f2aad1..c207780300a 100644
--- a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue
+++ b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue
@@ -98,6 +98,11 @@ import {
   shareSpaceAddMemberHelp
 } from '../../../../../helpers/contextualHelpers.js'
 
+// just a dummy function to trick gettext tools
+const $gettext = (str) => {
+  return str
+}
+
 export default {
   name: 'InviteCollaboratorForm',
   components: {
@@ -110,7 +115,7 @@ export default {
     saveButtonLabel: {
       type: String,
       required: false,
-      default: () => this.$gettext('Share')
+      default: () => $gettext('Share')
     }
   },
 
diff --git a/packages/web-app-files/src/components/SideBar/Shares/SpaceMembers.vue b/packages/web-app-files/src/components/SideBar/Shares/SpaceMembers.vue
index 8b102ab3dd7..ec997355022 100644
--- a/packages/web-app-files/src/components/SideBar/Shares/SpaceMembers.vue
+++ b/packages/web-app-files/src/components/SideBar/Shares/SpaceMembers.vue
@@ -5,7 +5,7 @@
       <invite-collaborator-form
         v-if="currentUserCanShare"
         key="new-collaborator"
-        :saving-button-title="$gettext('Add')"
+        :save-button-label="$gettext('Add')"
         class="oc-my-s"
       />
       <template v-if="hasCollaborators">
diff --git a/packages/web-app-files/tests/unit/components/SideBar/Shares/__snapshots__/SpaceMembers.spec.js.snap b/packages/web-app-files/tests/unit/components/SideBar/Shares/__snapshots__/SpaceMembers.spec.js.snap
index 9f41ed9d8d1..3c3629624ab 100644
--- a/packages/web-app-files/tests/unit/components/SideBar/Shares/__snapshots__/SpaceMembers.spec.js.snap
+++ b/packages/web-app-files/tests/unit/components/SideBar/Shares/__snapshots__/SpaceMembers.spec.js.snap
@@ -13,7 +13,7 @@ exports[`SpaceMembers if currentUser can not share other shares are listed, but
 
 exports[`SpaceMembers if currentUser can share initially renders add people dialog 1`] = `
 <div id="oc-files-sharing-sidebar" class="oc-position-relative">
-  <invite-collaborator-form-stub savebuttonlabel="Share" saving-button-title="Add" class="oc-my-s"></invite-collaborator-form-stub>
+  <invite-collaborator-form-stub savebuttonlabel="Add" class="oc-my-s"></invite-collaborator-form-stub>
   <ul id="files-collaborators-list" aria-label="Space members" class="oc-list oc-list-divider oc-overflow-hidden oc-m-rm">
     <li>
       <collaborator-list-item-stub share="[object Object]"></collaborator-list-item-stub>
@@ -24,7 +24,7 @@ exports[`SpaceMembers if currentUser can share initially renders add people dial
 
 exports[`SpaceMembers if currentUser is manager allows role edit of the current user if another user is manager 1`] = `
 <div id="oc-files-sharing-sidebar" class="oc-position-relative">
-  <invite-collaborator-form-stub savebuttonlabel="Share" saving-button-title="Add" class="oc-my-s"></invite-collaborator-form-stub>
+  <invite-collaborator-form-stub savebuttonlabel="Add" class="oc-my-s"></invite-collaborator-form-stub>
   <ul id="files-collaborators-list" aria-label="Space members" class="oc-list oc-list-divider oc-overflow-hidden oc-m-rm">
     <li>
       <collaborator-list-item-stub share="[object Object]" modifiable="true"></collaborator-list-item-stub>
@@ -41,7 +41,7 @@ exports[`SpaceMembers if currentUser is manager allows role edit of the current
 
 exports[`SpaceMembers if currentUser is manager does not allow role edit of the current user if they are the only manager 1`] = `
 <div id="oc-files-sharing-sidebar" class="oc-position-relative">
-  <invite-collaborator-form-stub savebuttonlabel="Share" saving-button-title="Add" class="oc-my-s"></invite-collaborator-form-stub>
+  <invite-collaborator-form-stub savebuttonlabel="Add" class="oc-my-s"></invite-collaborator-form-stub>
   <ul id="files-collaborators-list" aria-label="Space members" class="oc-list oc-list-divider oc-overflow-hidden oc-m-rm">
     <li>
       <collaborator-list-item-stub share="[object Object]"></collaborator-list-item-stub>