Skip to content

Commit 959c687

Browse files
committed
fix: use the translated roles from editorRoles for the search tree
1 parent 398f38b commit 959c687

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/welcome/admin.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
isPro,
3030
v2disabledBlocks,
3131
defaultBreakpoints,
32+
editorRoles,
3233
} from 'stackable'
3334
import classnames from 'classnames'
3435
import { fetchSettings, importBlocks } from '~stackable/util/admin'
@@ -167,12 +168,7 @@ const SEARCH_TREE = [
167168
{
168169
id: 'role-manager',
169170
children: [
170-
__( 'Role Manager', i18n ),
171-
__( 'Administrator', i18n ),
172-
__( 'Editor', i18n ),
173-
__( 'Author', i18n ),
174-
__( 'Contributor', i18n ),
175-
__( 'Subscriber', i18n ),
171+
...Object.values( editorRoles ),
176172
],
177173
},
178174
],
@@ -185,11 +181,7 @@ const SEARCH_TREE = [
185181
id: 'custom-fields-settings',
186182
children: [
187183
__( 'Custom Fields', i18n ),
188-
__( 'Administrator', i18n ),
189-
__( 'Editor', i18n ),
190-
__( 'Author', i18n ),
191-
__( 'Contributor', i18n ),
192-
__( 'Subscriber', i18n ),
184+
...Object.values( editorRoles ),
193185
],
194186
},
195187
],

0 commit comments

Comments
 (0)