source: other-projects/gti/ 28490

Last change on this file since 28490 was 28490, checked in by ak19, 7 years ago

Committing two new scripts for processing translations, and a spelling correction to a third script. The new scripts are: 1., which is a modified version of the one Lan gave me and which strips lines that mention 'Missing translation' and 'Updated date by name'. This one makes sure not to leave empty lines behind after removing lines that only contained 'Missing translation' messages. 2., mainly to be used on nzdl's GTI installation, this script should be called by the cron to send off an email if any of the translation files in macros, gli/help, gli/classes, perllib or gsinstaller have been modified. This is needed to alert us if any translator used the GTI to update translations on nzdl. This script will send us an email. Upon receipt, we should locally process those files on nzdl that were updated by passing them through the script, then commit the result to svn, and finally replace the ones on nzdl's GTI installation with the one committed to svn.

  • Property svn:executable set to *
File size: 1.0 KB
1#! /bin/bash
3cp $1 $1.bak
7# echo $1
9# Removing lines that will become completely empty after sed operation
12sed '/ *# -- Missing translation/d' $1 > $CLEANVERSION_NAME
15# Now we got rid of all the empty lines created by removing "Missing translation" lines
16# We remove any lines containing "Missing translation" but also containing other stuff
18cat $1 | sed -e 's/# -- Missing translation:.*$//' > $CLEANVERSION_NAME
20# Remove comment of form: #Updated 21-Nov-2011 by <name>
21# The date can be either 1 or 2 digits. It need not be followed by "by <name>"
22#cat $CLEANVERSION_NAME | sed -e 's/# Updated \d\d-[a-zA-Z]{3}-\d{4} by.*$//' > $1
23#cat $CLEANVERSION_NAME | sed -e 's/ *# Updated .* (by.*)?$//' > $1
24cat $CLEANVERSION_NAME | sed -e 's/ *# Updated .[0-9]*\-...\-.....*$//' > $1
28echo "**** cleaned version $1"
29echo "**** pre-cleaned original is in $1.bak"
Note: See TracBrowser for help on using the repository browser.