Development/EasyHacks/Translation Of Comments

    From The Document Foundation Wiki

    This page was marked as inactive and is retained for historical reference.
    Either the page is no longer relevant or consensus on its purpose has become unclear. To revive discussion, seek broader input via a forum such as one of our mailing lists.

    Easy Hack - Translate Comments from German to English

    You find the description of this Easy Hack in the corresponding bug report.

    If one directory is finished, please write on this site.

    Directory in libs-core Who is working on it? Status
    avmedia - no comments found
    basic Andreas Mantke done
    comphelper Tom Thorogood done
    connectivity Tom Thorogood done
    cppuhelper Tom Thorogood done
    configmgr - no comments found
    cui Tom Thorogood done
    dbaccess done
    desktop Albert Thuswaldner done, see [1]
    dtrans Urs Fässler done
    editeng Albert Thuswaldner done, see tdf#34196
    eventattacher Rob Snelders done
    filter Hansgerd Schneider done
    formula Adrián Cereto done
    fpicker Michael Münch done
    idl Michael Münch done
    linguistic Rob Snelders done
    rsc Lucas Satabin done, see [2]
    sd Urs Fässler done
    sfx2 Albert Thuswaldner done, see tdf#33424
    svx/inc done
    sysui - No comments found (false positives)
    toolkit Oliver Günther done
    tools Oliver Günther done
    ucb Rob Snelders done
    udm - No comments found (false positives)
    unotools Oliver Günther done
    uui Albert Thuswaldner done, see [3]
    vbahelper Rob Snelders done
    xml2cmp - No comments found (false positives)
    xmloff Oliver Günther done

    Directories other than libs-core Who is working on it? Status
    sw/inc open
    sw/source/core open
    sw/source/core/access Cassandra Freund done
    sw/source/ui open
    sc/source/ui/docshell Johnny M done [4]
    sw/source/ui/ribbar Cassandra Freund done
    sw/source/ui/shells Cassandra Freund done
    sw/source/ui/uiview Cassandra Freund done
    sw/source/ui/uno Cassandra Freund done
    sw/source/ui/utlui Cassandra Freund done
    sw/source/ui/web Cassandra Freund done
    sw/source/ui/wrtsh Cassandra Freund done
    sw/source/filter/ww1 Stefan Ring done
    sw/source/core/doc Philipp Weissenbacher done
    vcl done
    sc/source/core/data/ Albert Thuswaldner done
    sc/source/ui/undo/ done
    sc/source/ui/view/ Albert Thuswaldner done
    sc/source/ui/xmlsource/ Albert Thuswaldner no german comments found
    sc/source/ui/drawfunc Thomas Beck done
    sc/workben/ Albert Thuswaldner done
    include/svx/ Johnny M done [5]
    svx/source/fmcomp/ Johnny M done [6]
    svx/source/inc/ Johnny M done [7]
    sw/source/filter/html open

    Getting started

    Note: You can use the Gerrit UI to edit the source files. Go to Projects->List->core and click "Create Change". Select the branch "master" and enter a commit message like "Translate German comments". Then click the "Edit" button and add the files you want to translate.

    We have a script in core/bin/ called find-german-comments, that helps you find German comments. Be sure to download the directory text_cat as well.

    Here is an example on how to use it:

    ~/git/libreoffice/rawbuild/starmath$ ~/git/libreoffice/bin/find-german-comments -v > german-comments.txt
    processing file 'inc/action.hxx'...
    processing file 'inc/applicat.hxx'...
    processing file 'inc/config.hxx'...

    The file german-comments.txt will contain the file names and line numbers where German comments were found. You can run the script in any directory and it'll check the hxx/cxx files under that directory recursively (this can be handy in large modules, as guessing the language of a comment takes some time). If you want only the file names, use the -f option instead of -v.

    Note that it only checks comments that are 4 characters or longer, which might miss some shorter ones. Also, logging and error messages are not detected yet. You can translate them as well.

    If you have problems with the script, poke vmiklos.

    If you add this to your .bashrc you can search for German comments anywhere in the codebase using fgc instead of the path to the tool every time:

    alias fgc='${HOME}/Documents/Projects/libo/bin/find-german-comments'

    If you want to save some time, there is now a text document listing all of the directories containing German comments so that you don't have to parse through the entire core. Because this may be out of date, double check the above table before assigning yourself to a directory to make sure nobody else is working on it or has already completed it. It's a good place to start if you're not sure where to go hunting down the comments.