Skip to content

Commit

Permalink
fix: add missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
dmandrade committed Sep 14, 2022
1 parent 66a43ba commit f3a79d4
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 5 deletions.
12 changes: 12 additions & 0 deletions resources/lang/en/fields.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

return [
'export_template' => 'Export template',
'filename' => 'Filename',
'writer_type' => 'Type',
'column_format' => 'Format',
'columns' => [
'label' => 'Columns',
'hint' => 'Select the columns you want to export.',
]
];
5 changes: 5 additions & 0 deletions resources/lang/pt_BR/actions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [
'label' => 'Exportar',
];
12 changes: 12 additions & 0 deletions resources/lang/pt_BR/fields.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

return [
'export_template' => 'Modelo de Exportação',
'filename' => 'Nome do arquivo',
'writer_type' => 'Tipo',
'column_format' => 'Formato',
'columns' => [
'label' => 'Colunas',
'hint' => 'Selecione as colunas que você deseja exportar.',
]
];
1 change: 1 addition & 0 deletions resources/views/components/export-builder.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
<x-forms::builder.block-picker
:blocks="$getUnusedColumns()"
:state-path="$getStatePath()"
class="columns-2"
/>
</x-forms::dropdown>
@endif
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/Concerns/ExportableAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function getSelectExportField(): array
{
return [
Select::make('selected_exportable')
->label(__('Export template'))
->label(__('filament-excel::fields.export_template'))
->reactive()
->default(0)
->disablePlaceholderSelection()
Expand Down
2 changes: 1 addition & 1 deletion src/Interactions/AskForColumnFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function askForFormat(?array $default = null, ?string $label = null, ?cal
$formatCallback ??= fn () => Arr::get($this->formData, 'format');

$field = Select::make('format')
->label($label ?? __('Format'))
->label($label ?? __('filament-excel::fields.column_format'))
->default($default ?? NumberFormat::FORMAT_GENERAL)
->options(fn() => $this->getAvailableFormats());

Expand Down
3 changes: 2 additions & 1 deletion src/Interactions/AskForColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public static function getColumnsField(array $availableColumns = [], ?array $def
}

$field = ExportBuilder::make('columns')
->hint(__('Select the columns you want to export.'))
->label($label ?? __('filament-excel::fields.columns.label'))
->hint(__('filament-excel::fields.columns.hint'))
->default($default ?? [])
->required()
->blocks($columns);
Expand Down
2 changes: 1 addition & 1 deletion src/Interactions/AskForFilename.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait AskForFilename
public function askForFilename(?string $default = null, ?string $label = null, ?callable $callback = null): self
{
$field = TextInput::make('filename')
->label($label ?? __('Filename'))
->label($label ?? __('filament-excel::fields.filename'))
->default($default ?? '')
->required();

Expand Down
2 changes: 1 addition & 1 deletion src/Interactions/AskForWriterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function askForWriterType(?string $default = null, ?array $options = null
];

$field = Select::make('writer_type')
->label($label ?? __('Type'))
->label($label ?? __('filament-excel::fields.writer_type'))
->options($options)
->default($default ?? '')
->required();
Expand Down

0 comments on commit f3a79d4

Please sign in to comment.