From a5e446a4a0bf567e2c293cb68f84ca141f527a21 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 21 Dec 2022 22:13:14 +0100 Subject: Change locales file generation to use JSON sources (#2028) * Change locales file generation to use JSON sources Instead of inheriting in JS files, set locale inheritance in the theme's YML file, and inherit in the generated locale file, rather than the source file. * Convert glitch-soc JS translation files to JSON Obtained running the following: ```sh sed -i -z "s/import inherited from '.*';\s*\nconst messages = //" *.js sed -i "s/\s*\/\/.*//" *.js sed -i -z "s/;\s*export default .*/\n/" *.js for i in *.js; do json5 $i | json_pp > ${i}on; done ``` * Change `yarn manage:translations` to exclude any translation already defined upstream * Run yarn manage:translations --- app/javascript/flavours/glitch/locales/nl.js | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 app/javascript/flavours/glitch/locales/nl.js (limited to 'app/javascript/flavours/glitch/locales/nl.js') diff --git a/app/javascript/flavours/glitch/locales/nl.js b/app/javascript/flavours/glitch/locales/nl.js deleted file mode 100644 index 17c371c58..000000000 --- a/app/javascript/flavours/glitch/locales/nl.js +++ /dev/null @@ -1,7 +0,0 @@ -import inherited from 'mastodon/locales/nl.json'; - -const messages = { - // No translations available. -}; - -export default Object.assign({}, inherited, messages); -- cgit