#!/bin/bash

# This should solve issues with debiandoc for Polish quotation
# Any global fix can be done similary.

# $1 locale (lower case)
# $2 directory
cd $2

case $1 in
    "el")
	for xx in *.html; do
	    mv ${xx} ${xx/html/el.html}
	done
	;;
    "pl")
	for xx in *.html; do
		perl -i -p -e 's/,,/&#8222;/g;' -e "s/''/&#8221;/g;" $xx
	done
	;;
    "zh-tw")
	for xx in *.html; do
		perl -i -p -e 's/(|`)\n/$1 /s;' $xx
		perl -i -p -e 's/(|`)\s*(\w+(?:\.\w*)*)(\s|\<)/ $2 $1$3/g;'  $xx
	done
	;;					
    *)
	: # do nothing
;;
esac
