translation

master
Daniel Napora 2017-01-04 19:18:24 +01:00
parent f6f9026516
commit 3df171572d
3 changed files with 82 additions and 20 deletions

View File

@ -15,6 +15,21 @@ if ! . mabox-include.cfg 2> /dev/null; then
exit 1
fi
case $LANG in
pl*)
ENABLE="Włącz Kompozytora"
RESTART="Restartuj Kompozytora"
DISABLE="Wyłącz Kompozytora"
EDIT="Edytuj Ustawienia Kompozytora"
;;
*)
ENABLE="Enable Compositor"
RESTART="Restart Compositor"
DISABLE="Disable Compositor"
EDIT="Edit Compositor settings"
;;
esac
# ------------- Set xcompmgr command options -----------------------------------
EXECXCOMP='compton'
if glxinfo | egrep -iq 'direct rendering: yes'; then
@ -60,13 +75,13 @@ else
# Output Openbox menu
menuStart
if ! pidof compton > /dev/null; then
menuItem 'Włącz Kompozytora' 'mabox-compositor --start'
menuItem "$ENABLE" 'mabox-compositor --start'
else
menuItem 'Restartuj Kompozytora' 'mabox-compositor --restart'
menuItem 'Wyłącz Kompozytora' 'mabox-compositor --toggle'
menuItem "$RESTART" 'mabox-compositor --restart'
menuItem "$DISABLE" 'mabox-compositor --toggle'
menuSeparator
fi
menuItem 'Edytuj Ustawienia Kompozytora' 'mabox-compositor --edit'
menuItem "$EDIT" 'mabox-compositor --edit'
menuEnd
fi
exit 0

View File

@ -39,6 +39,32 @@ fi
declareDependencies yad
case $LANG in
pl*)
CHOOSE_CONKY="Wybierz Conky"
NEW_SESSION="Nowa sesja Conky"
RELOAD="Przeładuj Conky"
SAVED_SESSIONS="Zachowane sesje"
DEFAULT_CONKYRC="Domyślne conkyrc"
RUNNING_CONKY="Działające Conky"
EDIT_CONKY="Edytuj Conky"
CONKY_EDITOR="Conky edytor"
NONE="Brak"
;;
*)
CHOOSE_CONKY="Choose Conky"
NEW_SESSION="New Conky session"
RELOAD="Reload Conky"
SAVED_SESSIONS="Saved sessions"
DEFAULT_CONKYRC="Default conkyrc"
RUNNING_CONKY="Running Conky"
EDIT_CONKY="Edit Conky"
CONKY_EDITOR="Conky Editor"
NONE="None"
;;
esac
getSessions(){ # read any saved sessions from save-sessions file
menuItem "Default" "$CSESSION $CSESSIONFILE"
if [ -e "$SESSIONS" ]
@ -54,25 +80,25 @@ getSessions(){ # read any saved sessions from save-sessions file
loadChooserMenu(){
if type "$CZEN" &>/dev/null;then # mb-conkyzen script found
menuItem "Wybierz Conky" "$CZEN"
menuItem "$CHOOSE_CONKY" "$CZEN"
fi
}
loadNewsessionMenu(){
if type "$CZEN" &>/dev/null;then # mb-conkyzen script found
menuItem "Nowa sesja Conky" "$CZEN -z"
menuItem "$NEW_SESSION" "$CZEN -z"
fi
}
loadReloadMenu(){
if type "$CSESSION" &>/dev/null;then # mb-conky-session script found
menuItem "Przeładuj Conky" "$CSESSION"
menuItem "$RELOAD" "$CSESSION"
fi
}
loadSavedsessionSubmenu(){
if type "$CSESSION" &>/dev/null;then # mb-conky-session script found
menuSubmenu "Sessions" "Zachowane sesje"
menuSubmenu "Sessions" "$SAVED_SESSIONS"
getSessions
menuSubmenuEnd
fi
@ -86,9 +112,9 @@ loadPinMenu(){
}
loadEditMenu(){
menuItem "Domyślne conkyrc" "geany $CONKYDEFAULT"
menuItem "$DEFAULT_CONKYRC" "geany $CONKYDEFAULT"
if [[ $(pidof conky) ]];then
menuSubmenu "RunningConky" "Działające Conky"
menuSubmenu "RunningConky" "$RUNNING_CONKY"
while read -r session ;do # get running conkys from sessionfile
[[ -z $session ]] && continue
CPATH=$(echo "$session" | awk '{print $3}')
@ -97,14 +123,14 @@ loadEditMenu(){
done < "$CSESSIONFILE"
menuSubmenuEnd
else
menuItem "Brak"
menuItem "$NONE"
fi
}
getConkys(){
menuSubmenu "EditConky" "Edytuj Conky"
menuSubmenu "EditConky" "$EDIT_CONKY"
if type mb-conkyedit &>/dev/null;then # mb-conkyedit script found
menuItem "Edytor Conky" "mb-conkyedit"
menuItem "$CONKY_EDITOR" "mb-conkyedit"
loadEditMenu
else
loadEditMenu

View File

@ -27,18 +27,39 @@ if ! . "$MB_COMMON_LIBDIR/mabox-include.cfg" 2> /dev/null; then
exit 1
fi
case $LANG in
pl*)
RUNNING_TINT2="Działające Tint2"
DEFAULT_TINT2RC="Domyślny tint2rc"
EDIT_TINT2="Edytuj Tint2"
TINT2_EDITOR="Edytor Tint2"
CHOOSE_TINT2="Wybierz Tint2"
RESTART_TINT2="Restartuj Tint2"
;;
*)
RUNNING_TINT2="Running Tint2"
DEFAULT_TINT2RC="Default tint2rc"
EDIT_TINT2="Edit Tint2"
TINT2_EDITOR="Tint2 editor"
CHOOSE_TINT2="Choose Tint2"
RESTART_TINT2="Restart Tint2"
;;
esac
loadTEditmenu(){
menuSeparator
menuItem "Domyślny tint2rc" "geany $TINT2RC"
menuItem "$DEFAULT_TINT2RC" "geany $TINT2RC"
if [ "$(pidof tint2)" ];then
menuSubmenu "RunningTint2" "Działające Tint2"
menuSubmenu "RunningTint2" "$RUNNING_TINT2"
pgrep -a tint2 | while read -r pid cmd; do
if [[ ${cmd%% *} = tint2 ]]; then
TINT=${cmd##* }
TINT2=${TINT#$HOME/.config/}
if [[ $TINT = tint2 ]];then
TINT="$TINT2RC"
TINT2="Domyślny tint2rc"
TINT2="$DEFAULT_TINT2RC"
fi
menuItem "$TINT2" "geany $TINT"
fi
@ -48,9 +69,9 @@ loadTEditmenu(){
}
getTint2s(){
menuSubmenu "EditTint2" "Edytuj Tint2"
menuSubmenu "EditTint2" "$EDIT_TINT2"
if type mb-tint2edit &>/dev/null;then # mb-tint2edit script found
menuItem "Edytor Tint2" "mb-tint2edit"
menuItem "$TINT2_EDITOR" "mb-tint2edit"
loadTEditmenu
else
loadTEditmenu
@ -60,14 +81,14 @@ getTint2s(){
loadChoosermenu(){
if type $TZEN &>/dev/null;then # mb-tint2zen script found
menuItem "Wybierz Tint2" "$TZEN"
menuItem "$CHOOSE_TINT2" "$TZEN"
fi
}
loadRestartmenu(){
if [ "$(pidof tint2)" ];then
if type mb-tint2restart &>/dev/null;then # mb-tint2restart script found
menuItem "Restartuj Tint2" "mb-tint2restart"
menuItem "$RESTART_TINT2" "mb-tint2restart"
fi
fi
}