From de82ce18f432f1089c610af5fe6572406e5ec201 Mon Sep 17 00:00:00 2001 From: chaim Date: Sat, 4 Apr 2026 20:41:44 +0000 Subject: [PATCH] Add Hebrew RTL patch script --- patch-html.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 patch-html.sh diff --git a/patch-html.sh b/patch-html.sh new file mode 100644 index 0000000..087ef73 --- /dev/null +++ b/patch-html.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# patch-html.sh - Inject Hebrew RTL + translation into Paperclip UI +set -e + +# Find the ui-dist directory in the global npm install +UI_DIR=$(find /usr/local/lib/node_modules/paperclipai -name "ui-dist" -type d | head -1) + +if [ -z "$UI_DIR" ]; then + echo "ERROR: Could not find Paperclip ui-dist directory" + exit 1 +fi + +echo "Found ui-dist at: $UI_DIR" + +# Copy assets +cp /tmp/rtl-override.css "$UI_DIR/assets/rtl-override.css" +cp /tmp/translate-he.js "$UI_DIR/assets/translate-he.js" + +# Patch index.html: +# 1. Set dir="rtl" and lang="he" +sed -i 's/ +sed -i 's||\n\n|' "$UI_DIR/index.html" + +# 3. Update page title +sed -i 's|Paperclip|Paperclip - פייפרקליפ|' "$UI_DIR/index.html" + +echo "Hebrew RTL patch applied successfully" +echo "Patched files:" +echo " - $UI_DIR/index.html" +echo " - $UI_DIR/assets/rtl-override.css" +echo " - $UI_DIR/assets/translate-he.js" \ No newline at end of file