Skip to content

Commit a1497c7

Browse files
authored
Merge pull request #29917 from nextcloud/fix/29768/l10n
2 parents c9a1937 + abecf59 commit a1497c7

7 files changed

Lines changed: 17 additions & 17 deletions

File tree

lib/private/Contacts/ContactsMenu/ContactsStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private function contactArrayToEntry(array $contact) {
334334
if (!empty($user)) {
335335
$account = $this->accountManager->getAccount($user);
336336
if ($this->isProfileEnabled($account)) {
337-
$entry->setProfileTitle($this->l10nFactory->get('core')->t('View profile'));
337+
$entry->setProfileTitle($this->l10nFactory->get('lib')->t('View profile'));
338338
$entry->setProfileUrl($this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId]));
339339
}
340340
}

lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function process(IEntry $entry) {
8181
$account = $this->accountManager->getAccount($targetUser);
8282
if ($this->isProfileEnabled($account)) {
8383
$iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/profile.svg'));
84-
$profileActionText = $this->l10nFactory->get('core')->t('View profile');
84+
$profileActionText = $this->l10nFactory->get('lib')->t('View profile');
8585
$profileUrl = $this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId]);
8686
$action = $this->actionFactory->newLinkAction($iconUrl, $profileActionText, $profileUrl, 'profile');
8787
// Set highest priority (by descending order), other actions have the default priority 10 as defined in lib/private/Contacts/ContactsMenu/Actions/LinkAction.php

lib/private/Profile/Actions/EmailAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ public function getId(): string {
7070
}
7171

7272
public function getDisplayId(): string {
73-
return $this->l10nFactory->get('core')->t('Email');
73+
return $this->l10nFactory->get('lib')->t('Email');
7474
}
7575

7676
public function getTitle(): string {
77-
return $this->l10nFactory->get('core')->t('Mail %s', [$this->value]);
77+
return $this->l10nFactory->get('lib')->t('Mail %s', [$this->value]);
7878
}
7979

8080
public function getPriority(): int {

lib/private/Profile/Actions/PhoneAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ public function getId(): string {
7070
}
7171

7272
public function getDisplayId(): string {
73-
return $this->l10nFactory->get('core')->t('Phone');
73+
return $this->l10nFactory->get('lib')->t('Phone');
7474
}
7575

7676
public function getTitle(): string {
77-
return $this->l10nFactory->get('core')->t('Call %s', [$this->value]);
77+
return $this->l10nFactory->get('lib')->t('Call %s', [$this->value]);
7878
}
7979

8080
public function getPriority(): int {

lib/private/Profile/Actions/TwitterAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ public function getId(): string {
7171
}
7272

7373
public function getDisplayId(): string {
74-
return $this->l10nFactory->get('core')->t('Twitter');
74+
return $this->l10nFactory->get('lib')->t('Twitter');
7575
}
7676

7777
public function getTitle(): string {
7878
$displayUsername = $this->value[0] === '@' ? $this->value : '@' . $this->value;
79-
return $this->l10nFactory->get('core')->t('View %s on Twitter', [$displayUsername]);
79+
return $this->l10nFactory->get('lib')->t('View %s on Twitter', [$displayUsername]);
8080
}
8181

8282
public function getPriority(): int {

lib/private/Profile/Actions/WebsiteAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ public function getId(): string {
7070
}
7171

7272
public function getDisplayId(): string {
73-
return $this->l10nFactory->get('core')->t('Website');
73+
return $this->l10nFactory->get('lib')->t('Website');
7474
}
7575

7676
public function getTitle(): string {
77-
return $this->l10nFactory->get('core')->t('Visit %s', [$this->value]);
77+
return $this->l10nFactory->get('lib')->t('Visit %s', [$this->value]);
7878
}
7979

8080
public function getPriority(): int {

lib/private/Profile/ProfileManager.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -396,31 +396,31 @@ public function getProfileConfigWithMetadata(IUser $targetUser, ?IUser $visiting
396396
$propertiesMetadata = [
397397
IAccountManager::PROPERTY_ADDRESS => [
398398
'appId' => self::CORE_APP_ID,
399-
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Address'),
399+
'displayId' => $this->l10nFactory->get('lib')->t('Address'),
400400
],
401401
IAccountManager::PROPERTY_AVATAR => [
402402
'appId' => self::CORE_APP_ID,
403-
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Profile picture'),
403+
'displayId' => $this->l10nFactory->get('lib')->t('Profile picture'),
404404
],
405405
IAccountManager::PROPERTY_BIOGRAPHY => [
406406
'appId' => self::CORE_APP_ID,
407-
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('About'),
407+
'displayId' => $this->l10nFactory->get('lib')->t('About'),
408408
],
409409
IAccountManager::PROPERTY_DISPLAYNAME => [
410410
'appId' => self::CORE_APP_ID,
411-
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Full name'),
411+
'displayId' => $this->l10nFactory->get('lib')->t('Full name'),
412412
],
413413
IAccountManager::PROPERTY_HEADLINE => [
414414
'appId' => self::CORE_APP_ID,
415-
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Headline'),
415+
'displayId' => $this->l10nFactory->get('lib')->t('Headline'),
416416
],
417417
IAccountManager::PROPERTY_ORGANISATION => [
418418
'appId' => self::CORE_APP_ID,
419-
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Organisation'),
419+
'displayId' => $this->l10nFactory->get('lib')->t('Organisation'),
420420
],
421421
IAccountManager::PROPERTY_ROLE => [
422422
'appId' => self::CORE_APP_ID,
423-
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Role'),
423+
'displayId' => $this->l10nFactory->get('lib')->t('Role'),
424424
],
425425
];
426426

0 commit comments

Comments
 (0)