Merge pull request #3134 from overleaf/as-react-i18n

Load translations in the frontend using react-i18next

GitOrigin-RevId: 4e6ab1befcd783db2b3255bb4d04dc18e710a3dc
This commit is contained in:
Alasdair Smith
2020-09-05 02:05:04 +00:00
committed by Copybot
parent 473e9d32f2
commit 617fe024bc
12 changed files with 208 additions and 14 deletions
+10
View File
@@ -140,6 +140,16 @@ module.exports = {
runtimePath: 'handlebars/runtime'
}
},
{
// Load translations files with custom loader, to extract and apply
// fallbacks
test: /locales\/(\w{2}(-\w{2})?)\.json$/,
use: [
{
loader: path.resolve('frontend/translations-loader.js')
}
]
},
// Allow for injection of modules dependencies by reading contents of
// modules directory and adding necessary dependencies
{