about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/locales/sr.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-21 22:13:14 +0100
committerGitHub <noreply@github.com>2022-12-21 22:13:14 +0100
commita5e446a4a0bf567e2c293cb68f84ca141f527a21 (patch)
treed295cf11d3341576a5c8f76ff9642ff167fe1a0c /app/javascript/flavours/glitch/locales/sr.js
parent18bcabf26a744703660ae403014209fa78dd6c56 (diff)
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
Diffstat (limited to 'app/javascript/flavours/glitch/locales/sr.js')
-rw-r--r--app/javascript/flavours/glitch/locales/sr.js7
1 files changed, 0 insertions, 7 deletions
diff --git a/app/javascript/flavours/glitch/locales/sr.js b/app/javascript/flavours/glitch/locales/sr.js
deleted file mode 100644
index 8793d8d1e..000000000
--- a/app/javascript/flavours/glitch/locales/sr.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import inherited from 'mastodon/locales/sr.json';
-
-const messages = {
-  //  No translations available.
-};
-
-export default Object.assign({}, inherited, messages);