Fix source of translations

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/29917/head
Christopher Ng 4 years ago
parent 848e589923
commit abecf594d6
  1. 2
      lib/private/Contacts/ContactsMenu/ContactsStore.php
  2. 2
      lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php
  3. 4
      lib/private/Profile/Actions/EmailAction.php
  4. 4
      lib/private/Profile/Actions/PhoneAction.php
  5. 4
      lib/private/Profile/Actions/TwitterAction.php
  6. 4
      lib/private/Profile/Actions/WebsiteAction.php
  7. 14
      lib/private/Profile/ProfileManager.php

@ -334,7 +334,7 @@ class ContactsStore implements IContactsStore {
if (!empty($user)) {
$account = $this->accountManager->getAccount($user);
if ($this->isProfileEnabled($account)) {
$entry->setProfileTitle($this->l10nFactory->get('core')->t('View profile'));
$entry->setProfileTitle($this->l10nFactory->get('lib')->t('View profile'));
$entry->setProfileUrl($this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId]));
}
}

@ -81,7 +81,7 @@ class ProfileProvider implements IProvider {
$account = $this->accountManager->getAccount($targetUser);
if ($this->isProfileEnabled($account)) {
$iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/profile.svg'));
$profileActionText = $this->l10nFactory->get('core')->t('View profile');
$profileActionText = $this->l10nFactory->get('lib')->t('View profile');
$profileUrl = $this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId]);
$action = $this->actionFactory->newLinkAction($iconUrl, $profileActionText, $profileUrl, 'profile');
// Set highest priority (by descending order), other actions have the default priority 10 as defined in lib/private/Contacts/ContactsMenu/Actions/LinkAction.php

@ -70,11 +70,11 @@ class EmailAction implements ILinkAction {
}
public function getDisplayId(): string {
return $this->l10nFactory->get('core')->t('Email');
return $this->l10nFactory->get('lib')->t('Email');
}
public function getTitle(): string {
return $this->l10nFactory->get('core')->t('Mail %s', [$this->value]);
return $this->l10nFactory->get('lib')->t('Mail %s', [$this->value]);
}
public function getPriority(): int {

@ -70,11 +70,11 @@ class PhoneAction implements ILinkAction {
}
public function getDisplayId(): string {
return $this->l10nFactory->get('core')->t('Phone');
return $this->l10nFactory->get('lib')->t('Phone');
}
public function getTitle(): string {
return $this->l10nFactory->get('core')->t('Call %s', [$this->value]);
return $this->l10nFactory->get('lib')->t('Call %s', [$this->value]);
}
public function getPriority(): int {

@ -71,12 +71,12 @@ class TwitterAction implements ILinkAction {
}
public function getDisplayId(): string {
return $this->l10nFactory->get('core')->t('Twitter');
return $this->l10nFactory->get('lib')->t('Twitter');
}
public function getTitle(): string {
$displayUsername = $this->value[0] === '@' ? $this->value : '@' . $this->value;
return $this->l10nFactory->get('core')->t('View %s on Twitter', [$displayUsername]);
return $this->l10nFactory->get('lib')->t('View %s on Twitter', [$displayUsername]);
}
public function getPriority(): int {

@ -70,11 +70,11 @@ class WebsiteAction implements ILinkAction {
}
public function getDisplayId(): string {
return $this->l10nFactory->get('core')->t('Website');
return $this->l10nFactory->get('lib')->t('Website');
}
public function getTitle(): string {
return $this->l10nFactory->get('core')->t('Visit %s', [$this->value]);
return $this->l10nFactory->get('lib')->t('Visit %s', [$this->value]);
}
public function getPriority(): int {

@ -396,31 +396,31 @@ class ProfileManager {
$propertiesMetadata = [
IAccountManager::PROPERTY_ADDRESS => [
'appId' => self::CORE_APP_ID,
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Address'),
'displayId' => $this->l10nFactory->get('lib')->t('Address'),
],
IAccountManager::PROPERTY_AVATAR => [
'appId' => self::CORE_APP_ID,
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Profile picture'),
'displayId' => $this->l10nFactory->get('lib')->t('Profile picture'),
],
IAccountManager::PROPERTY_BIOGRAPHY => [
'appId' => self::CORE_APP_ID,
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('About'),
'displayId' => $this->l10nFactory->get('lib')->t('About'),
],
IAccountManager::PROPERTY_DISPLAYNAME => [
'appId' => self::CORE_APP_ID,
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Full name'),
'displayId' => $this->l10nFactory->get('lib')->t('Full name'),
],
IAccountManager::PROPERTY_HEADLINE => [
'appId' => self::CORE_APP_ID,
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Headline'),
'displayId' => $this->l10nFactory->get('lib')->t('Headline'),
],
IAccountManager::PROPERTY_ORGANISATION => [
'appId' => self::CORE_APP_ID,
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Organisation'),
'displayId' => $this->l10nFactory->get('lib')->t('Organisation'),
],
IAccountManager::PROPERTY_ROLE => [
'appId' => self::CORE_APP_ID,
'displayId' => $this->l10nFactory->get(self::CORE_APP_ID)->t('Role'),
'displayId' => $this->l10nFactory->get('lib')->t('Role'),
],
];

Loading…
Cancel
Save