Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jfsimon
Copy link
Contributor

@jfsimon jfsimon commented Mar 14, 2013

This PR adds to suported languages the first segment of all compouds languages codes.
When receiving Accept-Language: en-us header, accepted languages will now be en, en_US.

This should not be a BC break as most browsers already send the long and short versions of language codes... but some dont.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #6928

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after if

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

fabpot added a commit that referenced this pull request Mar 18, 2013
This PR was squashed before being merged into the 2.1 branch (closes #7378).

Commits
-------

17dc2ff [HttpRequest] fixes Request::getLanguages() bug

Discussion
----------

[HttpRequest] fixes Request::getLanguages() bug

This PR adds to suported languages the first segment of all compouds languages codes.
When receiving `Accept-Language: en-us` header, accepted languages will now be `en, en_US`.

This should not be a BC break as most browsers already send the long **and** short versions of language codes... but some dont.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6928
@fabpot fabpot closed this Mar 18, 2013
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfsimon This is a BC break as en would now be preferred over en_US here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof oh, good one! I have not thought about the order...

jfsimon added a commit to jfsimon/symfony that referenced this pull request Mar 20, 2013
This reverts commit 70ec4f6, reversing
changes made to 3a03f3e.
fabpot added a commit that referenced this pull request Mar 20, 2013
This PR was merged into the 2.1 branch.

Commits
-------

c928ddc [HttpFoudantion] fixed Request::getPreferredLanguage()
839c78a Revert "merged branch jfsimon/issue-6928 (PR #7378)"

Discussion
----------

[HttpFoundation] fixed Request::getPreferredLanguage()

Previous PR #7378 was wrong and adding BC break. Resolution for short languages codes is now done in `Request::getPreferredLanguage()` method.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7378
fabpot added a commit that referenced this pull request Mar 23, 2013
* 2.1:
  #7106 - fix for ZTS builds
  Added '@@' escaping strategy for YamlFileLoader and YamlDumper
  [Yaml] fixed bugs with folded scalar parsing
  [Form] made DefaultCsrfProvider using session_status() when available
  Added unit tests to Dumper
  Update .travis.yml (closes #7355)
  [HttpFoudantion] fixed Request::getPreferredLanguage()
  Revert "merged branch jfsimon/issue-6928 (PR #7378)"
  Routing issue with installation in a sub-directory ref: #7129

Conflicts:
	.travis.yml
	src/Symfony/Bundle/FrameworkBundle/Routing/Router.php
	src/Symfony/Component/Routing/RouteCollection.php
fabpot added a commit that referenced this pull request Mar 23, 2013
* 2.2:
  #7106 - fix for ZTS builds
  Added '@@' escaping strategy for YamlFileLoader and YamlDumper
  [Yaml] fixed bugs with folded scalar parsing
  [Form] made DefaultCsrfProvider using session_status() when available
  Added unit tests to Dumper
  Update .travis.yml (closes #7355)
  [HttpFoudantion] fixed Request::getPreferredLanguage()
  Revert "merged branch jfsimon/issue-6928 (PR #7378)"
  Routing issue with installation in a sub-directory ref: #7129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants