Skip to content

Commit 886af6f

Browse files
minor symfony#54536 [Validator] Fill in trans-unit id 113: This URL does not contain a TLD. (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [Validator] Fill in trans-unit id 113: This URL does not contain a TLD. | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- cf6151d [Validator] Fill in trans-unit id 113: This URL does not contain a TLD.
2 parents 9226902 + cf6151d commit 886af6f

Some content is hidden

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

56 files changed

+223
-9
lines changed

.github/sync-translations.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ function mergeDom(\DOMDocument $dom, \DOMNode $tree, \DOMNode $input)
108108
if ($catalogue->defines($resname, $domain)) {
109109
$translation = $catalogue->get($resname, $domain);
110110
$metadata = $catalogue->getMetadata($resname, $domain);
111+
} else {
112+
$translation = $source;
111113
}
112114
$metadata['id'] = $enCatalogue->getMetadata($resname, $domain)['id'];
113115
if ($resname !== $source) {

.github/workflows/integration-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ jobs:
114114
steps:
115115
- name: Checkout
116116
uses: actions/checkout@v4
117+
with:
118+
fetch-depth: 0
117119

118120
- name: Install system dependencies
119121
run: |
@@ -201,13 +203,11 @@ jobs:
201203
- name: Check for changes in translation files
202204
id: changed-translation-files
203205
run: |
204-
if git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf'; then
205-
echo "{changed}={true}" >> $GITHUB_OUTPUT
206-
else
207-
echo "{changed}={false}" >> $GITHUB_OUTPUT
208-
fi
206+
echo 'changed='$((git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf' || (echo 'true' && exit 1)) && echo 'false') >> $GITHUB_OUTPUT
209207
210208
- name: Check Translation Status
211209
if: steps.changed-translation-files.outputs.changed == 'true'
212210
run: |
213211
php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v
212+
php .github/sync-translations.php
213+
git diff --exit-code src/ || (echo 'Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1)

src/Symfony/Component/Translation/Resources/bin/translation-status.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ function extractLocaleFromFilePath($filePath)
166166
function extractTranslationKeys($filePath)
167167
{
168168
$translationKeys = [];
169-
$contents = new \SimpleXMLElement(file_get_contents($filePath));
169+
$contents = new SimpleXMLElement(file_get_contents($filePath));
170170

171171
foreach ($contents->file->body->{'trans-unit'} as $translationKey) {
172172
$translationId = (string) $translationKey['id'];
173-
$translationKey = (string) $translationKey->source;
173+
$translationKey = (string) ($translationKey['resname'] ?? $translationKey->source);
174174

175175
$translationKeys[$translationId] = $translationKey;
176176
}

src/Symfony/Component/Validator/Resources/translations/validators.af.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@
438438
<source>This value is not a valid MAC address.</source>
439439
<target state="needs-review-translation">Hierdie waarde is nie 'n geldige MAC-adres nie.</target>
440440
</trans-unit>
441+
<trans-unit id="113">
442+
<source>This URL does not contain a TLD.</source>
443+
<target state="needs-review-translation">Hierdie URL bevat nie 'n topvlakdomein (TLD) nie.</target>
444+
</trans-unit>
441445
</body>
442446
</file>
443447
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@
438438
<source>This value is not a valid MAC address.</source>
439439
<target>هذه القيمة ليست عنوان MAC صالحًا.</target>
440440
</trans-unit>
441+
<trans-unit id="113">
442+
<source>This URL does not contain a TLD.</source>
443+
<target state="needs-review-translation">هذا الرابط لا يحتوي على نطاق أعلى مستوى (TLD).</target>
444+
</trans-unit>
441445
</body>
442446
</file>
443447
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.az.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@
438438
<source>This value is not a valid MAC address.</source>
439439
<target state="needs-review-translation">Bu dəyər etibarlı bir MAC ünvanı deyil.</target>
440440
</trans-unit>
441+
<trans-unit id="113">
442+
<source>This URL does not contain a TLD.</source>
443+
<target state="needs-review-translation">Bu URL üst səviyyəli domen (TLD) içərmir.</target>
444+
</trans-unit>
441445
</body>
442446
</file>
443447
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.be.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@
438438
<source>This value is not a valid MAC address.</source>
439439
<target state="needs-review-translation">Гэта значэнне не з'яўляецца сапраўдным MAC-адрасам.</target>
440440
</trans-unit>
441+
<trans-unit id="113">
442+
<source>This URL does not contain a TLD.</source>
443+
<target state="needs-review-translation">Гэты URL не ўтрымлівае дамен верхняга ўзроўню (TLD).</target>
444+
</trans-unit>
441445
</body>
442446
</file>
443447
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@
438438
<source>This value is not a valid MAC address.</source>
439439
<target state="needs-review-translation">Тази стойност не е валиден MAC адрес.</target>
440440
</trans-unit>
441+
<trans-unit id="113">
442+
<source>This URL does not contain a TLD.</source>
443+
<target state="needs-review-translation">Този URL адрес не съдържа домейн от най-високо ниво (TLD).</target>
444+
</trans-unit>
441445
</body>
442446
</file>
443447
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@
438438
<source>This value is not a valid MAC address.</source>
439439
<target state="needs-review-translation">Ova vrijednost nije valjana MAC adresa.</target>
440440
</trans-unit>
441+
<trans-unit id="113">
442+
<source>This URL does not contain a TLD.</source>
443+
<target state="needs-review-translation">Ovaj URL ne sadrži domenu najvišeg nivoa (TLD).</target>
444+
</trans-unit>
441445
</body>
442446
</file>
443447
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@
438438
<source>This value is not a valid MAC address.</source>
439439
<target state="needs-review-translation">Aquest valor no és una adreça MAC vàlida.</target>
440440
</trans-unit>
441+
<trans-unit id="113">
442+
<source>This URL does not contain a TLD.</source>
443+
<target state="needs-review-translation">Aquesta URL no conté un domini de nivell superior (TLD).</target>
444+
</trans-unit>
441445
</body>
442446
</file>
443447
</xliff>

0 commit comments

Comments
 (0)