8000 merged branch craue/patch-20 (PR #4230) · symfony/symfony@fc34ed1 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc34ed1

Browse files
committed
merged branch craue/patch-20 (PR #4230)
Commits ------- 64101ab separate numeric value from suffix in File constraint's error message `$uploadIniSizeErrorMessage` ff122d3 fixed tests 868d649 separate numeric values from suffixes in File constraint's error message `$maxSizeMessage` Discussion ---------- [Validator] separate numeric values from suffixes in File validation error messages This change allows me to locale-aware format the numbers in a form theme, i.e., to use a comma instead of a dot. If there's a better way without re-implementing the entire validator, let me know. Such changes also allow for using a different separator than the usual space in translations. --------------------------------------------------------------------------- by travisbot at 2012-05-08T19:14:16Z This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1278845) (merged f7c50098 into e54f4e4). --------------------------------------------------------------------------- by travisbot at 2012-05-08T19:23:31Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1278940) (merged ce1cdafc into e54f4e4). --------------------------------------------------------------------------- by r1pp3rj4ck at 2012-05-10T11:05:18Z I don't know if there is a better way to do this, but I like the idea anyway. --------------------------------------------------------------------------- by craue at 2012-05-11T14:18:52Z Separated numeric values and suffixes for `$maxSizeMessage` and `$uploadIniSizeErrorMessage` now. Can't find any other relevant places (in other validators). Might be merged if accepted. --------------------------------------------------------------------------- by travisbot at 2012-05-11T14:19:10Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1305246) (merged 438da7dd into e54f4e4). --------------------------------------------------------------------------- by travisbot at 2012-05-11T21:22:25Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1309277) (merged 64101ab into dd0da03). --------------------------------------------------------------------------- by sstok at 2012-05-13T13:29:07Z Using the NumberFormatter class would be an option, but that would also add a dependency when using Validation as stand-alone so using the {{ suffix }} is a good idea. --------------------------------------------------------------------------- by craue at 2012-05-13T14:15:54Z Using a NumberFormatter (if available) directly in the validator might indeed be a good option. In either case, having the numeric value separated from its suffix looks cleaner. --------------------------------------------------------------------------- by craue at 2012-05-19T13:36:00Z @fabpot: Would you merge this?
2 parents f7cf76d + 64101ab commit fc34ed1

38 files changed

+164
-154
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.ca.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>No es pot llegir l'arxiu.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>L'arxiu és massa gran ({{ size }}). La grandària màxima permesa és {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>L'arxiu és massa gran ({{ size }} {{ suffix }}). La grandària màxima permesa és {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Els dos valors haurien de ser iguals.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>L'arxiu és massa gran. El tamany màxim permés és {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>L'arxiu és massa gran. El tamany màxim permés és {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.cs.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Soubor je nečitelný.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Soubor je příliš velký ({{ size }}). Maximální povolená velikost souboru je {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>Soubor je příliš velký ({{ size }} {{ suffix }}). Maximální povolená velikost souboru je {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Tyto dvě hodnoty musí být stejné.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Soubor je příliš velký. Maximální povolená velikost souboru je {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Soubor je příliš velký. Maximální povolená velikost souboru je {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.da.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Filen kan ikke læses.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Filen er for stor ({{ size }}). Tilladte maksimale størrelse {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>Filen er for stor ({{ size }} {{ suffix }}). Tilladte maksimale størrelse {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>De to værdier skal være ens.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Filen er for stor. Den maksimale størrelse er {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Filen er for stor. Den maksimale størrelse er {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.de.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Die Datei ist nicht lesbar.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Die Datei ist zu groß ({{ size }}). Die maximal zulässige Größe beträgt {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>Die Datei ist zu groß ({{ size }} {{ suffix }}). Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Die beiden Werte sollten identisch sein.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Die Datei ist zu groß. Die maximal zulässige Größe beträgt {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Die Datei ist zu groß. Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.en.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>The file is not readable.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>The two values should be equal.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>The file is too large. Allowed maximum size is {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.es.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>No se puede leer el archivo.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>El archivo es demasiado grande ({{ size }}). El tamaño máximo permitido es {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>El archivo es demasiado grande ({{ size }} {{ suffix }}). El tamaño máximo permitido es {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Los dos valores deberían ser iguales.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>El archivo es demasiado grande. El tamaño máximo permitido es {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>El archivo es demasiado grande. El tamaño máximo permitido es {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.et.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Fail ei ole loetav.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Fail on liiga suur ({{ size }}). Suurim lubatud suurus on {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>Fail on liiga suur ({{ size }} {{ suffix }}). Suurim lubatud suurus on {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Väärtused peaksid olema võrdsed.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Fail on liiga suur. Maksimaalne lubatud suurus on {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Fail on liiga suur. Maksimaalne lubatud suurus on {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.eu.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Fitxategia ez dago irakurgai.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Fitxategia handiegia da ({{ size }}). Baimendutako tamainu handiena {{ limit }} da.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>Fitxategia handiegia da ({{ size }} {{ suffix }}). Baimendutako tamainu handiena {{ limit }} {{ suffix }} da.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Bi balioak berdinak izan beharko lirateke.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Fitxategia handiegia da. Baimendutako tamainu handiena {{ limit }} da.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Fitxategia handiegia da. Baimendutako tamainu handiena {{ limit }} {{ suffix }} da.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.fa.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>فایل قابلیت خواندن ندارد.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>فایل بیش از اندازه بزرگ است({{ size }}). حداکثر اندازه مجاز برابر {{ limit }} است.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>فایل بیش از اندازه بزرگ است({{ size }} {{ suffix }}). حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>دو مقدار باید برابر باشند.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>فایل بیش از اندازه بزرگ است. حداکثر اندازه مجاز برابر {{ limit }} است.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>فایل بیش از اندازه بزرگ است. حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.fi.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Tiedostoa ei voida lukea.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Tiedostonkoko ({{ size }}) on liian iso. Suurin sallittu tiedostonkoko on {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>Tiedostonkoko ({{ size }} {{ suffix }}) on liian iso. Suurin sallittu tiedostonkoko on {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Kahden annetun arvon tulee olla samat.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Annettu tiedosto on liian iso. Suurin sallittu tiedostokoko on {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Annettu tiedosto on liian iso. Suurin sallittu tiedostokoko on {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.fr.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Le fichier n'est pas lisible.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Le fichier est trop volumineux ({{ size }}). Sa taille ne doit pas dépasser {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>Le fichier est trop volumineux ({{ size }} {{ suffix }}). Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Les deux valeurs doivent être identiques.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Le fichier est trop volumineux. Sa taille ne doit pas dépasser {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Le fichier est trop volumineux. Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.he.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>לא ניתן לקרוא את הקובץ.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>הקובץ גדול מדי ({{ size }}). הגודל המרבי המותר הוא {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
67+
<target>הקובץ גדול מדי ({{ size }} {{ suffix }}). הגודל המרבי המותר הוא {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>שני הערכים צריכים להיות שווים.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>הקובץ גדול מדי. הגודל המרבי המותר הוא {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>הקובץ גדול מדי. הגודל המרבי המותר הוא {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hr.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<target>Datoteka nije čitljiva.</target>
6464
</trans-unit>
6565
<trans-unit id="16">
66-
<source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}.</source>
67-
<target>Datoteka je prevelika ({{ size }}). Najveća dozvoljena veličina je {{ limit }}.</target>
66+
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size i A50D s {{ limit }} {{ suffix }}.</source>
67+
<target>Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veličina je {{ limit }} {{ suffix }}.</target>
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
@@ -127,8 +127,8 @@
127127
<target>Obje vrijednosti trebaju biti jednake.</target>
128128
</trans-unit>
129129
<trans-unit id="32">
130-
<source>The file is too large. Allowed maximum size is {{ limit }}.</source>
131-
<target>Ova datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }}.</target>
130+
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
131+
<target>Ova datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }} {{ suffix }}.</target>
132132
</trans-unit>
133133
<trans-unit id="33">
134134
<source>The file is too large.</source>

0 commit comments

Comments
 (0)
0