diff options
| author | Mark Felder <feld@FreeBSD.org> | 2020-06-25 15:28:17 -0500 |
|---|---|---|
| committer | Mark Felder <feld@FreeBSD.org> | 2020-06-25 15:28:17 -0500 |
| commit | 199fc9351d2db400a966750a23c2b3077345a383 (patch) | |
| tree | 657c01da3db0bcace07c7003d61456c5940aa7d0 /src/lib/notification-i18n-loader.js | |
| parent | b8350423d97cf81708795ec6383803413e7bff98 (diff) | |
| parent | bbb91d8ae3f1c3d5374de7610e723e63121e8222 (diff) | |
Merge branch 'develop' into refactor/notification_settings
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) +} |
