Skip to content

Commit

Permalink
Merge pull request #443 from rappasoft/develop
Browse files Browse the repository at this point in the history
v1.13.0
  • Loading branch information
rappasoft authored Aug 25, 2021
2 parents ed03c58 + 846204f commit ffd23f4
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 24 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to `laravel-livewire-tables` will be documented in this file

## [Unreleased]

## [1.13.0] - 2021-08-24

### Added

- [Spanish translation](https://github.com/rappasoft/laravel-livewire-tables/pull/433)

### Changed

- [Use package tool to register commands](https://github.com/rappasoft/laravel-livewire-tables/pull/434)
- [Fix callback so it doesn't care about parameter names](https://github.com/rappasoft/laravel-livewire-tables/pull/438)
- Changed default empty text

## [1.12.0] - 2021-07-31

### Added
Expand Down Expand Up @@ -434,7 +446,8 @@ All notable changes to `laravel-livewire-tables` will be documented in this file

- Initial release

[Unreleased]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.12.0...development
[Unreleased]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.13.0...development
[1.13.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.12.0...v1.13.0
[1.12.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.11.0...v1.12.0
[1.11.0]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.10.4...v1.11.0
[1.10.4]: https://github.com/rappasoft/laravel-livewire-tables/compare/v1.10.3...v1.10.4
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"results": "results",
"rows": "rows",
"rows, do you want to select all": "rows, do you want to select all",
"No items found. Try narrowing your search.": "No items found. Try narrowing your search.",
"No items found. Try to broaden your search.": "No items found. Try to broaden your search.",
"to": "to"
}
26 changes: 26 additions & 0 deletions resources/lang/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"All": "Todo",
"Applied Filters": "Filtros Aplicados",
"Applied Sorting": "Ordenamineto Aplicado",
"Bulk Actions": "Acciones Masivas",
"Clear": "Borrar",
"Columns": "Columnas",
"Done Reordering": "Reordenación finalizada",
"Filters": "Filtros",
"Remove filter option": "Remover opción de filtro",
"Remove sort option": "Remover opción de ordenamineto",
"Search": "Buscar",
"Select All": "Seleccionar todo",
"Showing": "Mostrando",
"Unselect All": "Deseleccionar todo",
"You are currently selecting all": "Actualmente está seleccionando todo",
"You are not connected to the internet.": "No está conectado a Internet.",
"You have selected": "Ha seleccionado",
"of": "de",
"Reorder": "Reordenar",
"results": "resultados",
"rows": "filas",
"rows, do you want to select all": "filas, desea seleccionar todas",
"No items found. Try to broaden your search.": "No se encontraron elementos. Intente ampliar la búsqueda.",
"to": "a"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span>
@lang('You have selected')
<strong>{{ count($selected) }}</strong>
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
@lang(count($selected) === 1 ? 'row' : 'rows').
</span>

<button
Expand Down Expand Up @@ -41,7 +41,7 @@ class="btn btn-primary btn-sm"
<span>
@lang('You have selected')
<strong>{{ count($selected) }}</strong>
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
@lang(count($selected) === 1 ? 'row' : 'rows').
</span>

<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span>
@lang('You have selected')
<strong>{{ count($selected) }}</strong>
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
@lang(count($selected) === 1 ? 'row' : 'rows').
</span>

<button
Expand Down Expand Up @@ -41,7 +41,7 @@ class="btn btn-primary btn-sm"
<span>
@lang('You have selected')
<strong>{{ count($selected) }}</strong>
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
@lang(count($selected) === 1 ? 'row' : 'rows').
</span>

<button
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tailwind/includes/bulk-select-row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span>
@lang('You have selected')
<strong>{{ count($selected) }}</strong>
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
@lang(count($selected) === 1 ? 'row' : 'rows').
</span>

<button
Expand Down Expand Up @@ -41,7 +41,7 @@ class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium
<span>
@lang('You have selected')
<strong>{{ count($selected) }}</strong>
@lang(':rows', ['rows' => count($selected) === 1 ? 'row' : 'rows']).
@lang(count($selected) === 1 ? 'row' : 'rows').
</span>

<button
Expand Down
2 changes: 1 addition & 1 deletion src/DataTableComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract class DataTableComponent extends Component
*
* @var string
*/
public string $emptyMessage = 'No items found. Try narrowing your search.';
public string $emptyMessage = 'No items found. Try to broaden your search.';

/**
* Name of the page parameter for pagination
Expand Down
16 changes: 2 additions & 14 deletions src/LaravelLivewireTablesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@ public function bootingPackage(): void
Blade::component('livewire-tables::bootstrap-5.components.table.heading', 'livewire-tables::bs5.table.heading');
Blade::component('livewire-tables::bootstrap-5.components.table.row', 'livewire-tables::bs5.table.row');
Blade::component('livewire-tables::bootstrap-5.components.table.cell', 'livewire-tables::bs5.table.cell');

$this->registerCommands();
}

protected function registerCommands(): void
{
if (! $this->app->runningInConsole()) {
return;
}

$this->commands([
MakeCommand::class,
]);
}

/**
Expand All @@ -57,6 +44,7 @@ public function configurePackage(Package $package): void
->name('laravel-livewire-tables')
->hasConfigFile()
->hasViews()
->hasTranslations();
->hasTranslations()
->hasCommand(MakeCommand::class);
}
}
2 changes: 1 addition & 1 deletion src/Views/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public function formatted($row, $column = null)
$value = data_get($row, $columnName);

if ($this->formatCallback) {
return app()->call($this->formatCallback, ['value' => $value, 'column' => $column, 'row' => $row]);
$value = call_user_func($this->formatCallback, $value, $column, $row);
}

return $value;
Expand Down

0 comments on commit ffd23f4

Please sign in to comment.