[Digikam-devel] Typo corrections - scripts attached

linux newbie firsttimelinux at yahoo.com
Fri Feb 17 20:06:10 GMT 2006


Hi all,
As I mentioned, I made a sed script to make the
replacements in all the files at once - changes are
made to _every_ po file and also to the cpp files
which reference them.

I took a fresh extract of the tar file
digikam-0.8.1.tar.bz2 and applied this script to
modify the files.  Then I compiled and installed as
before, and tested that the corrections had been made.
 I have not been able to test whether the non-english
translations still work.

The sed script is as follows:

------------------------------
s/will separe/will split/g
s/be separed/be split/g
s/corresponding to/corresponds to/g
s/loose information/lose information/g
s/views depends/views depend/g
s/seem to be an/is an/g
s/seem to be %n/are %n/g
s/Toogle/Toggle/g
s/\-2005, d/\-2006, d/g
s/sure its/sure it's/g
s/black and White/black and white/g
s/effect that replicate /effect that replicates /g
s/Golden Ratio \"/Golden Ratio is \"/g
s/Golden Ratio 1/Golden Ratio is 1/g
s/It search /It searches /g
s/adjust the Red/adjusts the Red/g
s/an universal/a universal/g
s/will enhances/will enhance/g
---------------------------------------------

and this is saved as "typofix.sed".
Then I used a second file to execute the script, as
follows:

---------------------------------------------
find . -name "*.cpp" -exec sed -i -f ../typofix.sed
\{\} \;
find . -name "*.po" -exec sed -i -f ../typofix.sed
\{\} \;
---------------------------------------------

This goes through the _whole_ file tree, from the
current point, firstly looking for cpp files and then
for po files.  For each file it executes all the
replacements in the sed file listed earlier.  The
reason it references "../typofix.sed" is that these
two files were in the directory above the
digikam-0.8.1 directory and so both were in ".." from
the digikam buildroot.

I did this with parallel filetrees and used Kompare to
step through the changes - everything looks good to me
but as I said I'm running it against 0.8.1, not the
latest source.

I hope you're able to use these changes, let me know
if you have questions.
Cheers!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Digikam-devel mailing list