Skip to content

Commit

Permalink
fix(wording): rename 'guest app' to 'Guests app'
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Oct 12, 2023
1 parent 8119b20 commit 01f0056
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ See [OCP\RichObjectStrings\Definitions](https://github.com/nextcloud/server/blob
* `read_only` - {actor} locked the conversation
* `listable_none` - {actor} limited the conversation to the current participants
* `listable_users` - {actor} opened the conversation accessible to registered users
* `listable_all` - {actor} opened the conversation accessible to registered and guest app users
* `listable_all` - {actor} opened the conversation accessible to registered users and users created with the Guests app
* `lobby_timer_reached` - The conversation is now open to everyone
* `lobby_none` - {actor} opened the conversation to everyone
* `lobby_non_moderators` - {actor} restricted the conversation to moderators
Expand Down
2 changes: 1 addition & 1 deletion docs/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

### Listable scope
* `0` Participants only
* `1` Regular users only, excluding guest app users
* `1` Regular users only, excluding users created with the Guests app
* `2` Everyone

### Webinar lobby states
Expand Down
6 changes: 3 additions & 3 deletions lib/Chat/Parser/SystemMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ public function parseMessage(Message $chatMessage): void {
$parsedMessage = $this->l->t('An administrator opened the conversation to registered users');
}
} elseif ($message === 'listable_all') {
$parsedMessage = $this->l->t('{actor} opened the conversation to registered and guest app users');
$parsedMessage = $this->l->t('{actor} opened the conversation to registered users and users created with the Guests app');
if ($currentUserIsActor) {
$parsedMessage = $this->l->t('You opened the conversation to registered and guest app users');
$parsedMessage = $this->l->t('You opened the conversation to registered users and users created with the Guests app');
} elseif ($cliIsActor) {
$parsedMessage = $this->l->t('An administrator opened the conversation to registered and guest app users');
$parsedMessage = $this->l->t('An administrator opened the conversation to registered users and users created with the Guests app');
}
} elseif ($message === 'lobby_timer_reached') {
$parsedMessage = $this->l->t('The conversation is now open to everyone');
Expand Down
3 changes: 1 addition & 2 deletions lib/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,7 @@ public function isValidParticipant(string $userId): bool {
}

/**
* Returns whether the given user id is a guest user from
* the guest app
* Returns whether the given user id is a user created with the Guests app
*
* @param string $userId user id to check
* @return bool true if the user is a guest, false otherwise
Expand Down
4 changes: 2 additions & 2 deletions lib/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ class Room {
public const LISTABLE_NONE = 0;

/**
* Searchable by all regular users and moderators, even when not joined, excluding users from the guest app
* Searchable by all regular users and moderators, even when not joined, excluding users created with the Guests app
*/
public const LISTABLE_USERS = 1;

/**
* Searchable by everyone, which includes guest users (from guest app), even when not joined
* Searchable by everyone, which includes users created with the Guests app, even when not joined
*/
public const LISTABLE_ALL = 2;

Expand Down
6 changes: 3 additions & 3 deletions src/components/ConversationSettings/ListableSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
:disabled="isListableLoading"
type="switch"
@update:checked="toggleListableGuests">
{{ t('spreed', 'Also open to guest app users') }}
{{ t('spreed', 'Also open to users created with the Guests app') }}
</NcCheckboxRadioSwitch>
</div>

Expand Down Expand Up @@ -97,7 +97,7 @@ export default {
summaryLabel() {
switch (this.listable) {
case CONVERSATION.LISTABLE.ALL:
return t('spreed', 'This conversation is open to registered and guest app users')
return t('spreed', 'This conversation is open to both registered users and users created with the Guests app')
case CONVERSATION.LISTABLE.USERS:
return t('spreed', 'This conversation is open to registered users')
case CONVERSATION.LISTABLE.NONE:
Expand Down Expand Up @@ -166,7 +166,7 @@ export default {
} else if (listable === CONVERSATION.LISTABLE.USERS) {
this.lastNotification = showSuccess(t('spreed', 'You opened the conversation to registered users'))
} else if (listable === CONVERSATION.LISTABLE.ALL) {
this.lastNotification = showSuccess(t('spreed', 'You opened the conversation to registered and guest app users'))
this.lastNotification = showSuccess(t('spreed', 'You opened the conversation to both registered users and users created with the Guests app'))
}
this.listable = listable
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ public function allowGuestAccountsCreation(): void {
$this->guestsAppWasEnabled = in_array('guests', $data['apps'], true);

if (!$this->guestsAppWasEnabled) {
// enable guests app
// enable Guests app
/*
$this->sendRequest('POST', '/cloud/apps/guests');
$this->assertStatusCode($this->response, 200);
Expand Down Expand Up @@ -3070,7 +3070,7 @@ public function resetSpreedAppData() {
*/
public function resetGuestsAppState() {
if ($this->guestsAppWasEnabled === null) {
// guests app was not touched
// Guests app was not touched
return;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/php/Chat/Parser/SystemMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@ public static function dataParseMessage(): array {
['actor' => ['id' => 'actor', 'type' => 'user']],
],
['listable_all', [], 'recipient',
'{actor} opened the conversation to registered and guest app users',
'{actor} opened the conversation to registered users and users created with the Guests app',
['actor' => ['id' => 'actor', 'type' => 'user']],
],
['listable_all', [], 'actor',
'You opened the conversation to registered and guest app users',
'You opened the conversation to registered users and users created with the Guests app',
['actor' => ['id' => 'actor', 'type' => 'user']],
],
['object_shared', ['metaData' => ['id' => 'geo:52.5450511,13.3741463', 'type' => 'geo-location', 'name' => 'Nextcloud Berlin Office']], 'actor',
Expand Down

0 comments on commit 01f0056

Please sign in to comment.