mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-22 04:11:15 +00:00
Merge pull request #47 from LemmyNet/unused-langs-check
Add check for unused languages in deploy.sh
This commit is contained in:
commit
968eff6b32
2 changed files with 13 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
git submodule update --remote
|
||||
git add lemmy-docs
|
||||
|
@ -7,6 +8,14 @@ git add joinlemmy-translations
|
|||
git commit -m"Updating translations"
|
||||
git push
|
||||
|
||||
# look for unused translations
|
||||
for langfile in joinlemmy-translations/translations/*.json; do
|
||||
lang=$(basename $langfile .json)
|
||||
if ! grep -q "\"./translations/$lang\"" src/shared/i18next.ts; then
|
||||
echo "Unused language $lang"
|
||||
fi
|
||||
done
|
||||
|
||||
new_tag="$1"
|
||||
|
||||
git tag $new_tag
|
||||
|
|
|
@ -13,6 +13,8 @@ import { fr } from "./translations/fr";
|
|||
import { el } from "./translations/el";
|
||||
import { ko } from "./translations/ko";
|
||||
import { pl } from "./translations/pl";
|
||||
import { ar } from "./translations/ar";
|
||||
import { eo } from "./translations/eo";
|
||||
|
||||
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
|
||||
const resources = {
|
||||
|
@ -28,6 +30,8 @@ const resources = {
|
|||
el,
|
||||
ko,
|
||||
pl,
|
||||
ar,
|
||||
eo,
|
||||
};
|
||||
|
||||
function format(value: any, format: any): any {
|
||||
|
|
Loading…
Reference in a new issue