Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-04-18 18:29:22 +0300
committerPhil Hughes <me@iamphill.com>2017-04-18 18:29:22 +0300
commit372841975feace348ffdcc14819b9c9a9da8b181 (patch)
treee14eceb2a45b3c0423eb2767a3147736cf18561f
parentb0df1ed4884a16c5c45800031667e0dd3251c978 (diff)
Default the language to en - more useful for specs
-rw-r--r--app/assets/javascripts/locale/index.js2
-rw-r--r--spec/javascripts/cycle_analytics/limit_warning_component_spec.js3
2 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
index 0feb9eb5d43..56791968e53 100644
--- a/app/assets/javascripts/locale/index.js
+++ b/app/assets/javascripts/locale/index.js
@@ -9,7 +9,7 @@ const locales = {
en,
};
-const lang = document.querySelector('html').getAttribute('lang');
+const lang = document.querySelector('html').getAttribute('lang') || 'en';
export { lang };
export default new Jed(locales[lang]);
diff --git a/spec/javascripts/cycle_analytics/limit_warning_component_spec.js b/spec/javascripts/cycle_analytics/limit_warning_component_spec.js
index 50000c5a5f5..2fb9eb0ca85 100644
--- a/spec/javascripts/cycle_analytics/limit_warning_component_spec.js
+++ b/spec/javascripts/cycle_analytics/limit_warning_component_spec.js
@@ -1,6 +1,9 @@
import Vue from 'vue';
+import Translate from '~/vue_shared/translate';
import limitWarningComp from '~/cycle_analytics/components/limit_warning_component';
+Vue.use(Translate);
+
describe('Limit warning component', () => {
let component;
let LimitWarningComponent;