From: Dessalines Date: Wed, 21 Apr 2021 14:27:06 +0000 (-0400) Subject: Merge branch 'main' into unused-langs-check X-Git-Url: http://these/git/?a=commitdiff_plain;h=1bd2473cdc65357c18a45c8f1afb532c898b66f6;hp=5da89c083255cf589dc6bf9520c83671808d1e62;p=lemmy-ui.git Merge branch 'main' into unused-langs-check --- diff --git a/accessibility_tests.sh b/accessibility_tests.sh index 0161e6d..7bf0c8f 100755 --- a/accessibility_tests.sh +++ b/accessibility_tests.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e ignores="WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail" base_url="http://192.168.50.60:1234" diff --git a/deploy.sh b/deploy.sh index 58d1d7f..57aa818 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e new_tag="$1" diff --git a/lemmy-translations b/lemmy-translations index f36cf23..764d35d 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit f36cf2332878286378303d0ce9629728b3889ac9 +Subproject commit 764d35d913453d1fd8eeec6007f0d94f59c8b0ee diff --git a/src/shared/i18next.ts b/src/shared/i18next.ts index ebfa7dd..0bb85ae 100644 --- a/src/shared/i18next.ts +++ b/src/shared/i18next.ts @@ -33,6 +33,7 @@ import { oc } from "./translations/oc"; import { hr } from "./translations/hr"; import { th } from "./translations/th"; import { bg } from "./translations/bg"; +import { ar } from "./translations/ar"; import { ko } from "./translations/ko"; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 @@ -70,7 +71,8 @@ const resources = { hr, th, bg, - ko, + ar, + ko }; function format(value: any, format: any): any { diff --git a/test_deploy.sh b/test_deploy.sh index 7cf2e3c..db2aed0 100755 --- a/test_deploy.sh +++ b/test_deploy.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e sudo docker build . --tag dessalines/lemmy-ui:dev sudo docker push dessalines/lemmy-ui:dev diff --git a/update_translations.sh b/update_translations.sh index cb19834..677eee9 100755 --- a/update_translations.sh +++ b/update_translations.sh @@ -1,9 +1,20 @@ #!/bin/bash +set -e + pushd ../lemmy-translations git fetch weblate git merge weblate/main git push popd + +# look for unused translations +for langfile in lemmy-translations/translations/*.json; do + lang=$(basename $langfile .json) + if ! grep -q "\"./translations/$lang\"" src/shared/i18next.ts; then + echo "Unused language $lang" + fi +done + git submodule update --remote git add lemmy-translations git commit -m"Updating translations."