#!/bin/bash

set -euo pipefail

id="$1"
translation="$2"

for file in *.json; do
  head -n -2 "${file}" > "${file}.tmp"
  echo -e "  },\n  {\n    \"id\": \"${id}\",\n    \"translation\": \"${translation}\"\n  }\n]" >> "${file}.tmp"
  mv "${file}.tmp" "${file}"
done

Add script to add new translation to everyfile
Add script to add new translation to everyfile
