From 1aa82c3e6e0ac62f8cc7fa5469298dc0d254f26c Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 18 Mar 2017 19:59:52 +0100 Subject: [PATCH] Add a script to fixup copyright years translations --- scripts/update-year-in-po.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 scripts/update-year-in-po.sh diff --git a/scripts/update-year-in-po.sh b/scripts/update-year-in-po.sh new file mode 100755 index 000000000..a55f68e59 --- /dev/null +++ b/scripts/update-year-in-po.sh @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +# prevent sed from doing stupid things in case the locale encoding doesn't +# match the files'. Unlikely, but doesn't hurt. +export LANG=C + +year=$(grep -Po '(?<="Copyright \(c\) 2005-)20[0-9][0-9](?=\\n)' src/about.c) +echo "new years are: $years" + +for f in po/*.po; do + echo "processing $f..." + sed -f /dev/stdin -i "$f" <