Skip to content

Commit 90355f8

Browse files
authored
Migrate Localisations To PHP vs JSON (rappasoft#2038)
* Fix localisations migrate to php files (#91) * Initial Fixes * Fix styling --------- Co-authored-by: lrljoe <[email protected]> * Adjust test suites * Fix styling --------- Co-authored-by: lrljoe <[email protected]>
1 parent 03304f2 commit 90355f8

File tree

83 files changed

+1057
-1577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1057
-1577
lines changed

.github/workflows/run-tests-pcov-pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
9494

9595
- name: Run Unit Tests
96-
run: php ./vendor/bin/phpunit --cache-directory=".phpunit.cache/code-coverage" --strict-coverage --coverage-clover ./coverage.xml
96+
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Unit Test Suite" --cache-directory=".phpunit.cache/code-coverage" --strict-coverage --coverage-clover ./coverage.xml
9797

9898
- name: Upload coverage reports to Codecov
9999
uses: codecov/codecov-action@v4

.github/workflows/run-tests-pull.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
8484

8585
- name: Run Unit Tests
86-
run: php ./vendor/bin/phpunit --no-coverage
86+
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage
8787

8888

8989
test-laravel11:
@@ -162,4 +162,4 @@ jobs:
162162
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
163163

164164
- name: Run Unit Tests
165-
run: php ./vendor/bin/phpunit --no-coverage
165+
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
8686

8787
- name: Run Unit Tests
88-
run: php ./vendor/bin/phpunit --no-coverage
88+
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage
8989

9090

9191
test-laravel11:
@@ -164,4 +164,4 @@ jobs:
164164
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
165165

166166
- name: Run Unit Tests
167-
run: php ./vendor/bin/phpunit --no-coverage
167+
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage

docs/datatable/available-methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function configure(): void
154154

155155
Set the message displayed when the table is filtered but there are no results to show.
156156

157-
Defaults to: "_No items found. Try to broaden your search._"
157+
Defaults to: "_No items found, try to broaden your search._"
158158

159159
```php
160160
public function configure(): void

docs/filters/available-methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ Example blade:
339339
type="button"
340340
class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"
341341
>
342-
<span class="sr-only">@lang('livewire-tables::Remove filter option')</span>
342+
<span class="sr-only">@lang('livewire-tables::core.Remove filter option')</span>
343343
<svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
344344
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
345345
</svg>

phpunit.xml.dist

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@
99
failOnEmptyTestSuite="false"
1010
beStrictAboutOutputDuringTests="true" >
1111
<testsuites>
12-
<testsuite name="Laravel Livewire Tables Test Suite">
12+
<testsuite name="Laravel Livewire Tables Unit Test Suite">
1313
<directory>tests/Unit</directory>
1414
</testsuite>
15+
<testsuite name="Laravel Livewire Tables Localisations Unit">
16+
<directory>tests/Localisations/Unit</directory>
17+
</testsuite>
18+
<testsuite name="Laravel Livewire Tables Localisations Presence">
19+
<directory>tests/Localisations/Presence</directory>
20+
</testsuite>
1521
</testsuites>
1622
<source>
1723
<include>

resources/lang/ar.json

Lines changed: 0 additions & 62 deletions
This file was deleted.

resources/lang/ar/core.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
return [
4+
'All' => 'الجميع',
5+
'All Columns' => 'كافة الأعمدة',
6+
'Applied Filters' => 'المرشحات التطبيقية',
7+
'Applied Sorting' => 'الفرز التطبيقي',
8+
'Bulk Actions' => 'إجراءات جملة',
9+
'Clear' => 'واضح',
10+
'Columns' => 'الأعمدة',
11+
'Debugging Values' => 'قيم التصحيح',
12+
'Deselect All' => 'الغاء تحديد الكل',
13+
'Done Reordering' => 'تمت إعادة الترتيب',
14+
'Filters' => 'المرشحات',
15+
'not_applicable' => 'N/A',
16+
'No' => 'لا',
17+
'No items found, try to broaden your search' => 'لم يتم العثور على العناصر. حاول توسيع نطاق البحث',
18+
'of' => 'ل',
19+
'Remove filter option' => 'إزالة خيار التصفية',
20+
'Remove sort option' => 'إزالة خيار الفرز',
21+
'Reorder' => 'إعادة ترتيب',
22+
'results' => 'نتائج',
23+
'row' => 'صف',
24+
'rows' => 'صفوف',
25+
'rows, do you want to select all' => 'الصفوف ، هل تريد تحديد الكل',
26+
'Search' => 'يبحث',
27+
'Select All' => 'اختر الكل',
28+
'Showing' => 'عرض',
29+
'to' => 'ل',
30+
'Yes' => 'نعم',
31+
'You are currently selecting all' => 'أنت الآن تختار الكل',
32+
'You are not connected to the internet' => 'أنت غير متصل بالإنترنت',
33+
'You have selected' => 'قمت بتحديدها',
34+
];

resources/lang/ca.json

Lines changed: 0 additions & 62 deletions
This file was deleted.

resources/lang/ca/core.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
return [
4+
'All' => 'Tot',
5+
'All Columns' => 'Totes les columnes',
6+
'Applied Filters' => 'Filtres Aplicats',
7+
'Applied Sorting' => 'Ordenació Aplicada',
8+
'Bulk Actions' => 'Accions Massives',
9+
'Clear' => 'Esborra',
10+
'Columns' => 'Columnes',
11+
'Debugging Values' => 'Valors de depuració',
12+
'Deselect All' => 'Deselecciona tot',
13+
'Done Reordering' => 'Reordenació finalitzada',
14+
'Filters' => 'Filtres',
15+
'not_applicable' => 'N/A',
16+
'No' => 'No',
17+
'No items found, try to broaden your search' => "No s'han trobat elements. Intenti ampliar la cerca",
18+
'of' => 'de',
19+
'Remove filter option' => 'Elimina opció de filtre',
20+
'Remove sort option' => "Elimina opció d'ordenació",
21+
'Reorder' => 'Reordena',
22+
'results' => 'resultats',
23+
'row' => 'fila',
24+
'rows' => 'files',
25+
'rows, do you want to select all' => 'files, vol seleccionar totes',
26+
'to' => 'a',
27+
'Search' => 'Cerca',
28+
'Select All' => 'Selecciona tot',
29+
'Showing' => 'Mostrant',
30+
'Yes' => '',
31+
'You are currently selecting all' => 'Actualment està seleccionant tot',
32+
'You are not connected to the internet' => 'No està conectat a Internet',
33+
'You have selected' => 'Ha seleccionat',
34+
];

0 commit comments

Comments
 (0)