mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-22 00:47:42 -06:00
bbd2a7fc00
In continuation to 67b508ba
(and now including the script
po/remove-suffix.sh as well) some more strings were scriptedly
updated in all available translations.
27 lines
1.0 KiB
Bash
Executable File
27 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script modifies the *.po files, removing some chosen suffix
|
|
# from the msgstr of the given msgid. Use this if you removed e.g. a
|
|
# suffixing colon ":" from the original string in the source code
|
|
# (i.e. the msgid), and now for simplicity you want to remove them
|
|
# from all translations as well.
|
|
|
|
# Example: Say you changed the string from "Start Date:" to "Start
|
|
# Date" in the source. Now: 1. Create the most up-to-date template pot
|
|
# file using "make pot". 2. Update all po files using
|
|
# msgmerge. 3. Call this script as follows:
|
|
# ./remove-suffix.sh Start Date
|
|
# This will modify all *.po files in-place, removing the suffixing
|
|
# colon in the translations.
|
|
|
|
|
|
# Use all command line arguments as the single msgid string
|
|
MSGID="$@"
|
|
# Optionally change the suffix you want to remove here
|
|
REMOVED_SUFFIX=":"
|
|
|
|
for PO in *.po ; do
|
|
# echo perl -p0 -i -e"s^#, fuzzy\\n(msgid \"${MSGID}\"\\nmsgstr \".*)${REMOVED_SUFFIX}\"^\$1\"^" $PO
|
|
perl -p0 -i -e"s^#, fuzzy\\n(msgid \"${MSGID}\"\\nmsgstr \".*)${REMOVED_SUFFIX}\"^\$1\"^" $PO
|
|
done
|