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

MINOR Update add_i18n_javascript to load lowercase-dash language files #8726

Merged

Conversation

maxime-rainville
Copy link
Contributor

@maxime-rainville maxime-rainville commented Jan 15, 2019

We need a way to load MomentJS local files because of this issue silverstripe/silverstripe-admin#791.

MomentJS file formats are like de-de, while our current format is de_DE.js.

This update just add a few extra format to check for.

Parent issue

@maxime-rainville maxime-rainville force-pushed the pulls/4/extra-locale-formats branch from 9ee85ae to c6214b8 Compare January 15, 2019 02:04
@maxime-rainville
Copy link
Contributor Author

Unit tests have been added and typo has been corrected.

@maxime-rainville maxime-rainville dismissed unclecheese’s stale review January 16, 2019 02:27

The typo has been fixed.

@maxime-rainville maxime-rainville merged commit 074cf04 into silverstripe:4 Jan 16, 2019
@maxime-rainville maxime-rainville deleted the pulls/4/extra-locale-formats branch January 16, 2019 02:28
$backend->add_i18n_javascript('i18n');

$actual = $backend->getJavascript();

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove duplicate blank lines.

@@ -1109,4 +1110,77 @@ protected function getBackendFiles($backend, $type)
}
return array();
}

Copy link
Contributor

Choose a reason for hiding this comment

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

It might pay to check that we don't load locales that are irrelevant.

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.

None yet

3 participants