* Add script to fix up translation files after pulling from Transifex

* Fix txpo in english language file, thanks Quentin
This commit is contained in:
Tom Reynolds 2012-10-21 18:17:12 +00:00
parent 64058b17e7
commit 676b2bef3a
1 changed files with 16 additions and 0 deletions

16
tx-cleanup.sh Executable file
View File

@ -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