[Libreoffice] occured occurred

Takeshi Abe tabe at fixedpoint.jp
Fri Dec 3 21:35:29 PST 2010


Hi Michael,

On Mon, 29 Nov 2010 11:13:20 +0000, Michael Meeks <michael.meeks at novell.com> wrote:
> On Sat, 2010-11-27 at 02:20 +0900, Takeshi Abe wrote:
>> During the Easy Hacking, I have enjoyed ton of "occured" occurred and
>> some occurrences of "occurance" in the code base.
>> Why not come and join with `git grep -i occured` if you get tired of
>> working hard in a miserable world ;)
>> 
>> Well, seriously, it seems needed to find a systematic way to cope with them.
> 
> 	:-)
OK, I end up getting sane so that replacing them with git & sed has done
by the attached script. After runnging it on each git working dir and
double checking, I made up the attached patch with some tweaks.

Note that the changes would not fit into LibO 3.3 because they alters messages
to be localized, e.g., in
lib-core/connectivity/source/resource/conn_shared_res.src

> 
> 	I guess an 'easy hack' ? I guess we should perhaps grok for german
> variable names too, and rename them in cases like this:
> 
> sc/source/core/tool/interpr2.cxx:    double nErsteAbRate = nWert * nAbRate * nMonate / 12.0;
> 
> 	Though, it's not that clear to me how to find them easily.
> 
> 	:-)
Oh, take it easy. Just shorten the names! Say
double nE = nW * nA * nM / 12.0;
Then it will no longer look like German at least, well, even if
more damn unreadable ;)

Cheers,
-- Takeshi Abe
-------------- next part --------------
#!/bin/sh

for PAIR in \
    occured.occurred \
    Occured.Occurred \
    OCCURED.OCCURRED \
    occurence.occurrence \
    Occurence.Occurrence \
    OCCURENCE.OCCURRENCE \
    occurance.occurrence \
    Occurance.Occurrence \
    OCCURANCE.OCCURRENCE \
    occurrance.occurrence \
    Occurrance.Occurrence \
    OCCURRANCE.OCCURRENCE \
    ; do
    echo "# $PAIR";
    CUR=${PAIR%.*}
    NEW=${PAIR#*.}
    for file in `git grep -l $CUR`; do
        echo "  $file"
        sed -e "s/$CUR/$NEW/g" $file > $file.new
        rm $file
        mv $file.new $file
    done
done
-------------- next part --------------
A non-text attachment was scrubbed...
Name: occured.tar.gz
Type: application/octet-stream
Size: 141318 bytes
Desc: occured.tar.gz
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20101204/3187930c/attachment-0001.obj>


More information about the LibreOffice mailing list