chore(i18n-pull): accept empty en.json

This commit is contained in:
Lemmy
2026-07-19 22:50:27 -04:00
parent f23a7e9b50
commit d253a9430c
+12 -4
View File
@@ -90,11 +90,19 @@ done
shopt -s nullglob shopt -s nullglob
MANIFESTS=("$REPO_ROOT"/*/plugin.toml) MANIFESTS=("$REPO_ROOT"/*/plugin.toml)
for manifest in "${MANIFESTS[@]}"; do for manifest in "${MANIFESTS[@]}"; do
plugin="$(basename -- "$(dirname -- "$manifest")")" plugin_dir="$(dirname -- "$manifest")"
if ! jq -e --arg plugin "$plugin" '.en[$plugin] | type == "object"' "$RESPONSE_FILE" >/dev/null; then plugin="$(basename -- "$plugin_dir")"
echo "Error: English payload is missing plugin: $plugin" >&2 if jq -e --arg plugin "$plugin" '.en[$plugin] | type == "object"' "$RESPONSE_FILE" >/dev/null; then
exit 1 continue
fi fi
english_file="$plugin_dir/translations/en.json"
if [[ -f "$english_file" ]] && jq -e 'type == "object" and length == 0' "$english_file" >/dev/null; then
continue
fi
echo "Error: English payload is missing plugin: $plugin" >&2
exit 1
done done
while IFS= read -r -d '' staged_file; do while IFS= read -r -d '' staged_file; do