Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hi Michael,

On Mon, 29 Nov 2010 11:13:20 +0000, Michael Meeks <michael.meeks@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
#!/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

Attachment: occured.tar.gz
Description: occured.tar.gz


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.