Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lang/en/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@
'never' => 'Never',
'organization' => 'Organization',
'person' => 'Person',
'test_redirect' => 'Test Redirect',
'enabled' => 'Enabled',
'active' => 'Active',
'inactive' => 'Inactive',
'recent_errors' => 'Recent Errors',
'no_errors_reported' => 'No errors have been reported.',
'view_all' => 'View All',
'create_a_redirect' => 'Create a Redirect',
'create_a_redirect_description' => 'Get started by creating your first redirect.',
'redirect' => 'Redirect',
'redirect_saved' => 'Redirect saved',
'source' => 'Source',
'destination' => 'Destination',
'response_code' => 'Response Code',
'description' => 'Description',
'hits' => 'Hits',
'last_hit_at' => 'Last Hit At',
'visit_url' => 'Visit URL',

'rules' => [
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/redirects/PublishForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const testRedirect = () => {

<template>
<Header :title="title" icon="moved">
<Button v-if="!isCreating" :text="__('Test Redirect')" :disabled="isDirty" @click="testRedirect" />
<Button v-if="!isCreating" :text="__('seo-pro::messages.test_redirect')" :disabled="isDirty" @click="testRedirect" />
<Button v-if="!readOnly" variant="primary" :text="__('Save')" :disabled="saving" @click="save" />
</Header>
<PublishContainer
Expand All @@ -104,7 +104,7 @@ const testRedirect = () => {
<PublishTabs>
<template #actions>
<Panel class="flex justify-between px-5! py-3! dark:bg-gray-800!">
<Heading :text="__('Enabled')" />
<Heading :text="__('seo-pro::messages.enabled')" />
<Switch
:model-value="values.enabled"
:disabled="readOnly"
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/redirects/StatusIndicator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const statusClass = computed(() => {

const label = computed(() => {
const labels = {
active: __('Active'),
inactive: __('Inactive'),
active: __('seo-pro::messages.active'),
inactive: __('seo-pro::messages.inactive'),
};
return labels[props.status];
});
Expand Down
6 changes: 3 additions & 3 deletions resources/js/components/widgets/RecentErrorsWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const props = defineProps({
});

const widgetProps = computed(() => ({
title: __('Recent Errors'),
title: __('seo-pro::messages.recent_errors'),
icon: 'warning-diamond',
href: props.errorsUrl,
}));
Expand Down Expand Up @@ -54,7 +54,7 @@ function formatDate(value) {
<template #default="{ items }">
<Widget v-bind="widgetProps">
<Description v-if="!items.length" class="flex-1 flex items-center justify-center">
{{ __('No errors have been reported.') }}
{{ __('seo-pro::messages.no_errors_reported') }}
</Description>
<div class="px-4 py-3">
<table class="w-full widget-table">
Expand All @@ -75,7 +75,7 @@ function formatDate(value) {
<template #actions>
<Pagination />
<Button :href="errorsUrl" size="sm">
{{ __('View All') }}
{{ __('seo-pro::messages.view_all') }}
</Button>
</template>
</Widget>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/pages/redirects/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const saved = (response) => {
</script>

<template>
<Head :title="__('Create Redirect')" />
<Head :title="__('seo-pro::messages.create_redirect')" />

<RedirectPublishForm
:title="__('Create Redirect')"
:title="__('seo-pro::messages.create_redirect')"
:blueprint
:initial-values="values"
:initial-meta="meta"
Expand Down
4 changes: 2 additions & 2 deletions resources/js/pages/redirects/Empty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defineProps({
<EmptyStateItem
:href="createUrl"
icon="moved"
:heading="__('Create a Redirect')"
:description="__('Get started by creating your first redirect.')"
:heading="__('seo-pro::messages.create_a_redirect')"
:description="__('seo-pro::messages.create_a_redirect_description')"
/>
</EmptyStateMenu>

Expand Down
2 changes: 1 addition & 1 deletion src/Events/RedirectSaved.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public function __construct(public Redirect $redirect) {}

public function commitMessage(): string
{
return __('Redirect saved', [], config('statamic.git.locale'));
return __('seo-pro::messages.redirect_saved', [], config('statamic.git.locale'));
}
}
6 changes: 3 additions & 3 deletions src/Redirects/ErrorBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __invoke(): FieldsBlueprint
'display' => __('General'),
'sections' => [
[
'display' => __('Redirect'),
'display' => __('seo-pro::messages.redirect'),
'fields' => [
[
'handle' => 'url',
Expand All @@ -29,7 +29,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'hits',
'field' => [
'type' => 'integer',
'display' => __('Hits'),
'display' => __('seo-pro::messages.hits'),
'default' => 0,
'listable' => true,
],
Expand All @@ -38,7 +38,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'last_hit_at',
'field' => [
'type' => 'date',
'display' => __('Last Hit At'),
'display' => __('seo-pro::messages.last_hit_at'),
'time_enabled' => true,
'listable' => true,
],
Expand Down
16 changes: 8 additions & 8 deletions src/Redirects/RedirectBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public function __invoke(): FieldsBlueprint
'display' => __('General'),
'sections' => [
[
'display' => __('Redirect'),
'display' => __('seo-pro::messages.redirect'),
'fields' => [
[
'handle' => 'source',
'field' => [
'type' => 'redirect_source',
'display' => __('Source'),
'display' => __('seo-pro::messages.source'),
'instructions' => __('seo-pro::messages.redirect_source'),
'validate' => ['required', new ValidRedirectUrl],
'listable' => true,
Expand All @@ -33,7 +33,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'destination',
'field' => [
'type' => 'link',
'display' => __('Destination'),
'display' => __('seo-pro::messages.destination'),
'instructions' => __('seo-pro::messages.redirect_destination'),
'validate' => ['required'],
'listable' => true,
Expand All @@ -43,7 +43,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'response_code',
'field' => [
'type' => 'select',
'display' => __('Response Code'),
'display' => __('seo-pro::messages.response_code'),
'instructions' => __('seo-pro::messages.redirect_response_code'),
'options' => [
301 => '301 - Moved Permanently',
Expand All @@ -60,7 +60,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'description',
'field' => [
'type' => 'textarea',
'display' => __('Description'),
'display' => __('seo-pro::messages.description'),
'instructions' => __('seo-pro::messages.redirect_description'),
'listable' => 'hidden',
],
Expand All @@ -69,7 +69,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'hits',
'field' => [
'type' => 'integer',
'display' => __('Hits'),
'display' => __('seo-pro::messages.hits'),
'default' => 0,
'listable' => true,
'read_only' => true,
Expand All @@ -80,7 +80,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'last_hit_at',
'field' => [
'type' => 'date',
'display' => __('Last Hit At'),
'display' => __('seo-pro::messages.last_hit_at'),
'time_enabled' => true,
'listable' => true,
'read_only' => true,
Expand All @@ -99,7 +99,7 @@ public function __invoke(): FieldsBlueprint
'handle' => 'enabled',
'field' => [
'type' => 'toggle',
'display' => __('Enabled'),
'display' => __('seo-pro::messages.enabled'),
'default' => true,
'listable' => false,
'visibility' => 'hidden',
Expand Down
Loading