Skip to content

[Routing] Add fallback to cultureless locale for internationalized routes #27957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Jul 15, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #27938
License MIT
Doc PR symfony/symfony-docs#10108

Please check the related issue for the context.

TODO :

  • Update CHANGELOG
  • Update documentation

@@ -46,8 +46,8 @@ protected function setUp()

$this->routeCollection = new RouteCollection();
$this->generatorDumper = new PhpGeneratorDumper($this->routeCollection);
$this->testTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.php';
$this->largeTestTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.large.php';
$this->testTmpFilepath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.php';
Copy link
Contributor Author

@fancyweb fancyweb Jul 15, 2018

Choose a reason for hiding this comment

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

These changes were applied by the fabbot patch. I guess I should revert them ?

@fancyweb fancyweb force-pushed the feat-i18n-routing-locale-fallback branch from 3ae6eaa to bd5dc07 Compare July 21, 2018 10:44
@fancyweb fancyweb changed the title [WIP][Routing] Add locale fallback to internationalized routes [Routing] Add locale fallback to internationalized routes Jul 21, 2018
@nicolas-grekas nicolas-grekas added this to the next milestone Jul 23, 2018
@nicolas-grekas nicolas-grekas changed the title [Routing] Add locale fallback to internationalized routes [Routing] Add fallback to cultureless locale for internationalized routes Jul 23, 2018
@nicolas-grekas nicolas-grekas force-pushed the feat-i18n-routing-locale-fallback branch from bd5dc07 to bb9ccbf Compare July 23, 2018 11:26
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(just updated the implementation to make it shorter)

@fancyweb
Copy link
Contributor Author

@nicolas-grekas Great job on making this shorter ! Is there any performance impact to "reprocess" everything everytime you generate an url ?

@nicolas-grekas
Copy link
Member

performance impact to "reprocess

the only impact this can have are at most two extra calls to strstr. I think that's OK :)

@nicolas-grekas
Copy link
Member

(please fix fabbot issues)

@nicolas-grekas nicolas-grekas force-pushed the feat-i18n-routing-locale-fallback branch from bb9ccbf to fd2e3c3 Compare August 10, 2018 07:14
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

@nicolas-grekas nicolas-grekas merged commit fd2e3c3 into symfony:master Aug 10, 2018
nicolas-grekas added a commit that referenced this pull request Aug 10, 2018
…nationalized routes (fancyweb)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[Routing] Add fallback to cultureless locale for internationalized routes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27938
| License       | MIT
| Doc PR        | symfony/symfony-docs#10108

Please check the related issue for the context.

TODO :
- [x] Update CHANGELOG
- [x] Update documentation

Commits
-------

fd2e3c3 [Routing] Add fallback to cultureless locale for internationalized routes
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Sep 4, 2018
…s (Thomas Calvet, javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

[Routing] Add locale fallback to internationalized routes

Related PR : symfony/symfony#27957

Commits
-------

02cc739 Minor reword
c15df9d [Routing] Add locale fallback to internationalized routes
@ampaze
Copy link
Contributor

ampaze commented Oct 5, 2018

Thanks from me as well.

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.2 Nov 1, 2018
This was referenced Nov 3, 2018
@fancyweb fancyweb deleted the feat-i18n-routing-locale-fallback branch August 9, 2019 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants