pl translation

This commit is contained in:
2026-03-18 02:49:13 +01:00
parent d73ec4f803
commit ad0b8728f8
3 changed files with 160 additions and 62 deletions

View File

@@ -3,6 +3,26 @@
# mabox-todo.sh - conky widget + menus to interact with todo.sh
case "$LANG" in
pl*)
_ADD_NEWTASK="Dodaj nowe zadanie..."
_ADD="dodaj"
_ABORT="anuluj"
_TASKDESC="Zadanie +projekt @kontekst"
_ADD_NEWTODOLIST="Nowa lista zadan..."
_TODONAME="Nazwa Listy"
;;
*)
_ADD_NEWTASK="Add new task..."
_ADD="add"
_ABORT="abort"
_TASKDESC="Task description +Project @Context"
_ADD_NEWTODOLIST="Add new TODO list..."
_TODONAME="TODO List name"
;;
esac
# Config file
CFG_FILE=~/.config/mabox/mabox-todo.conf
if [ ! -f "$CFG_FILE" ];then
@@ -38,8 +58,8 @@ prettyname=${filename//_/ }
[[ "$hide_priority" == "y" ]] && options+=("-P")
#header="Project:$filename \${alignc}TODO.txt (click me!)\${alignr}Filter:\${voffset 8}"
header="\${color0}\${alignc}TODO List
\${alignc}${prettyname}\${alignr}#[filter: $filterlabel]
header="#\${color0}\${alignc}TODO List
\${color0}\${alignc}${prettyname}\${alignr}#[filter: $filterlabel]
\${voffset 8}"
#declare -a cmd=(todo.sh ${options[@]} -d ~/.config/todo/config-conky ${action} ${filter})
#out+=$(${cmd[@]})
@@ -85,7 +105,7 @@ clearfilter(){
sd "filter.*$" "filter=" ${CFG_FILE}
}
addtask(){
task=$(yad --width=400 --center --border=40 --undecorated --no-buttons --close-on-unfocus --text-align=center --text "<big><b>Add new task...</b></big>\n <b>Enter</b> - add | <b>Esc</b> - abort" --entry --entry-text="Task description +Project @Context" --ricon=gtk-clear)
task=$(yad --width=400 --center --border=40 --undecorated --no-buttons --close-on-unfocus --text-align=center --text "<big><b>$_ADD_NEWTASK</b></big>\n <b>Enter</b> - $_ADD | <b>Esc</b> - $_ABORT" --entry --entry-text="$_TASKDESC" --ricon=gtk-clear)
if [ ! -z "${task}" ];then
#notify-send.sh "okej" "${task}"
pass_to_todo_sh add "${task}"
@@ -94,7 +114,7 @@ else
fi
}
addfile(){
file=$(yad --skip-taskbar --width=400 --center --border=40 --undecorated --no-buttons --text-align=center --text "Add new TODO list..." --entry --entry-text="List name" --ricon=gtk-clear)
file=$(yad --skip-taskbar --width=400 --center --border=40 --undecorated --no-buttons --text-align=center --text "$_ADD_NEWTODOLIST" --entry --entry-text="$_TODONAME" --ricon=gtk-clear)
if [ ! -z "${file}" ];then
#Remove spaces
file=${file// /_}
@@ -153,8 +173,8 @@ conkyctl startone $HOME/.config/conky/TODOlist_mbcolor.conkyrc
case "$1" in
-c) to_conky;;
init|-i)init;;
listfiles|l)listfiles;; #list task files
switchfile|s)switchfile "$2";; #switch to tasks file
listfiles|l|-l)listfiles;; #list task files
switchfile|s|-s)switchfile "$2";; #switch to tasks file
filter)filter "$2";;
clearfilter) clearfilter;;
addtask)addtask;;