Code Monkey home page Code Monkey logo

Comments (4)

c-koi avatar c-koi commented on July 17, 2024 1

Thanks @stefantalpalaru !
Fix applied as ccb9f29

from gmic-qt.

c-koi avatar c-koi commented on July 17, 2024

Did you modify the file translations/filters/gmic_qt_fr.csv? If so, could you post it somewhere...

from gmic-qt.

JeanLucCoulon avatar JeanLucCoulon commented on July 17, 2024

Nono, I got it directly from the git repository, together with the whole package.

from gmic-qt.

stefantalpalaru avatar stefantalpalaru commented on July 17, 2024

We're hitting a change in how Bash expands & as a back-reference to the search pattern.

https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html :

"If the patsub_replacement shell option is enabled using shopt, any unquoted instances of ‘&’ in string are replaced with the matching portion of pattern."

This was added in Bash 5.2 and apparently is enabled by default, breaking this type of scripts. The fix is to simply backslash-quote the ampersand:

diff -ur gmic-qt-v.3.1.6.orig/translations/filters/csv2ts.sh gmic-qt-v.3.1.6/translations/filters/csv2ts.sh
--- gmic-qt-v.3.1.6.orig/translations/filters/csv2ts.sh	2022-08-16 11:18:26.000000000 +0200
+++ gmic-qt-v.3.1.6/translations/filters/csv2ts.sh	2022-12-07 17:43:18.568998678 +0100
@@ -65,11 +65,11 @@
 {
   local name="$1"
   local text="$2"
-  text=${text//&/&}
-  text=${text//\"/"}
-  text=${text//\'/'}
-  text=${text//</&lt;}
-  text=${text//>/&gt;}
+  text=${text//&/\&amp;}
+  text=${text//\"/\&quot;}
+  text=${text//\'/\&apos;}
+  text=${text//</\&lt;}
+  text=${text//>/\&gt;}
   text=${text# }
   echo "      <${name}>${text}</$name>"
 }
diff -ur gmic-qt-v.3.1.6.orig/translations/filters/ts2csv.sh gmic-qt-v.3.1.6/translations/filters/ts2csv.sh
--- gmic-qt-v.3.1.6.orig/translations/filters/ts2csv.sh	2022-08-16 11:18:26.000000000 +0200
+++ gmic-qt-v.3.1.6/translations/filters/ts2csv.sh	2022-12-07 17:43:46.858730280 +0100
@@ -44,7 +44,7 @@
 function html2ascii()
 {
   local text="$1"
-  text=${text//&amp;/&}
+  text=${text//&amp;/\&}
   text=${text//&lt;/<}
   text=${text//&gt;/>}
   text=${text//&quot;/\"}

from gmic-qt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.