@designcrowd/fe-shared-lib 1.2.6-ml-291-1 → 1.2.6-ml-291-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.6-ml-291-1",
3
+ "version": "1.2.6-ml-291-2",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -73,7 +73,7 @@
73
73
  </div>
74
74
  </template>
75
75
  <script>
76
- import i18next from 'i18next';
76
+ import { getCurrentLocale } from '../../../useSharedLibTranslate';
77
77
  import HelloBar from '../../../../src/atoms/components/HelloBar/HelloBar.vue';
78
78
  import SubmissionButton from './SubmissionButton.vue';
79
79
 
@@ -144,7 +144,7 @@ export default {
144
144
  },
145
145
  computed: {
146
146
  currentLocale() {
147
- return i18next.language || 'en-US';
147
+ return getCurrentLocale();
148
148
  },
149
149
  getRedirectToSignInUrl() {
150
150
  const url = new URL(`https://${window.location.host}${this.signInUrl}`);
@@ -64,7 +64,7 @@
64
64
  </div>
65
65
  </template>
66
66
  <script>
67
- import i18next from 'i18next';
67
+ import { getCurrentLocale } from '../../../useSharedLibTranslate';
68
68
  import HelloBar from '../../../../src/atoms/components/HelloBar/HelloBar.vue';
69
69
  import SubmissionButton from './SubmissionButton.vue';
70
70
 
@@ -138,7 +138,7 @@ export default {
138
138
  },
139
139
  computed: {
140
140
  currentLocale() {
141
- return i18next.language || 'en-US';
141
+ return getCurrentLocale();
142
142
  },
143
143
  },
144
144
  methods: {
@@ -35,4 +35,8 @@ const tr = (key, valuesToInterpolate = {}) => {
35
35
  return translated;
36
36
  };
37
37
 
38
- export { setSharedLibLocaleAsync, tr };
38
+ const getCurrentLocale = () => {
39
+ return i18next.language || 'en-US';
40
+ };
41
+
42
+ export { setSharedLibLocaleAsync, tr, getCurrentLocale };