Skip to content

Commit 104440e

Browse files
authored
Merge branch 'barryvdh:master' into master
2 parents 1e90031 + fef5b8e commit 104440e

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.github/workflows/run-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
php: [8.2, 8.1, 8.0]
23-
laravel: [10.*, 9.*]
22+
php: [8.3, 8.2, 8.1]
23+
laravel: [11.*, 10.*, 9.*]
2424
dependency-version: [prefer-lowest, prefer-stable]
2525
exclude:
26-
- laravel: 10.*
27-
php: 8.0
26+
- laravel: 11.*
27+
php: 8.1
2828

2929
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
3030

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
],
1616
"require": {
1717
"php": ">=7.2",
18-
"illuminate/support": "^9|^10",
19-
"illuminate/translation": "^9|^10",
20-
"symfony/finder": "^6"
18+
"illuminate/support": "^9|^10|^11",
19+
"illuminate/translation": "^9|^10|^11",
20+
"symfony/finder": "^6|^7"
2121
},
2222
"require-dev": {
23-
"orchestra/testbench": "^7|^8"
23+
"orchestra/testbench": "^7|^8|^9"
2424
},
2525
"suggest": {
2626
"tanmuhittin/laravel-google-translate": "If you want to translate using Google API"

resources/views/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
<hr>
233233
<h4>Total: <?= $numTranslations ?>, changed: <?= $numChanged ?></h4>
234234
<table class="table">
235-
<thead>
235+
<thead style="position: sticky; top: 0; background: #fff;">
236236
<tr>
237237
<th width="15%">Key</th>
238238
<?php foreach ($locales as $locale): ?>

src/Manager.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ protected function makeTree($translations, $json = false)
347347
{
348348
$array = [];
349349
foreach ($translations as $translation) {
350-
if ($json) {
350+
// For JSON and sentences, do not use dotted notation
351+
if ($json || Str::contains($translation->key, [' ']) || Str::endsWith($translation->key, ['.'])) {
351352
$this->jsonSet($array[$translation->locale][$translation->group], $translation->key,
352353
$translation->value);
353354
} else {

0 commit comments

Comments
 (0)