diff options
| author | lain <lain@soykaf.club> | 2020-06-13 11:47:34 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-13 11:48:02 +0200 |
| commit | 9bfb3754c1bc0d1033afda97f2884e721d1ab3d8 (patch) | |
| tree | 0a2ee74b3757f4e0661d4f854fd181bf8c05aed4 /src/lib | |
| parent | 33c1adbef4b5513605b21797860e7fd60070864c (diff) | |
ServiceWorker: Use loader to only notification messages.
This keeps the translation size very small and makes it easy to
integrate all the languages, as dynamically loading them isn't
easy in the service worker.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/notification-i18n-loader.js | 9 |
1 files changed, 9 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..a61755c8 --- /dev/null +++ b/src/lib/notification-i18n-loader.js @@ -0,0 +1,9 @@ +// This somewhat mysterious module +module.exports = function(source) { + var object = JSON.parse(source) + var smol = { + notifications: object.notifications || {} + } + + return JSON.stringify(smol) +} |
