Skip to content

Commit b07b70b

Browse files
[5.x] User Groups Fieldtype: Group name should be translatable (#11343)
1 parent 2b490c1 commit b07b70b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Fieldtypes/UserGroups.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected function toItemArray($id, $site = null)
1717
{
1818
if ($group = UserGroup::find($id)) {
1919
return [
20-
'title' => $group->title(),
20+
'title' => __($group->title()),
2121
'id' => $group->handle(),
2222
];
2323
}
@@ -30,7 +30,7 @@ public function getIndexItems($request)
3030
return UserGroup::all()->sortBy('title')->map(function ($group) {
3131
return [
3232
'id' => $group->handle(),
33-
'title' => $group->title(),
33+
'title' => __($group->title()),
3434
];
3535
})->values();
3636
}

0 commit comments

Comments
 (0)