mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-02 09:01:13 +00:00

Rewriting commit f8cdec1883
by Jernej Simončič for the development
code (which has a slightly different list of languages).
Also adding the meson version of this change.
Since now InnoSetup fully supports UTF-8 isl (as long as they have a
BOM), let's stop converting translations. Then we also avoid all
conversion errors and get a simpler/more robust build process.
11 lines
303 B
Bash
11 lines
303 B
Bash
#!/bin/bash
|
|
prefix=$1
|
|
infile=$2
|
|
|
|
#replace [] with \[\]
|
|
prefix=$(echo "$prefix" | sed 's/[][]/\\\0/g')
|
|
|
|
# InnoSetup now supports UTF-8 for all languages, but it requires a BOM
|
|
# at the start of the file.
|
|
echo -ne "\\xEF\\xBB\\xBF";
|
|
sed '/^\w\+'"$prefix"'=/{s/\(.\)'"$prefix"'/\1/;n};/^\w.*=/d' "$infile"
|