Commits
-------
24e0d71 [FrameworkBundle] Fix a translatable string from the Form default validator
30d348d [Form] Make the default invalid message translatable
Discussion
----------
[Form] Translation
The first commit adds the ability to customize the default message when the form is invalid:
* Make it an option in the form builder,
* Allow placeholders in the message,
* The default value `This value is not valid` exists in the translation files.
The second commit updates a source string in the XLIFF files to make it translatable. All translations should be updated accordingly. The source string is from the [default validator](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Validator/DefaultValidator.php#L27).
This PR should fix The issue #997.
---------------------------------------------------------------------------
by fabpot at 2011/07/11 01:53:05 -0700
The first commit is not about making the message translatable, but to make it customizable (as the message is used for very different purposes depending on the Type).
---------------------------------------------------------------------------
by fabpot at 2011/07/11 01:55:11 -0700
The "This value is not valid" string should be added to the translation files too.
---------------------------------------------------------------------------
by vicb at 2011/07/11 02:02:51 -0700
@fabpot it was not translatable as the name was hardcoded in the message (instead of using a placeholder). So yes it becomes translatable now (and "customize"able as explained in the PR message).
I have also removed the form name from the default message as I don't think it brings any added value.
`This value is not valid` already exists in the translation files (see id=24).
Commits
-------
f7d0f65 RFC2616 changes
b9a218a [HttpFoundation] set Content-Length header to the length of content
Discussion
----------
[HttpFoundation] set Content-Length header to the length of content
I can't think of why this could be bad but if somebody knows please chime in.
The good thing is that with this change keepalive will work out of the box.
---------------------------------------------------------------------------
by Seldaek at 2011/07/06 05:34:51 -0700
That sounds like a great change. I think it might explain/fix the issues I've encountered with AppCache on my production box. Never had time to look into it, but IIRC I noticed the missing Content-Length, and it seemed to load forever.
---------------------------------------------------------------------------
by fabpot at 2011/07/06 06:46:50 -0700
The `Content-Length` is automatically added by servers like Apache. Moreover, sometimes, you should not add it: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4
---------------------------------------------------------------------------
by lenar at 2011/07/06 07:54:45 -0700
It is not added automatically by default. Yes, in case of Apache it is actually added if deflate module is enabled and if that module decides to compress the content (decision based on content-type).
About RFC2616: I will read it and add changes to this PR if applicable.
---------------------------------------------------------------------------
by fabpot at 2011/07/06 08:38:14 -0700
e943fde2ef
---------------------------------------------------------------------------
by Seldaek at 2011/07/06 08:45:22 -0700
@lenar all you have to do is skip setting the Content-Length for `1xx`, `204`, and `304` responses I believe.
---------------------------------------------------------------------------
by Seldaek at 2011/07/06 08:46:54 -0700
But this should maybe be done in sendHeaders() à la `fixContentType`, because you can't be sure about the statusCode before that.
---------------------------------------------------------------------------
by lenar at 2011/07/06 13:55:33 -0700
I propose this based on what I read and understood from RFC2616.
---------------------------------------------------------------------------
by mheleniak at 2011/07/10 03:57:26 -0700
+1
Commits
-------
377ef79 Error Message id 1 & 2 changed in "true" & "false", since direct german translation (wahr, falsch) are properly missleading. Corrected typos.
Discussion
----------
Error Message id 1 & 2 changed in "true" & "false"
Error Message id 1 & 2 changed in "true" & "false", since direct german translation (wahr, falsch) are properly missleading. Corrected typos.
Commits
-------
e6a2d76 delay resolving values of extensions config until all files are loaded
Discussion
----------
[DependencyInjection] Delay resolving values of extensions' config until all files are loaded
This addresses #1598.
This delays resolving of extensions' configuration until all files are loaded. Without this, overriding parameters do not work for extensions.
Commits
-------
f359e3d Updated italian translations
Discussion
----------
Updated and corrected italian translations
---------------------------------------------------------------------------
by davideborsatto at 2011/07/10 12:41:29 -0700
Previously they were not translated that good, plus there were a few typos here and there.
Commits
-------
89c8962 Fixed minor portuguese brazilian messages. File is pretty much up to date, just small glitches.
Discussion
----------
Fixed minor portuguese brazilian messages. File is pretty much up to date
Fixed minor portuguese brazilian messages. File is pretty much up to date, just small glitches.
Commits
-------
d53f312 changed "should" to "must" in message 6 and 7. also moved message 32 as replacement of message 5, according to note by yethee
e151c80 updated japanese translations
Discussion
----------
updated japanese translations
Please update japanese translations.
I picked up some messages from the latest sources of validation classes on your master branch, because translations for many other languages seems not to contain messages for recent validator classes, such as Image,Ip,Locale,Language.
Thanks in advance!
---------------------------------------------------------------------------
by yethee at 2011/07/10 09:23:01 -0700
> "One or more..." is on message#33 in my commit, should I locate #33 just after #5?
Not necessarily, the order of messages is not important, AFAIK.
Commits
-------
9714cfc Fixes fatal error when intl module is not installed.
Discussion
----------
Session instantiation breaks with Fatal error if intl module is not installed.
A check for class_exists in setPhpDefaultLocale() fixes this, though I got the feeling it should be resolved with a proxy or subscriber object; setPhpDefaultLocale feels like a hack now.
---------------------------------------------------------------------------
by stealth35 at 2011/07/10 06:32:43 -0700
Locale::setDefault don't throw any exception
Maybe just :
```php
if (class_exists('Locale', false)) {
return \Locale::setDefault($this->locale);
} else {
return false;
}
```
Commits
-------
08b4219 [DoctrineBridge] Issue #1376 - Unique Validator does not work with null values
Discussion
----------
Issue1376
[DoctrineBridge] Issue #1376 - Unique Validator does not work with null values
Commits
-------
c3f8999 [FrameworkBundle] Fixes Russian translations for the validators.
Discussion
----------
[FrameworkBundle] Fixes Russian translations for the validators.
Updated translations for the DefaultValidator of the Form component.
- reverted `The uploaded file was too large. Please try to upload a smaller file`
- added `This form should not contain extra fields` instead of `This field group should not contain extra fields`
Commits
-------
c1cab27 [FrameworkBundle] Updated Russian translations for validators.
Discussion
----------
[FrameworkBundle] Updated Russian translations for validators.
Sync translations with the actual validator constraints.
Removed some translations (they are not found among the constraints):
- `This value should be instance of class {{ class }}`
- `This field group should not contain extra fields`
- `The uploaded file was too large. Please try to upload a smaller file`
Commits
-------
7517fa4 [DoctrineBundle] Fixed the transient test
f21dc42 [DoctrineBundle] Fixed the Registry::getEntityManagerForObject method
Discussion
----------
[DoctrineBundle] Fixed the Registry::getEntityManagerForObject method
This fixes the Registry::getEntityManagerForObject implementation. Doctrine expects the entity class name, not the object. The current code throw a Fatal Error.
Commits
-------
df57e0f [Validator] Added strict option to ChoiceConstraint.
Discussion
----------
[Validator] Added strict option to ChoiceConstraint.
By default, ChoiceValidator was ensuring strict type when checking if value is present in choices. This behavior is a problem when you want to validate against integer values. As all data you will receive from a request will be typed as a string, you won't be able to validate these numeric values.
This patch solves this.
In order for being nice to developers, I've set "strict" to false by default.
Commits
-------
6c736c9 Fix RedirectResponse HTML indentation and constructor phpDoc
Discussion
----------
Fix RedirectResponse HTML indentation and constructor phpDoc
Removes extra indents from the redirection response content.