Commit 7d04cd01 authored by Dominik Haumann's avatar Dominik Haumann Committed by Christoph Cullmann

External Tools: Translate name and category

The external tools internally are stored in an ini-like file format:

    [Tool 0]

This patch adds grep/sed magic following how we extract translatable
strings from json files in KTextEditor (indenter, scripts).

Running the two grep lines create output like:

    // i18n: file: 8
    i18nc("External tool category", "Git");

This output is then extracted with the XGETTEXT call a line later.
parent 5fd34266
#! /bin/sh
$EXTRACTRC *.rc *.ui >> rc.cpp
grep -n -e '^ *name=' defaultexternaltoolsrc | sed 's!^\(.*\):.*name= *\(.*\) *$!// i18n: file: \1\ni18nc("External tool name", "\2");!' | sed 's/ \+")/")/' >>rc.cpp || exit 13
grep -n -e '^ *category=' defaultexternaltoolsrc | sed 's!^\(.*\):.*category= *\(.*\) *$!// i18n: file: \1\ni18nc("External tool category", "\2");!' | sed 's/ \+")/")/' >>rc.cpp || exit 13
$XGETTEXT *.cpp -o $podir/kateexternaltoolsplugin.pot
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment