aboutsummaryrefslogtreecommitdiff
path: root/advtrains/locale/topo.sh
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2023-10-04 15:45:02 +0200
committerY. Wang <yw05@forksworld.de>2024-04-13 10:36:35 +0200
commiteebec1093ab7d039ef46160c2488da7e732b51aa (patch)
tree65367c1efe62b8e111dbf2d5a18e26c480d7a6da /advtrains/locale/topo.sh
parent65397c28ee56bb4458c41726ceb165e6405f119d (diff)
downloadadvtrains-eebec1093ab7d039ef46160c2488da7e732b51aa.tar.gz
advtrains-eebec1093ab7d039ef46160c2488da7e732b51aa.tar.bz2
advtrains-eebec1093ab7d039ef46160c2488da7e732b51aa.zip
Begin transition to .po files
Diffstat (limited to 'advtrains/locale/topo.sh')
-rwxr-xr-xadvtrains/locale/topo.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains/locale/topo.sh b/advtrains/locale/topo.sh
new file mode 100755
index 0000000..23f81b1
--- /dev/null
+++ b/advtrains/locale/topo.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+head -n18 ../po/template.pot | sed 's/charset=CHARSET/charset=UTF-8/'
+sed -En 's/@n/\\n/g;s/@\n/\\n/g;s/\"/\\"/g;s/^([^=]+)=\1$/\1=/;s/^([^=]+)=([^=]*)$/\nmsgid "\1"\nmsgstr "\2"/gp'