@can('edit', $taxonomy)
diff --git a/resources/views/usergroups/show.blade.php b/resources/views/usergroups/show.blade.php
index c0efed4f36..ecc2850ad2 100644
--- a/resources/views/usergroups/show.blade.php
+++ b/resources/views/usergroups/show.blade.php
@@ -10,7 +10,7 @@
'title' => __('User Groups')
])
-
{{ $group->title() }}
+ {{ __($group->title()) }}
@can('edit', $group)
diff --git a/src/Auth/CorePermissions.php b/src/Auth/CorePermissions.php
index 9637e1f20b..69f9d4e64f 100644
--- a/src/Auth/CorePermissions.php
+++ b/src/Auth/CorePermissions.php
@@ -77,7 +77,7 @@ protected function registerSites()
$this->register('access {site} site', function ($permission) {
$permission->replacements('site', function () {
return Site::all()->map(function ($site) {
- return ['value' => $site->handle(), 'label' => $site->name().' ('.$site->handle().')', 'handle' => $site->handle()];
+ return ['value' => $site->handle(), 'label' => __($site->name()).' ('.$site->handle().')', 'handle' => $site->handle()];
});
});
});
@@ -101,7 +101,7 @@ protected function registerCollections()
]),
])->replacements('collection', function () {
return Collection::all()->map(function ($collection) {
- return ['value' => $collection->handle(), 'label' => $collection->title()];
+ return ['value' => $collection->handle(), 'label' => __($collection->title())];
});
});
});
@@ -116,7 +116,7 @@ protected function registerNavigation()
$this->permission('edit {nav} nav'),
])->replacements('nav', function () {
return Nav::all()->map(function ($nav) {
- return ['value' => $nav->handle(), 'label' => $nav->title()];
+ return ['value' => $nav->handle(), 'label' => __($nav->title())];
});
});
});
@@ -129,7 +129,7 @@ protected function registerGlobals()
$this->register('edit {global} globals', function ($permission) {
$permission->replacements('global', function () {
return GlobalSet::all()->map(function ($global) {
- return ['value' => $global->handle(), 'label' => $global->title()];
+ return ['value' => $global->handle(), 'label' => __($global->title())];
});
});
});
@@ -147,7 +147,7 @@ protected function registerTaxonomies()
]),
])->replacements('taxonomy', function () {
return Taxonomy::all()->map(function ($taxonomy) {
- return ['value' => $taxonomy->handle(), 'label' => $taxonomy->title()];
+ return ['value' => $taxonomy->handle(), 'label' => __($taxonomy->title())];
});
});
});
@@ -167,7 +167,7 @@ protected function registerAssets()
]),
])->replacements('container', function () {
return AssetContainer::all()->map(function ($container) {
- return ['value' => $container->handle(), 'label' => $container->title()];
+ return ['value' => $container->handle(), 'label' => __($container->title())];
});
});
});
@@ -206,7 +206,7 @@ protected function registerForms()
$this->permission('delete {form} form submissions'),
])->replacements('form', function () {
return Form::all()->map(function ($form) {
- return ['value' => $form->handle(), 'label' => $form->title()];
+ return ['value' => $form->handle(), 'label' => __($form->title())];
});
});
});
diff --git a/src/Fieldtypes/UserRoles.php b/src/Fieldtypes/UserRoles.php
index e06423431c..f056fa3573 100644
--- a/src/Fieldtypes/UserRoles.php
+++ b/src/Fieldtypes/UserRoles.php
@@ -17,7 +17,7 @@ protected function toItemArray($id, $site = null)
{
if ($role = Role::find($id)) {
return [
- 'title' => $role->title(),
+ 'title' => __($role->title()),
'id' => $role->handle(),
];
}
@@ -42,7 +42,7 @@ public function getIndexItems($request)
return Role::all()->sortBy('title')->map(function ($role) {
return [
'id' => $role->handle(),
- 'title' => $role->title(),
+ 'title' => __($role->title()),
];
})->values();
}
diff --git a/src/Forms/Fieldtype.php b/src/Forms/Fieldtype.php
index 9fb8fe87e7..8ff9b21478 100644
--- a/src/Forms/Fieldtype.php
+++ b/src/Forms/Fieldtype.php
@@ -57,7 +57,7 @@ protected function toItemArray($id, $site = null)
{
if ($form = Facades\Form::find($id)) {
return [
- 'title' => $form->title(),
+ 'title' => __($form->title()),
'id' => $form->handle(),
];
}
@@ -85,7 +85,7 @@ public function getIndexItems($request)
$formFields = function ($form) {
return [
'id' => $form->handle(),
- 'title' => $form->title(),
+ 'title' => __($form->title()),
'submissions' => $form->submissions()->count(),
];
};
diff --git a/src/Http/Controllers/CP/Forms/FormsController.php b/src/Http/Controllers/CP/Forms/FormsController.php
index ea057f73e2..74497e1222 100644
--- a/src/Http/Controllers/CP/Forms/FormsController.php
+++ b/src/Http/Controllers/CP/Forms/FormsController.php
@@ -30,7 +30,7 @@ public function index(Request $request)
->map(function ($form) {
return [
'id' => $form->handle(),
- 'title' => $form->title(),
+ 'title' => __($form->title()),
'submissions' => $form->submissions()->count(),
'show_url' => $form->showUrl(),
'edit_url' => $form->editUrl(),
@@ -143,7 +143,7 @@ public function edit($form)
$values = [
'handle' => $form->handle(),
- 'title' => $form->title(),
+ 'title' => __($form->title()),
'honeypot' => $form->honeypot(),
'store' => $form->store(),
'email' => $form->email(),
diff --git a/src/Http/Controllers/CP/Preferences/Nav/RoleNavController.php b/src/Http/Controllers/CP/Preferences/Nav/RoleNavController.php
index ced54f5354..57806826a0 100644
--- a/src/Http/Controllers/CP/Preferences/Nav/RoleNavController.php
+++ b/src/Http/Controllers/CP/Preferences/Nav/RoleNavController.php
@@ -32,7 +32,7 @@ public function edit($handle)
: Nav::buildWithoutPreferences(true);
return $this->navBuilder($nav, [
- 'title' => $role->title(),
+ 'title' => __($role->title()),
'updateUrl' => cp_route('preferences.nav.role.update', $role->handle()),
'destroyUrl' => cp_route('preferences.nav.role.destroy', $role->handle()),
]);
diff --git a/src/Http/Controllers/CP/Users/RolesController.php b/src/Http/Controllers/CP/Users/RolesController.php
index 0fa5588e29..465a071a07 100644
--- a/src/Http/Controllers/CP/Users/RolesController.php
+++ b/src/Http/Controllers/CP/Users/RolesController.php
@@ -24,7 +24,7 @@ public function index(Request $request)
$roles = Role::all()->map(function ($role) {
return [
'id' => $role->handle(),
- 'title' => $role->title(),
+ 'title' => __($role->title()),
'handle' => $role->handle(),
'permissions' => $role->isSuper() ? __('Super User') : $role->permissions()->count(),
'edit_url' => $role->editUrl(),