]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Add succeeded action labels
authorStephan Müller <smueller@suse.com>
Tue, 28 May 2019 14:49:04 +0000 (16:49 +0200)
committerStephan Müller <smueller@suse.com>
Wed, 3 Jul 2019 12:13:28 +0000 (14:13 +0200)
Succeeded action labels can be used in order to show the right tense
for a succeeded action in a success notification.

Fixes: https://tracker.ceph.com/issues/36722
Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/constants/app.constants.ts

index 15bafc6c7da8afa66b3ee68f949203d3c3a548f5..b8762e15ac35456a991ad33311ea85b93afe8545 100644 (file)
@@ -131,3 +131,76 @@ export class ActionLabelsI18n {
     this.UNPROTECT = this.i18n('Unprotect');
   }
 }
+
+@Injectable({
+  providedIn: 'root'
+})
+export class SucceededActionLabelsI18n {
+  /* This service is required as the i18n polyfill does not provide static
+  translation
+  */
+  CREATED: string;
+  DELETED: string;
+  ADDED: string;
+  REMOVED: string;
+  EDITED: string;
+  CANCELED: string;
+  COPIED: string;
+  CLONED: string;
+  DEEP_SCRUBBED: string;
+  DESTROYED: string;
+  FLATTENED: string;
+  MARKED_DOWN: string;
+  MARKED_IN: string;
+  MARKED_LOST: string;
+  MARKED_OUT: string;
+  PROTECTED: string;
+  PURGED: string;
+  RENAMED: string;
+  RESTORED: string;
+  REWEIGHTED: string;
+  ROLLED_BACK: string;
+  SCRUBBED: string;
+  SHOWED: string;
+  TRASHED: string;
+  UNPROTECTED: string;
+
+  constructor(private i18n: I18n) {
+    /* Create a new item */
+    this.CREATED = this.i18n('Created');
+
+    /* Destroy an existing item */
+    this.DELETED = this.i18n('Deleted');
+
+    /* Add an existing item to a container */
+    this.ADDED = this.i18n('Added');
+
+    /* Remove an item from a container WITHOUT deleting it */
+    this.REMOVED = this.i18n('Removed');
+
+    /* Make changes to an existing item */
+    this.EDITED = this.i18n('Edited');
+    this.CANCELED = this.i18n('Canceled');
+
+    /* Non-standard actions */
+    this.CLONED = this.i18n('Cloned');
+    this.COPIED = this.i18n('Copied');
+    this.DEEP_SCRUBBED = this.i18n('Deep Scrubbed');
+    this.DESTROYED = this.i18n('Destroyed');
+    this.FLATTENED = this.i18n('Flattened');
+    this.MARKED_DOWN = this.i18n('Marked Down');
+    this.MARKED_IN = this.i18n('Marked In');
+    this.MARKED_LOST = this.i18n('Marked Lost');
+    this.MARKED_OUT = this.i18n('Marked Out');
+    this.PROTECTED = this.i18n('Protected');
+    this.PURGED = this.i18n('Purged');
+    this.RENAMED = this.i18n('Renamed');
+    this.RESTORED = this.i18n('Restored');
+    this.REWEIGHTED = this.i18n('Reweighted');
+    this.ROLLED_BACK = this.i18n('Rolled back');
+    this.SCRUBBED = this.i18n('Scrubbed');
+    this.SHOWED = this.i18n('Showed');
+    this.TRASHED = this.i18n('Moved to Trash');
+    this.UNPROTECTED = this.i18n('Unprotected');
+  }
+}