diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-15 14:59:54 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-10-05 10:06:59 +0200 |
commit | de81c52c807fa9942d3bec55866096ba66cfb7d6 (patch) | |
tree | 460d80c41ebced4345b781d7c28586d1935018c1 /apps/files/lib | |
parent | 66ae43880b7d898e54a47d3a4651684d85a1e951 (diff) | |
download | nextcloud-server-de81c52c807fa9942d3bec55866096ba66cfb7d6.tar.gz nextcloud-server-de81c52c807fa9942d3bec55866096ba66cfb7d6.zip |
Add support for translations of move/rename activities
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files/lib')
-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 b9cc98cf7ea..726ec3c1fe4 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', + ]; } } |