File: find-gui-text.sh

package info (click to toggle)
lokalize 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,720 kB
  • sloc: cpp: 26,207; xml: 484; python: 483; sh: 21; makefile: 6
file content (21 lines) | stat: -rwxr-xr-x 757 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

TEXT=$1
PACKAGE=$2
LOKALIZE_INSTANCES=`qdbus org.kde.lokalize*`
if [ -z $LOKALIZE_INSTANCES ]; then lokalize>/dev/null 2>/dev/null & fi

let COUNTER=0
while [ -z $LOKALIZE_INSTANCES ]; do \
let COUNTER=$COUNTER+1
if [ $COUNTER -gt 10 ]; then exit ; fi
sleep 1
LOKALIZE_INSTANCES=`qdbus org.kde.lokalize*` ;\
done

for LOKALIZE_INSTANCE in $LOKALIZE_INSTANCES; do \
    qdbus $LOKALIZE_INSTANCE /ThisIsWhatYouWant/FileSearch/0 org.kde.Lokalize.FileSearch.findGuiTextPackage "$TEXT" "$PACKAGE"; \
    qdbus $LOKALIZE_INSTANCE /ThisIsWhatYouWant org.kde.Lokalize.MainWindow.showTranslationMemory; \
    qdbus $LOKALIZE_INSTANCE /ThisIsWhatYouWant/TranslationMemory/0 org.kde.Lokalize.TranslationMemory.findGuiTextPackage "$TEXT" "$PACKAGE"; \
done