Skip to content

Commit

Permalink
fetched translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjeev Lakhwani committed Dec 12, 2022
1 parent 38af2ed commit c3ca5fd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/public/locales/en/translation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import def_trans_en from './default_translation_en.json';
import trans_en from './translation_en.json';
import axios from 'axios';

const trans_en = await axios
.get('http://localhost:8090/public/locales/en/translation_en.json')
.then((response) => response.data);

const translation = {
// Default Translation
Expand Down
6 changes: 5 additions & 1 deletion src/public/locales/fr/translation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import def_fr_trans from './default_translation_fr.json';
import fr_trans from './translation_fr.json';
import axios from 'axios';

const fr_trans = await axios
.get('http://localhost:8090/public/locales/fr/translation_fr.json')
.then((response) => response.data);

const translation = {
// Default Translation
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const config = {
optimization: {
runtimeChunk: 'single',
},
experiments: {
topLevelAwait: true,
},
};

module.exports = (_env, argv) => {
Expand Down

0 comments on commit c3ca5fd

Please sign in to comment.