Stirling-PDF/scripts/replace_translation_line.sh
Eric b13b925bf0
Fix pdfa conversion (#1907)
* fix: use gs to convert to pdfa and return output by reading file as bytes

* feat: update translation files for pdfToPDFA.credit

* Hardening suggestions for Stirling-PDF / fix_pdfa_conversion (#1908)

Switch order of literals to prevent NullPointerException

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
2024-09-15 18:01:33 +01:00

10 lines
246 B
Bash

#!/bin/bash
translation_key="pdfToPDFA.credit"
old_value="OCRmyPDF"
new_value="ghostscript"
for file in ../src/main/resources/messages_*.properties; do
sed -i "/^$translation_key=/s/$old_value/$new_value/" "$file"
echo "Updated $file"
done