From 3c42cbb6d0712ce70aef9235e16959ddf1c90e13 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sun, 22 Sep 2024 18:28:36 +0200 Subject: [PATCH] Updating translations for new expr-eval --- LogarithmPlotter/i18n/lp_de.ts | 84 ++++---- LogarithmPlotter/i18n/lp_en.ts | 84 ++++---- LogarithmPlotter/i18n/lp_es.ts | 94 +++++---- LogarithmPlotter/i18n/lp_fr.ts | 84 ++++---- LogarithmPlotter/i18n/lp_hu.ts | 84 ++++---- LogarithmPlotter/i18n/lp_nb_NO.ts | 298 +++++++++++++-------------- LogarithmPlotter/i18n/lp_template.ts | 298 +++++++++++++-------------- LogarithmPlotter/i18n/update.sh | 37 +++- 8 files changed, 549 insertions(+), 514 deletions(-) diff --git a/LogarithmPlotter/i18n/lp_de.ts b/LogarithmPlotter/i18n/lp_de.ts index c5cd4cb..f868490 100644 --- a/LogarithmPlotter/i18n/lp_de.ts +++ b/LogarithmPlotter/i18n/lp_de.ts @@ -917,62 +917,60 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" error - - + + Cannot find property %1 of object %2. Eigenschaft %1 von Objekt %2 kann nicht gefunden werden. - + Undefined variable %1. Die Variable %1 ist nicht definiert. - + In order to be executed, object %1 must have at least one argument. Um als Funktion verwendet zu werden, benötigt das Objekt %1 mindestens ein Parameter. - + %1 cannot be executed. %1 ist keine Formel. - - - + + + Invalid expression. Ungültiger Ausdruck. - + Invalid expression (parity). Ungültiger Ausdruck (Parität). - + Unknown character "%1". Unbekanntes Schriftzeichen "%1". - - + + Illegal escape sequence: %1. Unzulässige Escapesequenz: %1. - - Parse error [%1:%2]: %3 - Analysefehler [%1:%2]: %3 + Analysefehler [%1:%2]: %3 - + Expected %1 Erwartet %1 - + Unexpected %1 Unerwartetes %1 @@ -985,76 +983,82 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Erwartete Variable für Zuweisung. - + + + Parse error [position %1]: %2 + + + + Unexpected ".": member access is not permitted Unerwartetes ".": Mitgliederzugriff ist nicht erlaubt - + Unexpected "[]": arrays are disabled. Unerwartetes "[]": Arrays sind deaktiviert. - + Unexpected symbol: %1. Unerwartetes Symbol: %1. - - + + Function %1 must have at least one argument. Die Funktion %1 benötigt mindestens ein Parameter. - + First argument to map is not a function. Der erste Parameter von map ist keine Formel. - + Second argument to map is not an array. Der zweite Parameter von map ist kein Array. - + First argument to fold is not a function. Der erste Parameter für fold ist keine Formel. - + Second argument to fold is not an array. Der zweite Parameter für fold ist kein Array. - + First argument to filter is not a function. Der erste Parameter für filter ist keine Formel. - + Second argument to filter is not an array. Der zweite Parameter von filter ist kein Array. - + Second argument to indexOf is not a string or array. Der zweite Parameter von indexOf ist kein String oder Array. - + Second argument to join is not an array. Der zweite Parameter von join ist kein Array. - + EOF Ende des Ausdrucks @@ -1772,37 +1776,37 @@ Bitte vergewissern Sie sich, dass Ihre LaTeX-Installation korrekt ist, und melde usage - - + + Usage: %1 Verwendung: %1 - - - + + + Usage: %1 or %2 Verwendung: %1 oder %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) integral(<von: Zahl>, <bis: Zahl>, <f: ExecutableObject>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) integral(<von: Zahl>, <bis: Zahl>, <f: String>, <Variablen: String>) - + derivative(<f: ExecutableObject>, <x: number>) derivative(<f: ExecutableObject>, <x: Zahl>) - + derivative(<f: string>, <variable: string>, <x: number>) derivative(<f: String>, <Variablen: String>, <x: Zahl>) diff --git a/LogarithmPlotter/i18n/lp_en.ts b/LogarithmPlotter/i18n/lp_en.ts index 3a86bcf..a2051a8 100644 --- a/LogarithmPlotter/i18n/lp_en.ts +++ b/LogarithmPlotter/i18n/lp_en.ts @@ -917,62 +917,60 @@ These settings can be changed at any time from the "Settings" menu. error - - + + Cannot find property %1 of object %2. Cannot find property %1 of object %2. - + Undefined variable %1. Undefined variable %1. - + In order to be executed, object %1 must have at least one argument. In order to be executed, object %1 must have at least one argument. - + %1 cannot be executed. %1 is not a function. - - - + + + Invalid expression. Invalid expression. - + Invalid expression (parity). Invalid expression (parity). - + Unknown character "%1". Unknown character "%1". - - + + Illegal escape sequence: %1. Illegal escape sequence: %1. - - Parse error [%1:%2]: %3 - Parse error [%1:%2]: %3 + Parse error [%1:%2]: %3 - + Expected %1 Expected %1 - + Unexpected %1 Unexpected %1 @@ -985,76 +983,82 @@ These settings can be changed at any time from the "Settings" menu.Expected variable for assignment. - + + + Parse error [position %1]: %2 + + + + Unexpected ".": member access is not permitted Unexpected ".": member access is not permitted - + Unexpected "[]": arrays are disabled. Unexpected "[]": arrays are disabled. - + Unexpected symbol: %1. Unexpected symbol: %1. - - + + Function %1 must have at least one argument. Function %1 must have at least one argument. - + First argument to map is not a function. First argument to map is not a function. - + Second argument to map is not an array. Second argument to map is not an array. - + First argument to fold is not a function. First argument to fold is not a function. - + Second argument to fold is not an array. Second argument to fold is not an array. - + First argument to filter is not a function. First argument to filter is not a function. - + Second argument to filter is not an array. Second argument to filter is not an array. - + Second argument to indexOf is not a string or array. Second argument to indexOf is not a string or array. - + Second argument to join is not an array. Second argument to join is not an array. - + EOF End of expression @@ -1772,37 +1776,37 @@ Please make sure your LaTeX installation is correct and report a bug if so. usage - - + + Usage: %1 Usage: %1 - - - + + + Usage: %1 or %2 Usage: %1 or %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) integral(<from: number>, <to: number>, <f: ExecutableObject>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) integral(<from: number>, <to: number>, <f: string>, <variable: string>) - + derivative(<f: ExecutableObject>, <x: number>) derivative(<f: ExecutableObject>, <x: number>) - + derivative(<f: string>, <variable: string>, <x: number>) derivative(<f: string>, <variable: string>, <x: number>) diff --git a/LogarithmPlotter/i18n/lp_es.ts b/LogarithmPlotter/i18n/lp_es.ts index 7d9a37b..d89e4b1 100644 --- a/LogarithmPlotter/i18n/lp_es.ts +++ b/LogarithmPlotter/i18n/lp_es.ts @@ -917,139 +917,138 @@ Estos ajustes se pueden cambiar en cualquier momento desde el menú “Ajustes error - - + + Cannot find property %1 of object %2. No se puede encontrar la propiedad %1 del objeto %2. - + Undefined variable %1. Variable %1 no definida. - + In order to be executed, object %1 must have at least one argument. Para ser ejecutado, el objeto %1 debe tener al menos un argumento. - + %1 cannot be executed. - + - - - + + + Invalid expression. Expresión incorrecta. - + Invalid expression (parity). Expresión no válida (paridad). - + Unknown character "%1". Carácter "%1" desconocido. - - + + Illegal escape sequence: %1. Secuencia de salida no válida: %1 . - - Parse error [%1:%2]: %3 - Error de análisis [%1:%2]: %3 + Error de análisis [%1:%2]: %3 - + + + Parse error [position %1]: %2 + + + + Expected %1 Previsto %1 - + Unexpected %1 Inesperado %1 - + Unexpected ".": member access is not permitted "." Inesperado: el acceso de miembros no está permitido - + Unexpected "[]": arrays are disabled. "[]" inesperado: las matrices están desactivadas. - + Unexpected symbol: %1. Símbolo inesperado: %1. - - + + Function %1 must have at least one argument. La función %1 debe tener al menos un argumento. - + First argument to map is not a function. El primer argumento de map no es una función. - + Second argument to map is not an array. El segundo argumento de map no es una matriz. - + First argument to fold is not a function. El primer argumento de fold no es una función. - + Second argument to fold is not an array. El segundo argumento de fold no es una matriz. - + First argument to filter is not a function. El primer argumento del filtro no es una función. - + Second argument to filter is not an array. El segundo argumento del filtro no es una matriz. - + Second argument to indexOf is not a string or array. El segundo argumento de indexOf no es una cadena ni una matriz. - + Second argument to join is not an array. El segundo argumento para unirse no es una matriz. - - - EOF - - No object found with names %1. @@ -1105,6 +1104,11 @@ Deshaciendo el último cambio. Expected variable for assignment. Variable de asignación esperada. + + + EOF + + expression @@ -1772,37 +1776,37 @@ Por favor, asegúrese de que su instalación de LaTeX es correcta e informe de u usage - - + + Usage: %1 Uso: %1 - - - + + + Usage: %1 or %2 Uso: %1 o %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) integral(<desde: número>, <hasta: número>, <f: objeto ejecutable>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) integral(<from: number>, <to: number>, <f: string>, <variable: string>) - + derivative(<f: ExecutableObject>, <x: number>) derivada(<f: ExecutableObject>, <x: number>) - + derivative(<f: string>, <variable: string>, <x: number>) derivada(<f: string>, <variable: string>, <x: number>) diff --git a/LogarithmPlotter/i18n/lp_fr.ts b/LogarithmPlotter/i18n/lp_fr.ts index 3fb86f4..7a7eaf1 100644 --- a/LogarithmPlotter/i18n/lp_fr.ts +++ b/LogarithmPlotter/i18n/lp_fr.ts @@ -920,62 +920,60 @@ Ces paramètres peuvent être modifiés à tout moment à partir du menu "P error - - + + Cannot find property %1 of object %2. Impossible de trouver la propriété %1 de l'objet %2. - + Undefined variable %1. La variable %1 n'est pas définie. - + In order to be executed, object %1 must have at least one argument. Pour être utilisé comme fonction, l'objet %1 nécessite au moins un argument. - + %1 cannot be executed. %1 n'est pas une fonction. - - - + + + Invalid expression. Formule invalide. - + Invalid expression (parity). Formule invalide (parité). - + Unknown character "%1". Le caractère "%1" est inconnu. - - + + Illegal escape sequence: %1. Séquence d'échappement illégale : %1. - - Parse error [%1:%2]: %3 - Erreur de syntaxe [%1:%2] : %3 + Erreur de syntaxe [%1:%2] : %3 - + Expected %1 %1 attendu - + Unexpected %1 %1 inattendu @@ -988,76 +986,82 @@ Ces paramètres peuvent être modifiés à tout moment à partir du menu "P Une variable est attendue pour l'affectation. - + + + Parse error [position %1]: %2 + + + + Unexpected ".": member access is not permitted "." inattendu : l'accès aux propriétés n'est pas autorisé - + Unexpected "[]": arrays are disabled. "[]" inattendu : les tableaux sont désactivés. - + Unexpected symbol: %1. Symbole inconnu : %1. - - + + Function %1 must have at least one argument. La fonction %1 nécessite au moins un argument. - + First argument to map is not a function. Le premier argument de map n'est pas une fonction. - + Second argument to map is not an array. Le deuxième argument de map n'est pas un tableau. - + First argument to fold is not a function. Le premier argument de fold n'est pas une fonction. - + Second argument to fold is not an array. Le deuxième argument de fold n'est pas un tableau. - + First argument to filter is not a function. Le premier argument de filter n'est pas une fonction. - + Second argument to filter is not an array. Le deuxième argument de filter n'est pas un tableau. - + Second argument to indexOf is not a string or array. Le deuxième argument de indexOf n'est ni chaîne de caractères ni un tableau. - + Second argument to join is not an array. Le deuxième argument de join n'est pas un tableau. - + EOF Fin de la formule @@ -1775,37 +1779,37 @@ Vérifiez que votre installation de LaTeX est correcte et signalez un bogue si c usage - - + + Usage: %1 Emploi : %1 - - - + + + Usage: %1 or %2 Emploi : %1 ou %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) integral(<de : nombre>, <à : nombre>, <f : Objet exécutable>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) integral(<de : nombre>, <à : nombre>, <f : fonction chaîne>, <variable>) - + derivative(<f: ExecutableObject>, <x: number>) derivative(<f : Objet exécutable>, <x : nombre>) - + derivative(<f: string>, <variable: string>, <x: number>) derivative(<f : fonction chaîne>, <variable>, <x : nombre>) diff --git a/LogarithmPlotter/i18n/lp_hu.ts b/LogarithmPlotter/i18n/lp_hu.ts index 8d3f5b3..4b4e57f 100644 --- a/LogarithmPlotter/i18n/lp_hu.ts +++ b/LogarithmPlotter/i18n/lp_hu.ts @@ -917,62 +917,60 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. error - - + + Cannot find property %1 of object %2. A(z) %2 objektum %1 tulajdonsága nem található. - + Undefined variable %1. A(z) %1 változó nincs meghatározva. - + In order to be executed, object %1 must have at least one argument. A végrehajtáshoz a(z) %1 objektumnak legalább egy argumentummal kell rendelkeznie. - + %1 cannot be executed. A(z) %1 nem függvény. - - - + + + Invalid expression. Érvénytelen kifejezés. - + Invalid expression (parity). Érvénytelen kifejezés (paritás). - + Unknown character "%1". Ismeretlen karakter „%1”. - - + + Illegal escape sequence: %1. Érvénytelen kilépési sorozat: %1. - - Parse error [%1:%2]: %3 - Elemzési hiba [%1:%2]: %3 + Elemzési hiba [%1:%2]: %3 - + Expected %1 Várható %1 - + Unexpected %1 Váratlan %1 @@ -985,76 +983,82 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. A hozzárendeléshez várt változó. - + + + Parse error [position %1]: %2 + + + + Unexpected ".": member access is not permitted Váratlan „.”: a tagok hozzáférése nem engedélyezett - + Unexpected "[]": arrays are disabled. Váratlan „[]”: a tömbök le vannak tiltva. - + Unexpected symbol: %1. Váratlan szimbólum: %1. - - + + Function %1 must have at least one argument. A(z) %1 függvénynek legalább egy argumentumnak kell lennie. - + First argument to map is not a function. Az első leképezési argumentum nem függvény. - + Second argument to map is not an array. A második leképezési argumentum nem tömb. - + First argument to fold is not a function. Az első behajtási argumentum nem függvény. - + Second argument to fold is not an array. A második behajtási argumentum nem tömb. - + First argument to filter is not a function. Az első szűrési argumentum nem függvény. - + Second argument to filter is not an array. A második szűrési argumentum nem tömb. - + Second argument to indexOf is not a string or array. Az indexOf második argumentuma nem karakterlánc vagy tömb. - + Second argument to join is not an array. A második csatlakozási argumentum nem tömb. - + EOF Kifejezés vége @@ -1768,37 +1772,37 @@ Kérjük, ellenőrizze, hogy a LaTeX telepítése helyes-e, és ha igen, jelents usage - - + + Usage: %1 Használat: %1 - - - + + + Usage: %1 or %2 Használat: %1 vagy %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) integrál(<alsó korlát: szám>, <felső korlát: szám>, <függvény: végrehajtható objektum>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) integrál(<alsó korlát: szám>, <felső korlát: szám>, <függvény: karakterlánc>, <változó: karakterlánc>) - + derivative(<f: ExecutableObject>, <x: number>) derivált(<függvény: VégrehajthatóObjektum>, <x: szám>) - + derivative(<f: string>, <variable: string>, <x: number>) derivált(<függvény: karakterlánc>, <változó: karakterlánc>, <x: szám>) diff --git a/LogarithmPlotter/i18n/lp_nb_NO.ts b/LogarithmPlotter/i18n/lp_nb_NO.ts index d52d13b..bfbe130 100644 --- a/LogarithmPlotter/i18n/lp_nb_NO.ts +++ b/LogarithmPlotter/i18n/lp_nb_NO.ts @@ -868,140 +868,6 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. error - - - - Cannot find property %1 of object %2. - - - - - Undefined variable %1. - - - - - In order to be executed, object %1 must have at least one argument. - - - - - %1 cannot be executed. - - - - - - - Invalid expression. - - - - - Invalid expression (parity). - - - - - Unknown character "%1". - - - - - - Illegal escape sequence: %1. - - - - - - Parse error [%1:%2]: %3 - - - - - Expected %1 - - - - - Unexpected %1 - - - - - Unexpected ".": member access is not permitted - - - - - Unexpected "[]": arrays are disabled. - - - - - Unexpected symbol: %1. - - - - - - Function %1 must have at least one argument. - - - - - - First argument to map is not a function. - - - - - - Second argument to map is not an array. - - - - - - First argument to fold is not a function. - - - - - - Second argument to fold is not an array. - - - - - - First argument to filter is not a function. - - - - - - Second argument to filter is not an array. - - - - - - Second argument to indexOf is not a string or array. - - - - - - Second argument to join is not an array. - - - - - EOF - - No object found with names %1. @@ -1043,6 +909,140 @@ Evaluated expression: %3 Undoing last change. + + + + Cannot find property %1 of object %2. + + + + + Undefined variable %1. + + + + + In order to be executed, object %1 must have at least one argument. + + + + + %1 cannot be executed. + + + + + + + Invalid expression. + + + + + Invalid expression (parity). + + + + + EOF + + + + + + Parse error [position %1]: %2 + + + + + Expected %1 + + + + + Unexpected %1 + + + + + Unexpected ".": member access is not permitted + + + + + Unexpected "[]": arrays are disabled. + + + + + Unexpected symbol: %1. + + + + + + Function %1 must have at least one argument. + + + + + + First argument to map is not a function. + + + + + + Second argument to map is not an array. + + + + + + First argument to fold is not a function. + + + + + + Second argument to fold is not an array. + + + + + + First argument to filter is not a function. + + + + + + Second argument to filter is not an array. + + + + + + Second argument to indexOf is not a string or array. + + + + + + Second argument to join is not an array. + + + + + Unknown character "%1". + + + + + + Illegal escape sequence: %1. + + expression @@ -1686,38 +1686,38 @@ Please make sure your latex installation is correct and report a bug if so. usage - - + + Usage: %1 - + - - - + + + Usage: %1 or %2 - + - + integral(<from: number>, <to: number>, <f: ExecutableObject>) - + - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) - + - + derivative(<f: ExecutableObject>, <x: number>) - + - + derivative(<f: string>, <variable: string>, <x: number>) - + diff --git a/LogarithmPlotter/i18n/lp_template.ts b/LogarithmPlotter/i18n/lp_template.ts index cb5e7b7..e9b6d6e 100644 --- a/LogarithmPlotter/i18n/lp_template.ts +++ b/LogarithmPlotter/i18n/lp_template.ts @@ -756,140 +756,6 @@ error - - - - Cannot find property %1 of object %2. - - - - - Undefined variable %1. - - - - - In order to be executed, object %1 must have at least one argument. - - - - - %1 cannot be executed. - - - - - - - Invalid expression. - - - - - Invalid expression (parity). - - - - - Unknown character "%1". - - - - - - Illegal escape sequence: %1. - - - - - - Parse error [%1:%2]: %3 - - - - - Expected %1 - - - - - Unexpected %1 - - - - - Unexpected ".": member access is not permitted - - - - - Unexpected "[]": arrays are disabled. - - - - - Unexpected symbol: %1. - - - - - - Function %1 must have at least one argument. - - - - - - First argument to map is not a function. - - - - - - Second argument to map is not an array. - - - - - - First argument to fold is not a function. - - - - - - Second argument to fold is not an array. - - - - - - First argument to filter is not a function. - - - - - - Second argument to filter is not an array. - - - - - - Second argument to indexOf is not a string or array. - - - - - - Second argument to join is not an array. - - - - - EOF - - No object found with names %1. @@ -931,6 +797,140 @@ Evaluated expression: %3 Undoing last change. + + + + Cannot find property %1 of object %2. + + + + + Undefined variable %1. + + + + + In order to be executed, object %1 must have at least one argument. + + + + + %1 cannot be executed. + + + + + + + Invalid expression. + + + + + Invalid expression (parity). + + + + + EOF + + + + + + Parse error [position %1]: %2 + + + + + Expected %1 + + + + + Unexpected %1 + + + + + Unexpected ".": member access is not permitted + + + + + Unexpected "[]": arrays are disabled. + + + + + Unexpected symbol: %1. + + + + + + Function %1 must have at least one argument. + + + + + + First argument to map is not a function. + + + + + + Second argument to map is not an array. + + + + + + First argument to fold is not a function. + + + + + + Second argument to fold is not an array. + + + + + + First argument to filter is not a function. + + + + + + Second argument to filter is not an array. + + + + + + Second argument to indexOf is not a string or array. + + + + + + Second argument to join is not an array. + + + + + Unknown character "%1". + + + + + + Illegal escape sequence: %1. + + expression @@ -1527,38 +1527,38 @@ Please make sure your latex installation is correct and report a bug if so. usage - - + + Usage: %1 - + - - - + + + Usage: %1 or %2 - + - + integral(<from: number>, <to: number>, <f: ExecutableObject>) - + - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) - + - + derivative(<f: ExecutableObject>, <x: number>) - + - + derivative(<f: string>, <variable: string>, <x: number>) - + diff --git a/LogarithmPlotter/i18n/update.sh b/LogarithmPlotter/i18n/update.sh index c20d7a7..3a01e14 100755 --- a/LogarithmPlotter/i18n/update.sh +++ b/LogarithmPlotter/i18n/update.sh @@ -5,27 +5,41 @@ # See also: https://bugreports.qt.io/browse/QTBUG-123819 # +escape() { + str="$1" + str="${str//\//\\/}" # Escape slashes + str="${str//\*/\\*}" # Escape asterixes + echo "$str" +} + +replace() { + file="$1" + from="$(escape "$2")" + to="$(escape "$3")" + sed -i "s/${from}/${to}/g" "$file" +} + files=$(find .. -name *.mjs) for file in $files; do echo "Moving '$file' to '${file%.*}.js'..." mv "$file" "${file%.*}.js" # Replacements to make it valid js - sed -i 's/^import/\/\/import/g' "${file%.*}.js" - sed -i 's/^export default/\/*export default*\//g' "${file%.*}.js" - sed -i 's/^export/\/*export*\//g' "${file%.*}.js" + replace "${file%.*}.js" "^import" "/*import" + replace "${file%.*}.js" '.mjs"$' '.mjs"*/' + replace "${file%.*}.js" "^export default" "/*export default*/" + replace "${file%.*}.js" "^export" "/*export*/" done -echo "------------------------" -echo "Updating translations..." -echo "------------------------" +echo "----------------------------" +echo "| Updating translations... |" +echo "----------------------------" lupdate -extensions js,qs,qml,py -recursive .. -ts lp_*.ts # Updating locations in files for lp in *.ts; do echo "Replacing locations in $lp..." for file in $files; do echo " > Replacing for file $file..." - f="${file//\//\\/}" # Escape slashes - sed -i "s/${f%.*}.js/$f/g" "$lp" + replace "$lp" "${file%.*}.js" "$file" done done @@ -33,7 +47,8 @@ for file in $files; do echo "Moving '${file%.*}.js' to '$file'..." mv "${file%.*}.js" "$file" # Resetting changes - sed -i 's/^\/\/import/import/g' "$file" - sed -i 's/^\/\*export default\*\//export default/g' "$file" - sed -i 's/^\/\*export\*\//export/g' "$file" + replace "$file" "^/*import" "import" + replace "$file" '.mjs"*/$' '.mjs"' + replace "$file" "^/*export default*/" "export default" + replace "$file" "^/*export*/" "export" done