Skip to content
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

Translate time zone label according to current locale in Stores > Configuration > Advanced Reporting #13408

Conversation

adrian-martinez-interactiv4
Copy link
Contributor

Time zone label gets translated according to operating system settings, instead of using current locale:
captura de pantalla 2018-01-29 a las 4 15 10

This even can make some functional tests fail, when executed on machines with different locale options, see \Magento\Analytics\Test\Constraint\AssertConfigAnalyticsSendingTimeAndZone::processAssert:

        \PHPUnit_Framework_Assert::assertEquals(
            'Eastern European Standard Time (Europe/Kiev)',
            $configAnalytics->getAnalyticsForm()->getTimeZone()
        );

Description

Adapt \Magento\Analytics\Block\Adminhtml\System\Config\CollectionTimeLabel::render method to use current locale to render time zone label, as done in \Magento\Framework\Locale\TranslatedLists::getOptionTimezones

Fixed Issues (if relevant)

  1. None AFAIK

Manual testing scenarios

  1. Change current admin user interface locale to something different of English (United States), like Spanish (Spain)
  2. In section Stores > Configuration > Advanced Reporting, you should see translated comment according to current locale.

Expected:
captura de pantalla 2018-01-29 a las 4 07 22

Current:
captura de pantalla 2018-01-29 a las 4 08 15

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

…Label::render method to use current locale to render time zone label, as done in \Magento\Framework\Locale\TranslatedLists::getOptionTimezones
@dmanners dmanners self-assigned this Jan 29, 2018
@dmanners dmanners added this to the January 2018 milestone Jan 29, 2018
magento-team pushed a commit that referenced this pull request Jan 29, 2018
…in Stores > Configuration > Advanced Reporting #13408
@magento-engcom-team magento-engcom-team merged commit ca460ec into magento:2.2-develop Jan 29, 2018
@adrian-martinez-interactiv4 adrian-martinez-interactiv4 deleted the FR22#ANALYTICS-COLLECTION-TIME-LABEL-TRANSLATION branch January 29, 2018 22:50
This pull request was closed.
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.

3 participants