Started work on ptm-desktop-panel widget

This commit is contained in:
arcan1s
2014-07-09 01:00:24 +04:00
parent 9985fe6260
commit 0462bb186e
14 changed files with 1691 additions and 1 deletions

View File

@ -0,0 +1,24 @@
find_package(KDE4 REQUIRED)
find_package(Gettext REQUIRED)
if (NOT GETTEXT_MSGFMT_EXECUTABLE)
message(FATAL_ERROR "Please install the msgfmt binary")
endif (NOT GETTEXT_MSGFMT_EXECUTABLE)
file (GLOB _po_files *.po)
set (_gmoFiles)
foreach (_current_PO_FILE ${_po_files})
get_filename_component (_lang ${_current_PO_FILE} NAME_WE)
set (_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
add_custom_command (OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE}
)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES/ RENAME plasma_applet_netctl.mo)
list (APPEND _gmoFiles ${_gmoFile})
endforeach (_current_PO_FILE)
add_custom_target (pofiles ALL DEPENDS ${_gmoFiles})

View File

View File

@ -0,0 +1,15 @@
#!/bin/sh
WDIR=`pwd` # working dir
SATELLITE_LIST=satellite.list
BACKGROUND_LIST=background.list
# Background list
cd "$WDIR"
cd ../images
ls -1 background_* | sed -e "s/background_//g" | sed -e "s/_/ /g" | sed -e "s/\.jpg//g" | sed -e "s/\.png//g" | sed -e "s/\.gif//g" | grep -v '^$' | sort --unique --ignore-leading-blanks > "$WDIR/background.list"
# Satellite list
cd "$WDIR"
cd ../data
cat satellite_images.xml | grep image\ name | sed -e "s/.*<image name=\"\([^\"]*\).*/\1/" | sed -e "s/\&amp;/\&/g" | sed -e "s/\&apos;/'/g" | sed -e "s/\&quot;/\"/g" | sed -e "s/\&lt;/</g" | sed -e "s/\&gt;/>/g" | grep -v '^$' | sort --unique --ignore-leading-blanks > "$WDIR/satellite.list"

View File

@ -0,0 +1,81 @@
#!/bin/sh
BASEDIR="../" # root of translatable sources
PROJECT="plasma_applet_ptm-desktop-panel" # project name
BUGADDR="https://github.com/arcan1s/pytextmonitor/issues" # MSGID-Bugs
WDIR=`pwd` # working dir
SATELLITE_LIST=satellite.list
BACKGROUND_LIST=background.list
add_list()
{
LIST=$1
if [ -z "$LIST" ]
then
echo ">>ERR<< add_list() - missing parameter LIST - exiting"
return
fi
if [ -f "$LIST" ]
then
cat $LIST | while read ROW
do
echo "tr2i18n(\"${ROW}\")" >> ${WDIR}/rc.cpp
done
else
echo ">>ERR<< add_list() - file $LIST does not exist."
fi
}
echo "Preparing rc files"
cd ${BASEDIR}
# we use simple sorting to make sure the lines do not jump around too much from system to system
find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.cpp
# additional string for KAboutData
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp
cd ${WDIR}
# Add Satellite list
add_list "$SATELLITE_LIST"
# Add Background list
add_list "$BACKGROUND_LIST"
echo "Done preparing rc files"
echo "Extracting messages"
cd ${BASEDIR}
# see above on sorting
find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list
echo "rc.cpp" >> ${WDIR}/infiles.list
cd ${WDIR}
xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
--msgid-bugs-address="${BUGADDR}" \
--files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; }
echo "Done extracting messages"
echo "Merging translations"
catalogs=`find . -name '*.po'`
for cat in $catalogs; do
echo $cat
msgmerge -o $cat.new $cat ${PROJECT}.pot
mv $cat.new $cat
done
echo "Done merging translations"
echo "Cleaning up"
cd ${WDIR}
rm rcfiles.list
rm infiles.list
rm rc.cpp
echo "Done"

View File

@ -0,0 +1,287 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/pytextmonitor/issues\n"
"POT-Creation-Date: 2014-07-08 22:44+0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: desktop-panel.cpp:112
msgid "Set profile %1 disabled"
msgstr ""
#: desktop-panel.cpp:116
msgid "Set profile %1 enabled"
msgstr ""
#: desktop-panel.cpp:132
msgid "Start profile %1"
msgstr ""
#: desktop-panel.cpp:151
msgid "Stop profile %1"
msgstr ""
#: desktop-panel.cpp:165
msgid "Restart profile %1"
msgstr ""
#: desktop-panel.cpp:184
msgid "Start another profile"
msgstr ""
#: desktop-panel.cpp:186
msgid "Stop "
msgstr ""
#: desktop-panel.cpp:188
msgid "Restart "
msgstr ""
#: desktop-panel.cpp:191
msgid "Disable "
msgstr ""
#: desktop-panel.cpp:193
msgid "Enable "
msgstr ""
#: desktop-panel.cpp:196 desktop-panel.cpp:223
msgid "Start profile"
msgstr ""
#: desktop-panel.cpp:230
msgid "Stop profile"
msgstr ""
#: desktop-panel.cpp:234
msgid "Restart profile"
msgstr ""
#: desktop-panel.cpp:238
msgid "Enable profile"
msgstr ""
#: desktop-panel.cpp:242
msgid "Show WiFi menu"
msgstr ""
#: desktop-panel.cpp:262
msgid "Start GUI"
msgstr ""
#: desktop-panel.cpp:270
msgid "Start WiFi menu"
msgstr ""
#: desktop-panel.cpp:334
msgid "Network is up"
msgstr ""
#: desktop-panel.cpp:340
msgid "Network is down"
msgstr ""
#: desktop-panel.cpp:477
msgid "Netctl plasmoid"
msgstr ""
#. i18n: file: configwindow.ui:30
#. i18n: ectx: attribute (title), widget (QWidget, tabConfiguration)
#: po/rc.cpp:3 rc.cpp:3
msgid "Configuration"
msgstr ""
#. i18n: file: configwindow.ui:54
#. i18n: ectx: property (text), widget (QLabel, label_autoUpdate)
#: po/rc.cpp:6 rc.cpp:6
msgid "Auto update interval, msec"
msgstr ""
#. i18n: file: configwindow.ui:112
#. i18n: ectx: property (text), widget (QLabel, label_gui)
#: po/rc.cpp:9 rc.cpp:9
msgid "Path to GUI"
msgstr ""
#. i18n: file: configwindow.ui:128
#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui)
#. i18n: file: configwindow.ui:161
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl)
#. i18n: file: configwindow.ui:197
#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo)
#. i18n: file: configwindow.ui:233
#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi)
#. i18n: file: configwindow.ui:621
#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon)
#. i18n: file: configwindow.ui:654
#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon)
#. i18n: file: configwindow.ui:128
#. i18n: ectx: property (text), widget (QPushButton, pushButton_gui)
#. i18n: file: configwindow.ui:161
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctl)
#. i18n: file: configwindow.ui:197
#. i18n: ectx: property (text), widget (QPushButton, pushButton_sudo)
#. i18n: file: configwindow.ui:233
#. i18n: ectx: property (text), widget (QPushButton, pushButton_wifi)
#. i18n: file: configwindow.ui:621
#. i18n: ectx: property (text), widget (QPushButton, pushButton_activeIcon)
#. i18n: file: configwindow.ui:654
#. i18n: ectx: property (text), widget (QPushButton, pushButton_inactiveIcon)
#: po/rc.cpp:12 po/rc.cpp:18 po/rc.cpp:24 po/rc.cpp:30 po/rc.cpp:87
#: po/rc.cpp:93 rc.cpp:12 rc.cpp:18 rc.cpp:24 rc.cpp:30 rc.cpp:87 rc.cpp:93
msgid "Browse"
msgstr ""
#. i18n: file: configwindow.ui:145
#. i18n: ectx: property (text), widget (QLabel, label_netctl)
#: po/rc.cpp:15 rc.cpp:15
msgid "Path to netctl"
msgstr ""
#. i18n: file: configwindow.ui:178
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_sudo)
#: po/rc.cpp:21 rc.cpp:21
msgid "Use sudo for netctl"
msgstr ""
#. i18n: file: configwindow.ui:214
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_wifi)
#: po/rc.cpp:27 rc.cpp:27
msgid "Show 'Start WiFi menu'"
msgstr ""
#. i18n: file: configwindow.ui:242
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showBigInterface)
#: po/rc.cpp:33 rc.cpp:33
msgid "Show more detailed interface"
msgstr ""
#. i18n: file: configwindow.ui:252
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showNetDev)
#: po/rc.cpp:36 rc.cpp:36
msgid "Show network devices"
msgstr ""
#. i18n: file: configwindow.ui:262
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showExtIp)
#: po/rc.cpp:39 rc.cpp:39
msgid "Show external IP"
msgstr ""
#. i18n: file: configwindow.ui:272
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_showIntIp)
#: po/rc.cpp:42 rc.cpp:42
msgid "Show internal IP"
msgstr ""
#. i18n: file: configwindow.ui:296
#. i18n: ectx: attribute (title), widget (QWidget, tabAppearance)
#: po/rc.cpp:45 rc.cpp:45
msgid "Appearance"
msgstr ""
#. i18n: file: configwindow.ui:310
#. i18n: ectx: property (text), widget (QLabel, label_font)
#: po/rc.cpp:48 rc.cpp:48
msgid "Font"
msgstr ""
#. i18n: file: configwindow.ui:342
#. i18n: ectx: property (toolTip), widget (QFontComboBox, fontComboBox_font)
#: po/rc.cpp:51 rc.cpp:51
msgid "Set font family"
msgstr ""
#. i18n: file: configwindow.ui:359
#. i18n: ectx: property (text), widget (QLabel, label_fontSize)
#: po/rc.cpp:54 rc.cpp:54
msgid "Font size"
msgstr ""
#. i18n: file: configwindow.ui:391
#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontSize)
#: po/rc.cpp:57 rc.cpp:57
msgid "Set font size"
msgstr ""
#. i18n: file: configwindow.ui:420
#. i18n: ectx: property (text), widget (QLabel, label_fontColor)
#: po/rc.cpp:60 rc.cpp:60
msgid "Font color"
msgstr ""
#. i18n: file: configwindow.ui:452
#. i18n: ectx: property (toolTip), widget (KColorCombo, kcolorcombo_fontColor)
#: po/rc.cpp:63 rc.cpp:63
msgid "Set font color"
msgstr ""
#. i18n: file: configwindow.ui:469
#. i18n: ectx: property (text), widget (QLabel, label_fontWeight)
#: po/rc.cpp:66 rc.cpp:66
msgid "Font weight"
msgstr ""
#. i18n: file: configwindow.ui:501
#. i18n: ectx: property (toolTip), widget (QSpinBox, spinBox_fontWeight)
#: po/rc.cpp:69 rc.cpp:69
msgid "Set font weight"
msgstr ""
#. i18n: file: configwindow.ui:533
#. i18n: ectx: property (text), widget (QLabel, label_fontStyle)
#: po/rc.cpp:72 rc.cpp:72
msgid "Font style"
msgstr ""
#. i18n: file: configwindow.ui:565
#. i18n: ectx: property (toolTip), widget (QComboBox, comboBox_fontStyle)
#: po/rc.cpp:75 rc.cpp:75
msgid "Set font style"
msgstr ""
#. i18n: file: configwindow.ui:569
#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_fontStyle)
#: po/rc.cpp:78 rc.cpp:78
msgid "normal"
msgstr ""
#. i18n: file: configwindow.ui:574
#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_fontStyle)
#: po/rc.cpp:81 rc.cpp:81
msgid "italic"
msgstr ""
#. i18n: file: configwindow.ui:605
#. i18n: ectx: property (text), widget (QLabel, label_activeIcon)
#: po/rc.cpp:84 rc.cpp:84
msgid "Active icon"
msgstr ""
#. i18n: file: configwindow.ui:638
#. i18n: ectx: property (text), widget (QLabel, label_inactiveIcon)
#: po/rc.cpp:90 rc.cpp:90
msgid "Inactive icon"
msgstr ""
#: po/rc.cpp:94 rc.cpp:94
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr ""
#: po/rc.cpp:95 rc.cpp:95
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr ""

View File