fixed a major defunct in the remove target of the new make system

restructured translations
updated configure/make
parent b0cf7c8f
......@@ -18,7 +18,7 @@ export_result ()
echo -e "MODE=\"$MODE\"\
\nPREFIX=\"$PREFIX\"\
\nDATADIR=\"$PREFIX/share/bashstyle-ng/\"\
\nDATADIR_LIST=( code data rc/{,ascii,bin,dirinfo,functions,generator,internal,settings,styles,wizard} terminfo/{,b,m,n} vim/{,colors} )\
\nDATADIR_LIST=( ui data rc/{,ascii,bin,dirinfo,functions,generator,internal,settings,styles,wizard} terminfo/{,b,m,n} vim/{,colors} )\
\nPROFILEDIR=\"/etc/profile.d/\"\
\nBINDIR=\"$PREFIX/bin\"\
\nLOCALEDIR=\"$PREFIX/share/locale/\"\
......
......@@ -4,8 +4,8 @@ clean () {
echo -e "${SMOOTHBLUE} [01/01] Cleaning up."
REMOVE_FILES=( data/bashstyle data/bashstyle-ng.pc data/bashstyle7.ui.h
data/bashstyle.sh rc/nx-rc translations/{pot,mo}/*
data/terminfo/{b,m,n}/* .configure/results make/.build_done )
data/bashstyle.sh rc/nx-rc i18n/??/*.mo i18n/*.pot
data/terminfo/?/* .configure/results make/.build_done )
if [[ $VERBOSE == "true" ]]; then
RM_NUM=${#REMOVE_FILES[@]}
......
#!/bin/bash
DATA_FILES=( ui/bsng.py:${DATADIR}/ui
ui/undobuffer.py:${DATADIR}/ui
ui/bashstyle7.ui:${DATADIR}/ui
DATA_FILES=( ui/*.{py,ui}:${DATADIR}/ui
rc/nx-rc:${DATADIR}/rc
rc/ascii/*:${DATADIR}/rc/ascii
rc/dirinfo/*:${DATADIR}/rc/dirinfo
......@@ -17,13 +15,10 @@ DATA_FILES=( ui/bsng.py:${DATADIR}/ui
data/terminfo/n/*:${DATADIR}/terminfo/n
data/vim/colors/*:${DATADIR}/vim/colors )
LOCALE_FILES=( translations/mo/bs-ng-de.mo:${LOCALEDIR}/de/LC_MESSAGES/bashstyle-ng.mo
translations/mo/nx-rc-de.mo:${LOCALEDIR}/de/LC_MESSAGES/nx-rc.mo
translations/mo/bs-ng-wizard-de.mo:${LOCALE_DIR}/de/LC_MESSAGES/bs-ng-wizard.mo
translations/mo/bs-ng-es.mo:${LOCALEDIR}/es/LC_MESSAGES/bashstyle-ng.mo
translations/mo/nx-rc-es.mo:${LOCALEDIR}/es/LC_MESSAGES/nx-rc.mo
translations/mo/bs-ng-it.mo:${LOCALEDIR}/it/LC_MESSAGES/bashstyle-ng.mo
translations/mo/bs-ng-ru.mo:${LOCALEDIR}/ru/LC_MESSAGES/bashstyle-ng.mo )
LOCALE_FILES=( i18n/de/*.mo:${LOCALEDIR}/de/LC_MESSAGES/
i18n/es/*.mo:${LOCALEDIR}/es/LC_MESSAGES/
i18n/it/*.mo:${LOCALEDIR}/it/LC_MESSAGES/
i18n/ru/*.mo:${LOCALEDIR}/ru/LC_MESSAGES/ )
DOC_FILES=( documentation/*.html:${DOCDIR}
documentation/img/*.png:${DOCDIR}/img
......@@ -38,3 +33,11 @@ PROFILE_FILES=( data/bashstyle.sh:${PROFILEDIR} )
ICON_FILES=( data/icons/*.png:${ICONDIR} )
PC_FILES=( data/bashstyle-ng.pc:${PCDIR} )
REMOVE_FILES=( ${LOCALEDIR}/{de,es,it,ru}/{bs-ng{,-wizard},nx-rc}.mo
${BINDIR}/bashstyle
${ICONDIR}/bs-ng*.png
${PCDIR}/bashstyle-ng.pc
${PROFILEDIR}/bashstyle.sh
${DOCDIR}
${DATADIR} )
......@@ -13,12 +13,11 @@ generate_pot () {
echo -e "${YELLOW} [01/01] Generating .pot files."
intltool-extract --type=gettext/glade ui/bashstyle7.ui >/dev/null
xgettext -L python --keyword=_ --keyword=N_ --output=translations/pot/bs-ng.pot \
ui/bsng.py ui/bashstyle7.ui.h >/dev/null
xgettext -L python --keyword=_ --keyword=N_ --output=i18n/bs-ng.pot ui/bsng.py ui/bashstyle7.ui.h >/dev/null
xgettext -o translations/pot/nx-rc.pot -L shell rc/nx-rc rc/settings/*-rc 2>/dev/null
xgettext -o i18n/nx-rc.pot -L shell rc/nx-rc rc/settings/*-rc 2>/dev/null
xgettext -o translations/pot/bs-ng-wizard.pot -L shell rc/bin/bs-ng-wizard rc/wizard/* 2>/dev/null
xgettext -o i18n/bs-ng-wizard.pot -L shell rc/bin/bs-ng-wizard rc/wizard/* 2>/dev/null
}
......@@ -26,35 +25,33 @@ update_po () {
local CUR_NUM=1
echo -e "${YELLOW} [01/02] Updating UI-po files (${BSNG_LANGS[@]})."
for po in ${BSNG_LANGS[@]}; do
for lang in ${BSNG_LANGS[@]}; do
if [[ $VERBOSE == "true" ]]; then
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$BSNG_NUM] ${po}"
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$BSNG_NUM] ${lang}"
local CUR_NUM=$(($CUR_NUM+1))
fi
msgmerge -q -o translations/po/bs-ng-${po}.po translations/po/bs-ng-${po}.po \
translations/pot/bs-ng.pot >/dev/null
msgmerge -q -o i18n/${lang}/bs-ng.po i18n/${lang}/bs-ng.po i18n/bs-ng.pot >/dev/null
done
local CUR_NUM=1
echo -e "${YELLOW} [02/02] Updating Wizard-po files (${WIZARD_LANGS[@]})."
for po in ${WIZARD_LANGS[@]}; do
for lang in ${WIZARD_LANGS[@]}; do
if [[ $VERBOSE == "true" ]]; then
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$WIZARD_NUM] ${po}"
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$WIZARD_NUM] ${lang}"
local CUR_NUM=$(($CUR_NUM+1))
fi
msgmerge -q -o translations/po/bs-ng-wizard-${po}.po translations/po/bs-ng-wizard-${po}.po \
translations/pot/bs-ng-wizard.pot >/dev/null
msgmerge -q -o i18n/${lang}/bs-ng-wizard.po i18n/${lang}/bs-ng-wizard.po \
i18n/bs-ng-wizard.pot >/dev/null
done
local CUR_NUM=1
echo -e "${YELLOW} [02/02] Updating NX-po files (${NXRC_LANGS[@]})."
for po in ${NXRC_LANGS[@]}; do
for lang in ${NXRC_LANGS[@]}; do
if [[ $VERBOSE == "true" ]]; then
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$NXRC_NUM] ${po}"
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$NXRC_NUM] ${lang}"
local CUR_NUM=$(($CUR_NUM+1))
fi
msgmerge -q -o translations/po/nx-rc-${po}.po translations/po/nx-rc-${po}.po \
translations/pot/nx-rc.pot >/dev/null
msgmerge -q -o i18n/${lang}/nx-rc.po i18n/${lang}/nx-rc.po i18n/nx-rc.pot >/dev/null
done
}
......@@ -63,32 +60,32 @@ generate_mo () {
local CUR_NUM=1
echo -e "${YELLOW} [02/03] Generating UI-mo files (${BSNG_LANGS[@]})."
for po in ${BSNG_LANGS[@]}; do
for lang in ${BSNG_LANGS[@]}; do
if [[ $VERBOSE == "true" ]]; then
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$BSNG_NUM] ${po}"
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$BSNG_NUM] ${lang}"
local CUR_NUM=$(($CUR_NUM+1))
fi
msgfmt --output-file=translations/mo/bs-ng-${po}.mo translations/po/bs-ng-${po}.po
msgfmt --output-file=i18n/${lang}/bs-ng.mo i18n/${lang}/bs-ng.po
done
local CUR_NUM=1
echo -e "${YELLOW} [02/03] Generating Wizard-mo files (${WIZARD_LANGS[@]})."
for po in ${WIZARD_LANGS[@]}; do
for lang in ${WIZARD_LANGS[@]}; do
if [[ $VERBOSE == "true" ]]; then
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$WIZARD_NUM] ${po}"
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$WIZARD_NUM] ${lang}"
local CUR_NUM=$(($CUR_NUM+1))
fi
msgfmt --output-file=translations/mo/bs-ng-wizard-${po}.mo translations/po/bs-ng-wizard-${po}.po
msgfmt --output-file=i18n/${lang}/bs-ng-wizard.mo i18n/${lang}/bs-ng-wizard.po
done
local CUR_NUM=1
echo -e "${YELLOW} [03/03] Generating NX-mo files (${NXRC_LANGS[@]})."
for po in ${NXRC_LANGS[@]}; do
for lang in ${NXRC_LANGS[@]}; do
if [[ $VERBOSE == "true" ]]; then
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$NXRC_NUM] ${po}"
echo -e "${SMOOTHBLUE}\t[$CUR_NUM/$NXRC_NUM] ${lang}"
local CUR_NUM=$(($CUR_NUM+1))
fi
msgfmt --output-file=translations/mo/nx-rc-${po}.mo translations/po/nx-rc-${po}.po
msgfmt --output-file=i18n/${lang}/nx-rc.mo i18n/${lang}/nx-rc.po
done
}
......@@ -34,7 +34,7 @@ uninst ()
FILE=${xFILE/*\/}
DEST=${1/*:}
rm -f ${DESTDIR}${DEST}/${FILE}
rm -rf ${DESTDIR}${DEST}/${FILE}
unset FILE DEST
......@@ -83,8 +83,7 @@ install_bsng () {
remove_bsng () {
echo -e "${RED} [02/03] Removing all files."
for file in ${DATA_FILES[@]} ${LOCALE_FILES[@]} ${DOC_FILES[@]} \
${PC_FILES[@]} ${ICON_FILES[@]} ${PROFILE_FILES[@]} ${BIN_FILES[@]}; do
for file in ${REMOVE_FILES[@]}; do
uninst "$file"
done
......
......@@ -25,29 +25,3 @@ installdirs_create ()
mkdir -p $DESTDIR/$PCDIR
}
installdirs_remove ()
{
echo -e "${RED} [03/03] Removing directories."
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$DATADIR
for directory in ${DATADIR_LIST[@]}; do
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$DATADIR/$directory
done
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$LOCALEDIR
for directory in ${LOCALEDIR_LIST[@]}; do
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$LOCALEDIR/$directory/
done
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$DOCDIR
for directory in ${DOCDIR_LIST[@]}; do
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$DOCDIR/$directory
done
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$BINDIR
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$PROFILEDIR
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$ICONDIR
rmdir -p --ignore-fail-on-non-empty $DESTDIR/$PCDIR
}
......@@ -7,7 +7,7 @@ install:
@./make install
uninstall:
@./make uninstall
@./make remove
clean:
@./make clean
......
......@@ -2,6 +2,6 @@
cd @PREFIX@/share/bashstyle-ng/
export PYTHONPATH="$PYTHONPATH:@PREFIX@/share/bashstyle-ng/code/"
export PYTHONPATH="$PYTHONPATH:@PREFIX@/share/bashstyle-ng/ui/"
python $PWD/code/bsng.py $@
python $PWD/ui/bs-ng.py $@
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: BashStyle-NG 7.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-01 08:40+0100\n"
"POT-Creation-Date: 2010-11-01 18:37+0100\n"
"PO-Revision-Date: 2010-11-01 08:43+0100\n"
"Last-Translator: Christopher Roy Bratusek <zanghar@freenet.de>\n"
"Language-Team: German <zanghar@freenet.de>\n"
......
......@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: BashStyle-NG 7.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-01 08:40+0100\n"
"POT-Creation-Date: 2010-11-01 18:37+0100\n"
"PO-Revision-Date: 2010-10-30 21:54+0200\n"
"Last-Translator: Christopher Roy Bratusek <zanghar@freenet.de>\n"
"Language-Team: German <zanghar@freenet.de>\n"
......
......@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: BashStyle-NG 7.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-01 08:40+0100\n"
"POT-Creation-Date: 2010-11-01 18:37+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Kenny Meyer <knny.myer@gmail.com>\n"
"Language-Team: Spansih <knny.myer@gmail.com>\n"
......
......@@ -48,7 +48,7 @@ while [[ $xcount -lt $pcount ]]; do
echo -e "\n${RED}You're not root!\n"
exit 1
fi
pre_remove && remove_bsng && installdirs_remove ;;
pre_remove && remove_bsng ;;
changelog ) $PWD/.make/changelog ;;
......
......@@ -75,7 +75,7 @@ groups = {
initial_page = groups[options.group]
_ = gettext.gettext
APP_NAME = "bashstyle-ng"
APP_NAME = "bs-ng"
icon_theme = gtk.icon_theme_get_default()
......
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