~usb-creator-hackers/usb-creator/trunk

« back to all changes in this revision

Viewing changes to Messages.sh

  • Committer: Benjamin Drung
  • Date: 2022-11-02 13:01:26 UTC
  • Revision ID: benjamin.drung@canonical.com-20221102130126-4z0xyivy5f37dp13
Move to https://code.launchpad.net/~usb-creator-hackers/usb-creator/+git/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env bash
2
 
 
3
 
NAME="usbcreator"
4
 
XGETTEXT="xgettext -ki18n --language=Python"
5
 
EXTRACTRC="extractrc"
6
 
 
7
 
$EXTRACTRC gui/$NAME-kde.ui > ./$NAME-kde.ui.py
8
 
$XGETTEXT $NAME-kde.ui.py $NAME/frontends/kde/*.py -o "$NAME.pot"
9
 
 
10
 
sed -e 's/charset=CHARSET/charset=UTF-8/g' -i "$NAME.pot"
11
 
 
12
 
if [ -d "po" ]; then
13
 
    if [ -f "po/$NAME.pot" ]; then
14
 
        echo "Merging $NAME.pot -> po/$NAME.pot ..."
15
 
        msgcat -o "po/tmp-$NAME.pot" "po/$NAME.pot" "$NAME.pot"
16
 
        mv "po/tmp-$NAME.pot" "po/$NAME.pot"
17
 
    else
18
 
        echo "Copying $NAME.pot -> po/$NAME.pot ..."
19
 
        cp "$NAME.pot" "po/$NAME.pot"
20
 
    fi
21
 
fi
22
 
 
23
 
rm -f "$NAME-kde.ui.py"
24
 
rm -f "$NAME.pot"