]> Untitled Git - lemmy-ui.git/commitdiff
Merge branch 'main' into unused-langs-check
authorDessalines <tyhou13@gmx.com>
Wed, 21 Apr 2021 14:27:06 +0000 (10:27 -0400)
committerDessalines <tyhou13@gmx.com>
Wed, 21 Apr 2021 14:27:06 +0000 (10:27 -0400)
accessibility_tests.sh
deploy.sh
lemmy-translations
src/shared/i18next.ts
test_deploy.sh
update_translations.sh

index 0161e6d593959482358a7401210c6d6670b61949..7bf0c8fadb1bd4441cd32cef3026d567db4485ee 100755 (executable)
@@ -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"
index 58d1d7fb9c796b19f9bd7bc9dddc2c0112e1977e..57aa818910e8926686a893bae53cafc675a677b0 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+set -e
 
 new_tag="$1"
 
index f36cf2332878286378303d0ce9629728b3889ac9..764d35d913453d1fd8eeec6007f0d94f59c8b0ee 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f36cf2332878286378303d0ce9629728b3889ac9
+Subproject commit 764d35d913453d1fd8eeec6007f0d94f59c8b0ee
index ebfa7ddee1c42e9b2f0d899f4e1acf1508066e0c..0bb85aea7853a5dc7f8d671030a711cb219649b6 100644 (file)
@@ -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 {
index 7cf2e3cad48353218cc82e33779be209d01ce272..db2aed0126caa45ca07924cb842185357daf128d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+set -e
 
 sudo docker build . --tag dessalines/lemmy-ui:dev
 sudo docker push dessalines/lemmy-ui:dev
index cb19834b617fd761d498d6860b97d6fe3416ce22..677eee96a7c95ccdcb9b18ff4967215bb0c74042 100755 (executable)
@@ -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."