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

EZP-29961: Add preferred language value to User Preferences #2516

Merged
merged 1 commit into from Feb 7, 2019

Conversation

@mikadamczyk
Copy link
Contributor

mikadamczyk commented Jan 7, 2019

Question Answer
JIRA issue EZP-29961
Improvement yes
New feature yes
Target version master
BC breaks no
Tests pass yes
Doc needed no

relates to ezsystems/ezplatform-admin-ui#774

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@mikadamczyk mikadamczyk self-assigned this Jan 7, 2019

@mikadamczyk mikadamczyk requested review from adamwojs , alongosz and ViniTou Jan 7, 2019

@mikadamczyk mikadamczyk force-pushed the mikadamczyk:EZP-29961 branch from 90a81bd to 5731a70 Jan 7, 2019

@adamwojs

This comment has been minimized.

Copy link
Member

adamwojs commented Jan 7, 2019

CI failure (unit tests) seem to be related to your changes 😉

@mikadamczyk mikadamczyk force-pushed the mikadamczyk:EZP-29961 branch from 5731a70 to e7b0185 Jan 8, 2019

@mikadamczyk

This comment has been minimized.

Copy link
Contributor Author

mikadamczyk commented Jan 8, 2019

@adamwojs thanks, fixed :)

@ezsystems ezsystems deleted a comment from ezrobot Jan 8, 2019

@@ -59,7 +74,7 @@ public function getPreferredLanguages(): array
$locale = strtolower($locale);
if (isset($this->languageCodesMap[$locale])) {
$languageCodes = array_merge($languageCodes, $this->languageCodesMap[$locale]);
} elseif (preg_match('/^([a-z]{3})-([a-z]{2})$/', $locale, $matches)) {
} elseif (preg_match('/^([a-z]{3})_([a-z]{2})$/', $locale, $matches)) {

This comment has been minimized.

@alongosz

alongosz Feb 1, 2019

Member

Given this will never occur in normal environment, but just covers test case I've added some time ago, I think we should drop it and drop pol-PL in specific data providers.

        foreach ($this->getPreferredLocales() as $locale) {
            $locale = strtolower($locale);
            if (!isset($this->languageCodesMap[$locale])) {
                continue;
            }

            $languageCodes = array_merge($languageCodes, $this->languageCodesMap[$locale]);
        }

@mikadamczyk mikadamczyk force-pushed the mikadamczyk:EZP-29961 branch 2 times, most recently from b716072 to b707b6e Feb 1, 2019

@mikadamczyk mikadamczyk force-pushed the mikadamczyk:EZP-29961 branch from b707b6e to 85ccb54 Feb 1, 2019

@mikadamczyk mikadamczyk force-pushed the mikadamczyk:EZP-29961 branch from 85ccb54 to bfb46b4 Feb 1, 2019

@barbaragr barbaragr self-assigned this Feb 4, 2019

@barbaragr barbaragr added QA approved and removed Ready for QA labels Feb 5, 2019

@lserwatka lserwatka merged commit 2365bec into ezsystems:master Feb 7, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
ezrobot/phpcsfixer Code review by ezrobot
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment