diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-29 09:16:00 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-29 09:16:00 +0300 |
| commit | 12519a54b55140a3e5f76e67ac53914654c2a8b0 (patch) | |
| tree | 53ca006f6350008f8d38d2c3a1bf877c29389bf8 /src/lib/notification-i18n-loader.js | |
| parent | 08444c390348076231f15bd84b613cf39380bb72 (diff) | |
| parent | d0c9aef668fdfca2cefbd795ab3d258cbb1ea42b (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into develop
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) +} |
