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

Phantom needs locale headers #24770

Closed
jen-huang opened this issue Oct 29, 2018 · 2 comments
Closed

Phantom needs locale headers #24770

jen-huang opened this issue Oct 29, 2018 · 2 comments
Labels
chore Project:i18n Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@jen-huang
Copy link
Contributor

Currently, when running reporting tests with Phantom, there are no locale headers. This causes an issue with the new i18n module which supports FormatJS syntax. For example this uses FormatJS selectordinal:

export function getOrdinalValue(number) {
  return i18n.translate('xpack.rollupJobs.util.number.ordinal', {
    defaultMessage: '{number, selectordinal, one{#st} two{#nd} few{#rd} other{#th}}',
    values: { number },
  });
}

This code broke reporting tests (even though this code was not touched by those tests) until we switched it back to non-localized strings.

(FYI, Chromium ran the tests with the i18n code just fine.)

@jen-huang jen-huang added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Project:i18n triage_needed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 29, 2018
@azasypkin
Copy link
Member

Hi @jen-huang, are you still experiencing this issue on master? It feels like the same issue that has been fixed in #25465.

@azasypkin
Copy link
Member

I believe we've fixed the issue you were observing, there is only one outstanding known Phantom & i18n issue: #27373 (Kibana 6.6 won't be affected, 6.7 isn't affected yet and in 7.0 we'll remove PhantomJS).

So I'm closing this one, but feel free to re-open if you notice anything suspicious in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Project:i18n Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants