Browse Source

chore(ui): Add a few missing translations (#40364)

Evan Purkhiser 2 years ago
parent
commit
1f11ca2702

+ 11 - 11
static/app/components/search/sources/commandSource.tsx

@@ -3,7 +3,7 @@ import {PlainRoute} from 'react-router';
 
 import {openHelpSearchModal, openSudo} from 'sentry/actionCreators/modal';
 import Access from 'sentry/components/acl/access';
-import {toggleLocaleDebug} from 'sentry/locale';
+import {t, toggleLocaleDebug} from 'sentry/locale';
 import ConfigStore from 'sentry/stores/configStore';
 import {createFuzzySearch, Fuse} from 'sentry/utils/fuzzySearch';
 
@@ -18,8 +18,8 @@ type Action = {
 
 const ACTIONS: Action[] = [
   {
-    title: 'Open Sudo Modal',
-    description: 'Open Sudo Modal to re-identify yourself.',
+    title: t('Open Sudo Modal'),
+    description: t('Open Sudo Modal to re-identify yourself.'),
     requiresSuperuser: false,
     action: () =>
       openSudo({
@@ -28,8 +28,8 @@ const ACTIONS: Action[] = [
   },
 
   {
-    title: 'Open Superuser Modal',
-    description: 'Open Superuser Modal to re-identify yourself.',
+    title: t('Open Superuser Modal'),
+    description: t('Open Superuser Modal to re-identify yourself.'),
     requiresSuperuser: true,
     action: () =>
       openSudo({
@@ -38,16 +38,16 @@ const ACTIONS: Action[] = [
   },
 
   {
-    title: 'Toggle dark mode',
-    description: 'Toggle dark mode (superuser only atm)',
+    title: t('Toggle dark mode'),
+    description: t('Toggle dark mode (superuser only atm)'),
     requiresSuperuser: true,
     action: () =>
       ConfigStore.set('theme', ConfigStore.get('theme') === 'dark' ? 'light' : 'dark'),
   },
 
   {
-    title: 'Toggle Translation Markers',
-    description: 'Toggles translation markers on or off in the application',
+    title: t('Toggle Translation Markers'),
+    description: t('Toggles translation markers on or off in the application'),
     requiresSuperuser: true,
     action: () => {
       toggleLocaleDebug();
@@ -56,8 +56,8 @@ const ACTIONS: Action[] = [
   },
 
   {
-    title: 'Search Documentation and FAQ',
-    description: 'Open the Documentation and FAQ search modal.',
+    title: t('Search Documentation and FAQ'),
+    description: t('Open the Documentation and FAQ search modal.'),
     requiresSuperuser: false,
     action: () => {
       openHelpSearchModal();

+ 7 - 7
static/app/data/forms/accountPassword.tsx

@@ -1,4 +1,5 @@
 import {JsonFormObject} from 'sentry/components/forms/types';
+import {t} from 'sentry/locale';
 
 const getUserIsNotManaged = ({user}) => !user.isManaged;
 
@@ -11,9 +12,9 @@ const formGroups: JsonFormObject[] = [
         name: 'password',
         type: 'secret',
         autoComplete: 'current-password',
-        label: 'Current Password',
+        label: t('Current Password'),
+        help: t('Your current password'),
         placeholder: '',
-        help: 'Your current password',
         visible: getUserIsNotManaged,
         required: true,
       },
@@ -21,9 +22,8 @@ const formGroups: JsonFormObject[] = [
         name: 'passwordNew',
         type: 'secret',
         autoComplete: 'new-password',
-        label: 'New Password',
+        label: t('New Password'),
         placeholder: '',
-        help: '',
         required: true,
         visible: getUserIsNotManaged,
         validate: ({id, form}) => (form[id] !== form.passwordVerify ? [[id, '']] : []),
@@ -32,15 +32,15 @@ const formGroups: JsonFormObject[] = [
         name: 'passwordVerify',
         type: 'secret',
         autoComplete: 'new-password',
-        label: 'Verify New Password',
+        label: t('Verify New Password'),
+        help: t('Verify your new password'),
         placeholder: '',
-        help: 'Verify your new password',
         required: true,
         visible: getUserIsNotManaged,
         validate: ({id, form}) => {
           // If password is set, and passwords don't match, then return an error
           if (form.passwordNew && form.passwordNew !== form[id]) {
-            return [[id, 'Passwords do not match']];
+            return [[id, t('Passwords do not match')]];
           }
 
           return [];