diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-10-05 14:02:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-05 14:02:35 +0200 |
commit | 088dd716a371fff12f637a35680ba991bab5236f (patch) | |
tree | 37fe3ae99acbc4a36286219c3996a5e9be17925d | |
parent | 3f48cb8bfbca0be60ba228e9224e558839dbc0fc (diff) | |
parent | de81c52c807fa9942d3bec55866096ba66cfb7d6 (diff) | |
download | nextcloud-server-088dd716a371fff12f637a35680ba991bab5236f.tar.gz nextcloud-server-088dd716a371fff12f637a35680ba991bab5236f.zip |
Merge pull request #1418 from nextcloud/add-move-rename-support
Add support for translations of move/rename activities
-rw-r--r-- | apps/files/lib/Activity.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/apps/files/lib/Activity.php b/apps/files/lib/Activity.php index a5277a6c18b..5fc59f119e1 100644 --- a/apps/files/lib/Activity.php +++ b/apps/files/lib/Activity.php @@ -104,7 +104,7 @@ class Activity implements IExtension { $l = $this->getL10N($languageCode); return [ self::TYPE_SHARE_CREATED => (string) $l->t('A new file or folder has been <strong>created</strong>'), - self::TYPE_SHARE_CHANGED => (string) $l->t('A file or folder has been <strong>changed</strong>'), + self::TYPE_SHARE_CHANGED => (string) $l->t('A file or folder has been <strong>changed</strong> or <strong>renamed</strong>'), self::TYPE_FAVORITES => [ 'desc' => (string) $l->t('Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>'), 'methods' => [self::METHOD_STREAM], @@ -189,6 +189,14 @@ class Activity implements IExtension { return (string) $l->t('You restored %1$s', $params); case 'restored_by': return (string) $l->t('%2$s restored %1$s', $params); + case 'renamed_self': + return (string) $l->t('You renamed %2$s to %1$s', $params); + case 'renamed_by': + return (string) $l->t('%2$s renamed %3$s to %1$s', $params); + case 'moved_self': + return (string) $l->t('You moved %2$s to %1$s', $params); + case 'moved_by': + return (string) $l->t('%2$s moved %3$s to %1$s', $params); default: return false; @@ -209,6 +217,10 @@ class Activity implements IExtension { return (string) $l->t('Deleted by %2$s', $params); case 'restored_by': return (string) $l->t('Restored by %2$s', $params); + case 'renamed_by': + return (string) $l->t('Renamed by %2$s', $params); + case 'moved_by': + return (string) $l->t('Moved by %2$s', $params); default: return false; @@ -242,6 +254,19 @@ class Activity implements IExtension { 0 => 'file', 1 => 'username', ]; + case 'renamed_self': + case 'moved_self': + return [ + 0 => 'file', + 1 => 'file', + ]; + case 'renamed_by': + case 'moved_by': + return [ + 0 => 'file', + 1 => 'username', + 2 => 'file', + ]; } } |