Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 76b2ed4

Browse filesBrowse files
committed
moved validator translation files to the Form and Validator components to make them reusable (closes #4588)
1 parent f881d28 commit 76b2ed4
Copy full SHA for 76b2ed4

File tree

Expand file treeCollapse file tree

73 files changed

+685
-423
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

73 files changed

+685
-423
lines changed

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
2.1.0
55
-----
66

7+
* moved the translation files to the Form and Validator components
78
* changed the default extension for XLIFF files from .xliff to .xlf
89
* moved Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
910
* moved Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareTraceableEventDispatcher

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,16 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
543543
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/translations')) {
544544
$dirs[] = $dir;
545545
}
546+
if (class_exists('Symfony\Component\Validator\Validator')) {
547+
$r = new \ReflectionClass('Symfony\Component\Validator\Validator');
548+
549+
$dirs[] = dirname($r->getFilename()).'/Resources/translations';
550+
}
551+
if (class_exists('Symfony\Component\Form\Form')) {
552+
$r = new \ReflectionClass('Symfony\Component\Form\Form');
553+
554+
$dirs[] = dirname($r->getFilename()).'/Resources/translations';
555+
}
546556

547557
// Register translation resources
548558
if ($dirs) {

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,16 @@ public function testTranslator()
183183
}
184184
}
185185

186+
$files = array_map(function($resource) use ($resources) { return str_replace(realpath(__DIR__.'/../../../../..').'/', '', realpath($resource[1])); }, $resources);
186187
$this->assertContains(
187-
realpath(__DIR__.'/../../Resources/translations/validators.fr.xlf'),
188-
array_map(function($resource) use ($resources) { return realpath($resource[1]); }, $resources),
189-
'->registerTranslatorConfiguration() finds FrameworkExtension translation resources'
188+
'Symfony/Component/Validator/Resources/translations/validators.en.xlf',
189+
$files,
190+
'->registerTranslatorConfiguration() finds Validator translation resources'
191+
);
192+
$this->assertContains(
193+
'Symfony/Component/Form/Resources/translations/validators.en.xlf',
194+
$files,
195+
'->registerTranslatorConfiguration() finds Form translation resources'
190196
);
191197

192198
$calls = $container->getDefinition('translator.default')->getMethodCalls();
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Aquest formulari no hauria de contenir camps addicionals.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>L'arxiu pujat és massa gran. Per favor, pugi un arxiu més petit.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid.</source>
15+
<target>El token CSRF no és vàlid.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Tato skupina polí nesmí obsahovat další pole.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Nahraný soubor je příliš velký. Nahrajte prosím menší soubor.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRF token je neplatný. Zkuste prosím znovu odeslat formulář.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Feltgruppen må ikke indeholde ekstra felter.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Den oploadede fil var for stor. Opload venligst en mindre fil.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid.</source>
15+
<target>CSRF nøglen er ugyldig.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Dieses Formular sollte keine zusätzlichen Felder enthalten.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Die hochgeladene Datei ist zu groß. Versuchen Sie bitte eine kleinere Datei hochzuladen.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>Das CSRF-Token ist ungültig. Versuchen Sie bitte das Formular erneut zu senden.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>This form should not contain extra fields.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>The uploaded file was too large. Please try to upload a smaller file.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>The CSRF token is invalid. Please try to resubmit the form.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Este formulario no debería contener campos adicionales.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>El archivo subido es demasiado grande. Por favor, suba un archivo más pequeño.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid.</source>
15+
<target>El token CSRF no es válido.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version='1.0'?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Väljade grupp ei tohiks sisalda lisaväljasid.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Üleslaaditud fail oli liiga suur. Palun proovi uuesti väiksema failiga.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRF-märgis on vigane. Palun proovi vormi uuesti esitada.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Formulario honek ez luke aparteko eremurik eduki behar.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Igotako fitxategia handiegia da. Mesedez saiatu fitxategi txikiago bat igotzen.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid.</source>
15+
<target>CSFR tokena ez da egokia.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>این فرم نباید فیلد اضافی داشته باشد.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>فایل بارگذاری شده بسیار بزرگ است. لطفا فایل کوچکتری را بارگزاری کنید.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>مقدار CSRF نامعتبر است. لطفا فرم را مجددا ارسال فرمایید..</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This field group should not contain extra fields.</source>
7+
<target>Tämä kenttäryhmä ei voi sisältää ylimääräisiä kenttiä.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Ladattu tiedosto on liian iso. Ole hyvä ja lataa pienempi tiedosto.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRF tarkiste on virheellinen. Olen hyvä ja yritä lähettää lomake uudestaan.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Ce formulaire ne doit pas contenir des champs supplémentaires.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Le fichier téléchargé est trop volumineux. Merci d'essayer d'envoyer un fichier plus petit.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>Le jeton CSRF est invalide. Veuillez renvoyer le formulaire.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>הטופס לא צריך להכיל שדות נוספים.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>הקובץ שהועלה גדול מדי. נסה להעלות קובץ קטן יותר.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid.</source>
15+
<target>אסימון CSRF אינו חוקי.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Ovaj obrazac ne smije sadržavati dodatna polja.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Prenesena datoteka je prevelika. Molim pokušajte prenijeti manju datoteku.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRF vrijednost nije ispravna. Pokušajte ponovo poslati obrazac.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Ez a mezőcsoport nem tartalmazhat extra mezőket.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>A feltöltött fájl túl nagy. Kérem próbáljon egy kisebb fájlt feltölteni.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>Érvénytelen CSRF token. Kérem próbálja újra elküldeni az űrlapot.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Այս ձևը չպետք է պարունակի լրացուցիչ տողեր.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Վերբեռնված ֆայլը չափազանց մեծ է: Խնդրվում է վերբեռնել ավելի փոքր չափսի ֆայլ.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRF արժեքը անթույլատրելի է: Փորձեք նորից ուղարկել ձևը.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Gabungan kolom tidak boleh mengandung kolom tambahan.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Berkas yang di unggah terlalu besar. Silahkan coba unggah berkas yang lebih kecil.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRF-Token tidak sah. Silahkan coba kirim ulang formulir.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Questo form non dovrebbe contenere nessun campo extra.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Il file caricato è troppo grande. Per favore caricare un file più piccolo.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>Il token CSRF non è valido. Provare a reinviare il form.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.