Skip to content

Conversation

@stefanorosanelli
Copy link
Member

This PR fixes #12

@codecov-io
Copy link

codecov-io commented Nov 28, 2018

Codecov Report

Merging #13 into master will increase coverage by 1.72%.
The diff coverage is 70%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #13      +/-   ##
============================================
+ Coverage      36.6%   38.32%   +1.72%     
- Complexity       81       91      +10     
============================================
  Files             3        3              
  Lines           265      287      +22     
============================================
+ Hits             97      110      +13     
- Misses          168      177       +9
Impacted Files Coverage Δ Complexity Δ
src/Middleware/I18nMiddleware.php 100% <100%> (ø) 23 <3> (+5) ⬆️
src/View/Helper/I18nHelper.php 81.66% <52.63%> (-14.26%) 31 <10> (+5)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0fab663...d967a08. Read the comment docs.

if ($request->getUri()->getQuery()) {
$url .= '?' . $request->getUri()->getQuery();

return $path . (!empty($query) ? '?' . $query : '');
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer

if (!empty($query)) {
    $path .= sprintf('?%s', $query);
}

return $path;

* Define when I18n rules are applied with `/:lang` prefix:
* - 'match': array of URL paths, if there's an exact match rule is applied
* - 'startWith': array of URL paths, if current URL path starts with one of these rule is applied
* - 'switchLangUrl': reserved URL (for example `/lang`) used to switch lang and redirect to custom URL.
Copy link
Member

Choose a reason for hiding this comment

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

[minor] we can change and redirect to custom URL. to and redirect to referer URL.

@batopa batopa merged commit c72de85 into master Nov 29, 2018
@batopa batopa deleted the issue/12-change-lang-url branch November 29, 2018 10:05
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.

Change language URL

4 participants