Commit 0096dcbc authored by Graeme Gott's avatar Graeme Gott

Generate desktop file during compile.

parent 3225cc22
po/LINGUAS
......@@ -118,7 +118,6 @@ if(CMAKE_BUILD_TYPE_TOLOWER MATCHES "release|minsizerel|relwithdebinfo")
endif()
install(TARGETS whiskermenu LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/xfce4/panel/plugins)
install(FILES whiskermenu.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/xfce4/panel/plugins)
# popup script
configure_file(${PROJECT_SOURCE_DIR}/panel-plugin/xfce4-popup-whiskermenu.in
......
[Xfce Panel]
Type=X-XFCE-PanelPlugin
Encoding=UTF-8
Name=Whisker Menu
Name[am]=የ ዊስከር ዝርዝር
Name[ar]=قائمة Whisker
Name[ast]=Menú Whisker
Name[be]=Меню Whisker
Name[bg]=Whisker Меню
Name[ca]=Menú Whisker
Name[ca@valencia]=Menú Whisker
Name[cs]=Nabídka Whisker
Name[cy]=Dewislen Whisker
Name[da]=Whiskermenu
Name[de]=Whisker-Menü
Name[el]=Μενού Whisker
Name[en_GB]=Whisker Menu
Name[eo]=La menuo Whisker
Name[es]=Menú Whisker
Name[et]=Whisker Menüü
Name[eu]=Whisker Menua
Name[fa]=منوی Whisker
Name[fi]=Whisker-valikko
Name[fr]=Menu Whisker
Name[gl]=Menú Whisker
Name[he]=תפריט Whisker
Name[hr]=Whisker Izbornik
Name[hu]=Whisker Menü
Name[id]=Menu Whisker
Name[ie]=Menú Whisker
Name[is]=Whisker-valmynd
Name[it]=Menu Whisker
Name[ja]=Whisker Menu
Name[ka]=ვისკერ მენიუ
Name[kk]=Whisker мәзірі
Name[ko]=휘스커 메뉴
Name[lt]=Whisker meniu
Name[lv]=Whisker izvēlne
Name[ms]=Menu Whisker
Name[nb]=Whisker-meny
Name[ne]=विस्कर मेन्यू
Name[nl]=Whiskermenu
Name[pl]=Menu Whisker
Name[pt]=Menu Whisker
Name[pt_BR]=Menu Whisker
Name[ro]=Meniu Whisker
Name[ru]=Меню Whisker
Name[sk]=Whisker Menu
Name[sl]=Whisker meni
Name[sr]=Бркин изборник
Name[sr@latin]=Brkin izbornik
Name[sv]=Whisker Meny
Name[tr]=Whisker Menü
Name[uk]=Whisker Меню
Name[uz]=Whisker menyusi
Name[vi]=Thực đơn Whisker
Name[zh_CN]=Whisker 菜单
Name[zh_TW]=Whisker 選單
Comment=Show a menu to easily access installed applications
Comment[am]=የ ተገጠሙ መተግበሪያዎች በ ቀላሉ በ ዝርዝር ውስጥ ማሳያ
Comment[ar]=إظهار قائمة لولوج إلى التطبيقات المثبتة بسهولة
Comment[ast]=Amuesa un menú p'acceder cenciellamente a les aplicaciones instalaes
Comment[be]=Адлюстроўвае меню для зручнага доступу да ўсталяваных праграм
Comment[bg]=Показване на меню за лесен достъп до инсталираните приложения
Comment[ca]=Mostra un menú per accedir fàcilment a les aplicacions instal·lades
Comment[ca@valencia]=Mostra un menú per a accedir fàcilment a les aplicacions instal·lades
Comment[cs]=Zobrazovat nabídku pro snadný přístup k nainstalovaným aplikacím
Comment[cy]=Dewislen i gael hyd at eich rhaglenni yn hawdd
Comment[da]=Vis en menu for hurtig adgang til installerede programmer
Comment[de]=Zeigt ein Menü, um einfach auf installierte Anwendungen zuzugreifen
Comment[el]=Εμφάνιση μενού για εύκολη πρόσβαση στις εγκατεστημένες εφαρμογές
Comment[en_GB]=Show a menu to easily access installed applications
Comment[eo]=Montri menuon por facile aliri al instalitaj aplikaĵoj
Comment[es]=Mostrar un menú para acceder fácilmente a las aplicaciones instaladas
Comment[fa]=نمایش یک منو برای دسترسی آسان به برنامه‌های نصب‌شده
Comment[fi]=Näytä valikko, josta on helppo pääsy asennettuihin sovelluksiin
Comment[fr]=Afficher un menu pour accéder facilement aux applications installées
Comment[gl]=Amosar un menú para acceder doadamente as aplicacións instaladas
Comment[he]=הצג תפריט כדי לגשת בקלות אל יישומים מותקנים
Comment[hr]=Prikaži izbornik da bi lakše pristupili instaliranim aplikacijama
Comment[hu]=menü megjelenítése a telepített alkalmazások könnyű eléréséhez
Comment[id]=Tampilkan menu untuk mempermudah akses aplikasi yang terinstal
Comment[ie]=Monstrar un menú por facil accesse al installat applicationes
Comment[is]=Sýna valmynd til að auðvelda aðgang að uppsettum forritum
Comment[it]=Mostra un menu per accedere facilmente alle applicazioni installate
Comment[ja]=インストールされているアプリケーションに簡単にアクセスできるメニューを表示します
Comment[ka]=დაყენებული პროგრამების ადვილად მისაწვდომად, მენიუს გამოჩენა
Comment[kk]=Орнатылған қолданбаларға қатынау үшін қарапайым мәзірді көрсету
Comment[ko]=설치된 프로그램에 쉽게 접근하도록 메뉴 보이기
Comment[lt]=Rodyti meniu, siekiant lengvai pasiekti įdiegtas programas
Comment[lv]=Rādīt izvēlni ērtākai piekļuvei programmām
Comment[ms]=Tunjuk menu untuk capai aplikasi terpasang dengan mudah
Comment[nb]=Vis en meny for enkel tilgang til installerte applikasjoner
Comment[ne]=स्थापित अनुप्रयोगहरुको सहज पहुचको लागी एक मेन्यू देखाउनुहोस्
Comment[nl]=Toon een menu om geïnstalleerde toepassingen eenvoudig op te starten
Comment[pl]=Wyświetla aktywatory zainstalowanych programów rozmieszczone w menu
Comment[pt]=Mostrar um menu de fácil acesso às aplicações instaladas
Comment[pt_BR]=Mostrar um menu para acessar facilmente os aplicativos instalados
Comment[ro]=Arată un meniu pentru a accesa ușor aplicații instalate
Comment[ru]=Показывает меню для простого доступа к установленным приложениям
Comment[sk]=Zobrazí menu na jednoduché prechádzanie nainštalovanými aplikáciami
Comment[sl]=Prikaži meni za preprost dostop do nameščenih programov
Comment[sr]=Приказуј изборник за брзи приступ уграђеним програмима
Comment[sr@latin]=Prikazuj izbornik za brzi pristup ugrađenim programima
Comment[sv]=Visa en meny för att enkelt komma åt installerade program
Comment[tr]=Kolayca yüklenen uygulamalara erişmek için bir menü göster
Comment[uk]=Показ меню для легкого доступу до програм
Comment[uz]=O'rnatilgan dasturlardan erkin foydalanish uchun menyu ko'rsatish
Comment[vi]=Hiển thị thực đơn để chạy ứng dụng dễ dàng
Comment[zh_CN]=显示一个易于访问已安装程序的菜单
Comment[zh_TW]=顯示選單以方便開啟已安裝的應用程式
Icon=xfce4-whiskermenu
X-XFCE-Module=whiskermenu
X-XFCE-Internal=false
X-XFCE-API=2.0
[Xfce Panel]
Type=X-XFCE-PanelPlugin
Encoding=UTF-8
Name=Whisker Menu
Comment=Show a menu to easily access installed applications
Icon=xfce4-whiskermenu
X-XFCE-Module=whiskermenu
X-XFCE-Internal=false
X-XFCE-API=2.0
find_package(Gettext REQUIRED)
find_package(Gettext 0.19.1 REQUIRED)
# Generate translations
file(GLOB _po_files *.po)
foreach(_po_file ${_po_files})
get_filename_component(_lang ${_po_file} NAME_WE)
list(APPEND _linguas ${_lang})
set(_gmo_file ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
list(APPEND _gmo_files ${_gmo_file})
......@@ -20,3 +21,25 @@ foreach(_po_file ${_po_files})
)
endforeach()
add_custom_target(translations ALL DEPENDS ${_gmo_files})
# Generate desktop file
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS
COMMAND ${CMAKE_COMMAND} -E echo "${_linguas}" > ${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS
COMMAND_EXPAND_LISTS
COMMENT "Generating LINGUAS"
)
add_custom_command(
OUTPUT whiskermenu.desktop
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
--desktop
--template=${PROJECT_SOURCE_DIR}/panel-plugin/whiskermenu.desktop.in
-d ${CMAKE_CURRENT_SOURCE_DIR}
-o whiskermenu.desktop
DEPENDS ${_po_files} ${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/whiskermenu.desktop
DESTINATION ${CMAKE_INSTALL_DATADIR}/xfce4/panel/plugins
)
add_custom_target(desktopfile ALL DEPENDS whiskermenu.desktop)
#!/bin/sh
BASEDIR=../panel-plugin
WDIR=`pwd`
echo -n 'Preparing desktop file...'
cd ${BASEDIR}
rm -f whiskermenu.desktop.in
cp whiskermenu.desktop whiskermenu.desktop.in
sed -e '/Name\[/ d' \
-e '/Comment\[/ d' \
-e 's/Name/_Name/' \
-e 's/Comment/_Comment/' \
-i whiskermenu.desktop.in
cd ${WDIR}
echo ' DONE'
echo -n 'Updating translations... '
for POFILE in *.po;
do
POLANG="${POFILE%%.*}"
echo -n "$POLANG "
if [ -f "/usr/share/locale/$POLANG/LC_MESSAGES/xfce4-appfinder.mo" ]; then
msgunfmt "/usr/share/locale/$POLANG/LC_MESSAGES/xfce4-appfinder.mo" > "appfinder-$POFILE"
else
touch "appfinder-$POFILE"
fi
if [ -f "/usr/share/locale/$POLANG/LC_MESSAGES/xfce4-panel.mo" ]; then
msgunfmt "/usr/share/locale/$POLANG/LC_MESSAGES/xfce4-panel.mo" > "panel-$POFILE"
else
touch "panel-$POFILE"
fi
if [ -f "/usr/share/locale/$POLANG/LC_MESSAGES/gtk30.mo" ]; then
msgunfmt "/usr/share/locale/$POLANG/LC_MESSAGES/gtk30.mo" > "gtk30-$POFILE"
else
touch "gtk30-$POFILE"
fi
msgmerge --quiet --update --backup=none \
--compendium="appfinder-$POFILE" \
--compendium="panel-$POFILE" \
--compendium="gtk30-$POFILE" \
$POFILE xfce4-whiskermenu-plugin.pot
rm -f "appfinder-$POFILE" "panel-$POFILE" "gtk30-$POFILE"
done
echo 'DONE'
echo -n 'Merging desktop file translations...'
cd ${BASEDIR}
intltool-merge --quiet --desktop-style ${WDIR} whiskermenu.desktop.in whiskermenu.desktop
rm -f whiskermenu.desktop.in
echo ' DONE'
......@@ -2,19 +2,6 @@
BASEDIR=../panel-plugin
WDIR=`pwd`
echo -n 'Preparing desktop file...'
cd ${BASEDIR}
rm -f whiskermenu.desktop.in
cp whiskermenu.desktop whiskermenu.desktop.in
sed -e '/Name\[/ d' \
-e '/Comment\[/ d' \
-e '/Icon/ d' \
-i whiskermenu.desktop.in
cd ${WDIR}
echo ' DONE'
echo -n 'Extracting messages...'
......@@ -22,13 +9,7 @@ echo -n 'Extracting messages...'
xgettext --from-code=UTF-8 --c++ --keyword=_ --sort-output \
--package-name='Whisker Menu' --copyright-holder='Graeme Gott' \
--output=xfce4-whiskermenu-plugin.pot ${BASEDIR}/*.cpp ${BASEDIR}/*.h
xgettext --from-code=UTF-8 --join-existing --sort-output \
xgettext --from-code=UTF-8 -k --keyword=Name --keyword=Comment --join-existing --sort-output \
--package-name='Whisker Menu' --copyright-holder='Graeme Gott' \
--output=xfce4-whiskermenu-plugin.pot ${BASEDIR}/*.desktop.in
echo ' DONE'
echo -n 'Cleaning up...'
cd ${BASEDIR}
rm -f whiskermenu.desktop.in
echo ' DONE'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment