From 676b2bef3ab41e8e25716855888e3042e59e8162 Mon Sep 17 00:00:00 2001 From: Tom Reynolds Date: Sun, 21 Oct 2012 18:17:12 +0000 Subject: [PATCH] * Add script to fix up translation files after pulling from Transifex * Fix txpo in english language file, thanks Quentin --- tx-cleanup.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tx-cleanup.sh diff --git a/tx-cleanup.sh b/tx-cleanup.sh new file mode 100755 index 00000000..73e72a60 --- /dev/null +++ b/tx-cleanup.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# +# Clean up translations pulled from Transifex +# Should be applied only to resources in the 'Joomla' format +# (Currently that's the case for all resources.) + +for file in `find . -type f -name *.lng` +do + # Rewrite " to " + # Remove blank space off beginning (behind '=') and end of translated strings because they belong into the code instead, and because Transifex would double them. + sed -i \ + -e 's/"/"/g' \ + -e 's/^\([^=]*\)=\s*/\1=/' \ + -e 's/\s*$//' \ + $file +done