From 330c578cdcb2b7b2a9ea186017348937080fb6ff Mon Sep 17 00:00:00 2001 From: Peiman Nourani Date: Fri, 19 Jan 2024 08:26:58 +0000 Subject: [PATCH 1/3] [4.x] make placeholders translatable --- resources/js/components/fieldtypes/bard/LinkToolbar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/components/fieldtypes/bard/LinkToolbar.vue b/resources/js/components/fieldtypes/bard/LinkToolbar.vue index 46b12e46ed..51dda0e6f7 100644 --- a/resources/js/components/fieldtypes/bard/LinkToolbar.vue +++ b/resources/js/components/fieldtypes/bard/LinkToolbar.vue @@ -28,7 +28,7 @@ type="text" ref="urlInput" class="input h-auto text-sm" - placeholder="URL" + :placeholder="__('URL')" @keydown.enter.prevent="commit" /> @@ -39,7 +39,7 @@ type="text" ref="mailtoInput" class="input h-auto text-sm" - placeholder="Email Address" + :placeholder="__('Email Address')" @keydown.enter.prevent="commit" /> From 9c350ea5ffe4e2ee4b16c139515e64ff34d1f49c Mon Sep 17 00:00:00 2001 From: Peiman Nourani Date: Fri, 2 Feb 2024 08:30:51 +0000 Subject: [PATCH 2/3] [4.x] enable using any lang key for displays --- resources/js/components/Breadcrumb.vue | 2 +- resources/js/components/ResourceDeleter.vue | 2 +- resources/js/components/SiteSelector.vue | 2 +- .../js/components/assets/Browser/Browser.vue | 2 +- .../js/components/blueprints/LinkFields.vue | 6 +++--- .../js/components/blueprints/Listing.vue | 2 +- .../js/components/blueprints/RegularField.vue | 2 +- .../js/components/blueprints/Section.vue | 2 +- resources/js/components/blueprints/Tab.vue | 2 +- .../collections/OneOrManySitesField.vue | 2 +- resources/js/components/collections/View.vue | 2 +- .../js/components/data-list/ColumnPicker.vue | 4 ++-- .../js/components/data-list/DefaultField.vue | 2 +- resources/js/components/data-list/Table.vue | 2 +- .../js/components/entries/PublishForm.vue | 6 +++--- .../components/field-validation/Builder.vue | 2 +- resources/js/components/fields/Settings.vue | 2 +- .../js/components/fieldsets/EditForm.vue | 2 +- .../components/fieldsets/FieldsetDeleter.vue | 2 +- resources/js/components/fieldsets/Listing.vue | 2 +- resources/js/components/globals/Sites.vue | 4 ++-- resources/js/components/inputs/Text.vue | 2 +- .../components/inputs/relationship/Item.vue | 6 +++--- .../inputs/relationship/SelectField.vue | 4 ++-- resources/js/components/nav/Builder.vue | 4 ++-- .../js/components/navigation/Listing.vue | 2 +- resources/js/components/roles/Listing.vue | 2 +- resources/js/components/roles/PublishForm.vue | 2 +- resources/js/components/structures/Branch.vue | 2 +- resources/js/components/terms/PublishForm.vue | 2 +- .../js/components/user-groups/Listing.vue | 2 +- resources/js/components/users/Listing.vue | 4 ++-- resources/views/blueprints/index.blade.php | 20 +++++++++---------- resources/views/collections/empty.blade.php | 2 +- .../views/forms/blueprints/edit.blade.php | 2 +- resources/views/forms/show.blade.php | 2 +- resources/views/partials/breadcrumb.blade.php | 2 +- resources/views/taxonomies/empty.blade.php | 2 +- resources/views/taxonomies/show.blade.php | 2 +- resources/views/usergroups/show.blade.php | 2 +- resources/views/utilities/cache.blade.php | 2 +- src/Auth/CorePermissions.php | 14 ++++++------- src/Fieldtypes/UserRoles.php | 4 ++-- src/Forms/Fieldtype.php | 4 ++-- .../Controllers/CP/Forms/FormsController.php | 4 ++-- .../CP/Preferences/Nav/RoleNavController.php | 2 +- .../Controllers/CP/Users/RolesController.php | 2 +- 47 files changed, 76 insertions(+), 76 deletions(-) diff --git a/resources/js/components/Breadcrumb.vue b/resources/js/components/Breadcrumb.vue index 9b85eafbd4..56e6d13119 100644 --- a/resources/js/components/Breadcrumb.vue +++ b/resources/js/components/Breadcrumb.vue @@ -2,7 +2,7 @@ diff --git a/resources/js/components/ResourceDeleter.vue b/resources/js/components/ResourceDeleter.vue index ce8049b28b..76e7fe1845 100644 --- a/resources/js/components/ResourceDeleter.vue +++ b/resources/js/components/ResourceDeleter.vue @@ -45,7 +45,7 @@ export default { }, modalTitle() { - return __('Delete :resource', {resource: this.title}); + return __('Delete :resource', {resource: __(this.title)}); }, modalBody() { diff --git a/resources/js/components/SiteSelector.vue b/resources/js/components/SiteSelector.vue index c999529f9f..163685c202 100644 --- a/resources/js/components/SiteSelector.vue +++ b/resources/js/components/SiteSelector.vue @@ -5,7 +5,7 @@ :value="site" :clearable="false" :searchable="false" - :get-option-label="site => site.name" + :get-option-label="site => __(site.name)" :options="sites" @input="$emit('input', $event)" /> diff --git a/resources/js/components/assets/Browser/Browser.vue b/resources/js/components/assets/Browser/Browser.vue index f26158c5dc..5226089cf7 100644 --- a/resources/js/components/assets/Browser/Browser.vue +++ b/resources/js/components/assets/Browser/Browser.vue @@ -23,7 +23,7 @@