diff options
| author | lain <lain@soykaf.club> | 2020-06-24 17:50:05 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-24 17:50:05 +0200 |
| commit | 143da55c56a932e4e88b4959511c59f1d73d37b9 (patch) | |
| tree | 598cce65273b759d7b064fceaaab20b172d541d3 /src/lib/notification-i18n-loader.js | |
| parent | 7dfa734665bbb74058e221af0f71a88b4f37936d (diff) | |
| parent | bbb91d8ae3f1c3d5374de7610e723e63121e8222 (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into remove-twitterapi-config
Diffstat (limited to 'src/lib/notification-i18n-loader.js')
| -rw-r--r-- | src/lib/notification-i18n-loader.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/notification-i18n-loader.js b/src/lib/notification-i18n-loader.js new file mode 100644 index 00000000..71f9156a --- /dev/null +++ b/src/lib/notification-i18n-loader.js @@ -0,0 +1,12 @@ +// This somewhat mysterious module will load a json string +// and then extract only the 'notifications' part. This is +// meant to be used to load the partial i18n we need for +// the service worker. +module.exports = function (source) { + var object = JSON.parse(source) + var smol = { + notifications: object.notifications || {} + } + + return JSON.stringify(smol) +} |
