|
35 | 35 | use OCP\Files\Folder; |
36 | 36 | use OCP\Files\IRootFolder; |
37 | 37 | use OCP\Files\NotFoundException; |
| 38 | +use OCP\IL10N; |
38 | 39 | use OCP\ITagManager; |
39 | 40 | use OCP\IUser; |
40 | 41 | use OCP\SystemTag\ISystemTagManager; |
@@ -66,18 +67,22 @@ class FilesMigrator implements IMigrator { |
66 | 67 |
|
67 | 68 | protected ICommentsManager $commentsManager; |
68 | 69 |
|
| 70 | + protected IL10N $l10n; |
| 71 | + |
69 | 72 | public function __construct( |
70 | 73 | IRootFolder $rootFolder, |
71 | 74 | ITagManager $tagManager, |
72 | 75 | ISystemTagManager $systemTagManager, |
73 | 76 | ISystemTagObjectMapper $systemTagMapper, |
74 | | - ICommentsManager $commentsManager |
| 77 | + ICommentsManager $commentsManager, |
| 78 | + IL10N $l10n |
75 | 79 | ) { |
76 | 80 | $this->root = $rootFolder; |
77 | 81 | $this->tagManager = $tagManager; |
78 | 82 | $this->systemTagManager = $systemTagManager; |
79 | 83 | $this->systemTagMapper = $systemTagMapper; |
80 | 84 | $this->commentsManager = $commentsManager; |
| 85 | + $this->l10n = $l10n; |
81 | 86 | } |
82 | 87 |
|
83 | 88 | /** |
@@ -266,4 +271,26 @@ public function import( |
266 | 271 | } |
267 | 272 | } |
268 | 273 | } |
| 274 | + |
| 275 | + /** |
| 276 | + * {@inheritDoc} |
| 277 | + */ |
| 278 | + public function getId(): string { |
| 279 | + return 'files'; |
| 280 | + } |
| 281 | + |
| 282 | + /** |
| 283 | + * {@inheritDoc} |
| 284 | + */ |
| 285 | + public function getDisplayName(): string { |
| 286 | + return $this->l10n->t('Files'); |
| 287 | + } |
| 288 | + |
| 289 | + /** |
| 290 | + * {@inheritDoc} |
| 291 | + */ |
| 292 | + public function getDescription(): string { |
| 293 | + // TODO handle migrator dependency resoluton as TrashbinMigrator is dependent on FilesMigrator |
| 294 | + return $this->l10n->t('Files including deleted files, versions, comments, collaborative tags, and favorites'); |
| 295 | + } |
269 | 296 | } |
0 commit comments