Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Implement short translation keys #162

Merged
merged 19 commits into from
Jan 2, 2025
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4691eda
chore: load translations from PHP file, remove JSON file
danjohnson95 Jan 2, 2025
671ecf7
chore: support interpolated translations on support block
danjohnson95 Jan 2, 2025
cbe1bea
chore: use namespaced translation key for enums
danjohnson95 Jan 2, 2025
32c20c7
chore: use namespaced translation keys for component groups
danjohnson95 Jan 2, 2025
7b49c22
chore: use namespaced translation keys for components
danjohnson95 Jan 2, 2025
ff98998
chore: use namespaced translation keys for incidents
danjohnson95 Jan 2, 2025
d47ef2f
chore: use namespaced translation keys for incident templates
danjohnson95 Jan 2, 2025
f2d2e42
chore: use namespaced translation keys for metrics
danjohnson95 Jan 2, 2025
5aff35d
chore: use namespaced translation keys for schedules
danjohnson95 Jan 2, 2025
78e46a5
chore: use namespaced translation keys for subscribers
danjohnson95 Jan 2, 2025
39431ec
chore: use namespaced translation keys on Overview
danjohnson95 Jan 2, 2025
6b31c05
chore: use namespaced translation keys for integrations
danjohnson95 Jan 2, 2025
31ba765
chore: update header to use filament translation strings
danjohnson95 Jan 2, 2025
69e9190
chore: update footer to use namespaced translation key
danjohnson95 Jan 2, 2025
7d31d1e
chore: use namespaced translation keys for other components
danjohnson95 Jan 2, 2025
cdbcade
chore: update settings pages to use namespaced translation keys
danjohnson95 Jan 2, 2025
53a08ca
chore: fix some typos in relation to translation strings
danjohnson95 Jan 2, 2025
46996dd
feat: add language files
danjohnson95 Jan 2, 2025
2eca7b3
Fix en_GB customisation
jbrooksuk Jan 2, 2025
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
Prev Previous commit
Next Next commit
chore: fix some typos in relation to translation strings
danjohnson95 committed Jan 2, 2025
commit 53a08ca44b8e55e96d5e0596fdaa4781e9bec6b9
2 changes: 1 addition & 1 deletion resources/views/components/header.blade.php
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
<form action="{{ \Cachet\Cachet::dashboardPath() }}/logout" method="POST">
@csrf
<button class="text-sm font-medium text-zinc-800 transition hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300 sm:text-base">
{{ __('filament-panels::widgets.account.logout-button') }}
{{ __('filament-panels::layout.actions.logout.label') }}
</button>
</form>
@endauth
2 changes: 1 addition & 1 deletion resources/views/components/incident.blade.php
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@
<div class="bg-white border divide-y rounded-lg ml-9 dark:divide-zinc-700 dark:border-zinc-700 dark:bg-white/5">
<div class="flex flex-col p-4 divide-y dark:divide-zinc-700">
<div class="prose-sm md:prose prose-zinc dark:prose-invert prose-a:text-accent-content prose-a:underline prose-p:leading-normal">
{{ __('cachet::indicent.no_incidents_reported') }}
{{ __('cachet::incident.no_incidents_reported') }}
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/status-page/incident.blade.php
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
</div>

<p class="text-xs text-right">
{{ __('cachet::incident.guid_label') . ' ' . $incident->guid }}
{{ __('cachet::incident.form.guid_label') . ' ' . $incident->guid }}
</p>
</div>

24 changes: 12 additions & 12 deletions src/CachetDashboardServiceProvider.php
Original file line number Diff line number Diff line change
@@ -42,27 +42,27 @@ public function panel(Panel $panel): Panel
->discoverPages(__DIR__.'/Filament/Pages', 'Cachet\\Filament\\Pages')
->discoverWidgets(__DIR__.'/Filament/Widgets', 'Cachet\\Filament\\Widgets')
->navigationGroups([
NavigationGroup::make('settings')
->label(__('cachet::navigation.settings.label'))
NavigationGroup::make()
->label(fn (): string => __('cachet::navigation.settings.label'))
->collapsed()
->icon('cachet-settings'),
NavigationGroup::make('integrations')
->label(__('cachet::navigation.settings.integrations.label'))
NavigationGroup::make()
->label(fn (): string => __('cachet::navigation.integrations.label'))
->collapsed(),
NavigationGroup::make('resources')
->label(__('cachet::navigation.resources.label'))
NavigationGroup::make()
->label(fn (): string => __('cachet::navigation.resources.label'))
->collapsible(false),
])
->navigationItems([
NavigationItem::make('status_page')
->label(__('cachet::navigation.resources.status_page'))
NavigationItem::make()
->label(fn (): string => __('cachet::navigation.resources.items.status_page'))
->url(Cachet::path())
->group(__('cachet::navigation.resources.label'))
->group(fn (): string => __('cachet::navigation.resources.label'))
->icon('cachet-component-performance-issues'),
NavigationItem::make('documentation')
->label(__('cachet::navigation.resources.documentation'))
NavigationItem::make()
->label(fn (): string => __('cachet::navigation.resources.items.documentation'))
->url('https://docs.cachethq.io/?ref=cachet-dashboard')
->group(__('cachet::navigation.resources.label'))
->group(fn (): string => __('cachet::navigation.resources.label'))
->icon('heroicon-o-book-open'),
])
->renderHook(PanelsRenderHook::GLOBAL_SEARCH_AFTER, fn () => view('cachet::filament.widgets.add-incident-button'))
8 changes: 4 additions & 4 deletions src/Enums/MetricViewEnum.php
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@ enum MetricViewEnum: int implements HasColor, HasIcon, HasLabel
public function getLabel(): string
{
return match ($this) {
self::last_hour => __('cachet::metrics.view_labels.last_hour'),
self::today => __('cachet::metrics.view_labels.today'),
self::week => __('cachet::metrics.view_labels.week'),
self::month => __('cachet::metrics.view_labels.month'),
self::last_hour => __('cachet::metric.view_labels.last_hour'),
self::today => __('cachet::metric.view_labels.today'),
self::week => __('cachet::metric.view_labels.week'),
self::month => __('cachet::metric.view_labels.month'),
};
}

2 changes: 1 addition & 1 deletion src/Filament/Pages/Settings/ManageCachet.php
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ public static function getNavigationGroup(): ?string

public static function getNavigationLabel(): string
{
return __('cachet::navigation.settings.manage_cachet');
return __('cachet::navigation.settings.items.manage_cachet');
}

public function form(Form $form): Form
2 changes: 1 addition & 1 deletion src/Filament/Pages/Settings/ManageCustomization.php
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ public static function getNavigationGroup(): ?string

public static function getNavigationLabel(): string
{
return __('cachet::navigation.settings.manage_customization');
return __('cachet::navigation.settings.items.manage_customization');
}

public function form(Form $form): Form
4 changes: 2 additions & 2 deletions src/Filament/Pages/Settings/ManageTheme.php
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public static function getNavigationGroup(): ?string

public static function getNavigationLabel(): string
{
return __('cachet::navigation.settings.manage_theme');
return __('cachet::navigation.settings.items.manage_theme');
}

public function form(Form $form): Form
@@ -38,7 +38,7 @@ public function form(Form $form): Form
]),

Forms\Components\Section::make()->columns(2)
->heading(__('cachet::settings.manage_theme.status_page_accent.header'))
->heading(__('cachet::settings.manage_theme.status_page_accent.heading'))
->description(__('cachet::settings.manage_theme.status_page_accent.description'))
->schema([
Forms\Components\Select::make('accent')
2 changes: 1 addition & 1 deletion src/Filament/Resources/MetricResource.php
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ public static function form(Form $form): Form
->default(ResourceVisibilityEnum::guest)
->required(),
Forms\Components\Toggle::make('display_chart')
->label(__('cachet::metric.form.dislay_chart_label'))
->label(__('cachet::metric.form.display_chart_label'))
->default(true)
->required(),

4 changes: 2 additions & 2 deletions src/Filament/Resources/ScheduleResource.php
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ public static function table(Table $table): Table
->actions([
Action::make('add-update')
->disabled(fn (Schedule $record) => $record->status === ScheduleStatusEnum::complete)
->label(__('cachet::list.actions.record_update'))
->label(__('cachet::schedule.list.actions.record_update'))
->color('info')
->action(function (CreateUpdate $createUpdate, Schedule $record, array $data) {
$createUpdate->handle($record, CreateScheduleUpdateData::from($data));
@@ -106,7 +106,7 @@ public static function table(Table $table): Table
]),
Tables\Actions\Action::make('complete')
->disabled(fn (Schedule $record): bool => $record->status === ScheduleStatusEnum::complete)
->label(__('cachet::list.actions.complete'))
->label(__('cachet::schedule.list.actions.complete'))
->form([
Forms\Components\DateTimePicker::make('completed_at')
->required(),