Skip to content

Commit

Permalink
Italian tranlation; fixed label 'Type' in modal (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
mynamespace authored Oct 27, 2022
1 parent d10ade0 commit d3ae276
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 6 deletions.
38 changes: 38 additions & 0 deletions resources/lang/it/filament-navigation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

return [
'attributes' => [
'external-link' => 'Link esterno',
'url' => 'URL',
'target' => 'Apri in',
'name' => 'Nome',
'items' => 'Voci di menù',
'handle' => 'Riferimento',
'created_at' => 'Data di creazione',
'updated_at' => 'Data di aggiornamento',

],

'select-options' => [
'same-tab' => 'Stessa scheda',
'new-tab' => 'Nuova scheda'
],

'items' => [
'empty' => 'Nesuna voce di menù.',
'add-item' => 'Aggiungi voce di menù',
'add-child' => 'Aggiungi sotto-voce di menù',
'move-up' => 'Sposta su',
'move-down' => 'Sposta giù',
'indent' => 'Aumenta rientro',
'dedent' => 'Riduci rientro',
'remove' => 'Rimuovi'
],

'items-modal' => [
'title' => 'Voce di menù',
'label' => 'Etichetta',
'type' => 'Tipo',
'btn' => 'Salva',
],
];
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function indentItem(string $statePath)

$previous = $parent[$keys[$position - 1]];

if (! isset($previous['children'])) {
if (!isset($previous['children'])) {
$previous['children'] = [];
}

Expand Down Expand Up @@ -88,7 +88,7 @@ public function moveItemUp(string $statePath)
$hasMoved = false;

uksort($parent, function ($_, $b) use ($uuid, &$hasMoved) {
if ($b === $uuid && ! $hasMoved) {
if ($b === $uuid && !$hasMoved) {
$hasMoved = true;

return 1;
Expand All @@ -109,7 +109,7 @@ public function moveItemDown(string $statePath)
$hasMoved = false;

uksort($parent, function ($a, $_) use ($uuid, &$hasMoved) {
if ($a === $uuid && ! $hasMoved) {
if ($a === $uuid && !$hasMoved) {
$hasMoved = true;

return 1;
Expand Down Expand Up @@ -143,7 +143,7 @@ protected function getActions(): array
return [
Action::make('item')
->mountUsing(function (ComponentContainer $form) {
if (! $this->mountedItem) {
if (!$this->mountedItem) {
return;
}

Expand All @@ -155,14 +155,14 @@ protected function getActions(): array
->label(__('filament-navigation::filament-navigation.items-modal.label'))
->required(),
Select::make('type')
->label(__('filament-navigation::filament-navigation.items-modal.label'))
->label(__('filament-navigation::filament-navigation.items-modal.type'))
->options(function () {
$types = FilamentNavigation::getItemTypes();

return array_combine(array_keys($types), Arr::pluck($types, 'name'));
})
->afterStateUpdated(function ($state, Select $component): void {
if (! $state) {
if (!$state) {
return;
}

Expand Down

0 comments on commit d3ae276

Please sign in to comment.