diff --git a/config/alsa-module.widget b/config/alsa-module.widget index 3d48636..9c4f084 100644 --- a/config/alsa-module.widget +++ b/config/alsa-module.widget @@ -45,8 +45,8 @@ layout { button { value = $XAlsaIcon trigger = "alsa" - tooltip = "Volume: " + Str(XAlsaVolume,0) + "%" + - If(XAlsaMuted," (muted)","") + tooltip = GT("Volume") + ": " + Str(XAlsaVolume,0) + "%" + + If(XAlsaMuted," (" + GT("muted") + ")","") style = If(Ident(alsa),"module","hidden") action[Ctrl+LeftClick] = AlsaCmd "playback-mute toggle" action[RightClick] = PopUp "XAlsaWindow" diff --git a/config/alsa.widget b/config/alsa.widget index 99132d1..3e6ed93 100644 --- a/config/alsa.widget +++ b/config/alsa.widget @@ -18,7 +18,7 @@ layout { style = "module" button { value = $AlsaIcon - tooltip = "Volume: " + Str(AlsaVolume,0) + "%" + If(AlsaMuted," (muted)","") + tooltip = GT("Volume") + ": " + Str(AlsaVolume,0) + "%" + If(AlsaMuted," (" + GT("muted") + ")","") style = If(Ident($AlsaVolume),"module","hidden") trigger = "alsactl" action[LeftClick] = Exec "amixer sset Master toggle\n" diff --git a/config/battery-svg.widget b/config/battery-svg.widget index 5df7a9e..6d8b0f6 100644 --- a/config/battery-svg.widget +++ b/config/battery-svg.widget @@ -56,9 +56,9 @@ layout { action[0] = PipeRead If(!Ident(BSDCtl),XBatteryInit,"") value = $XBatterySvg style = If(!Ident($XBatteryState) & !Ident(BSDCtl),"hidden","module") - tooltip = Str(XBatteryLevel) + "%" + If(XBatteryTime, " " + - Str(XBatteryTime/60 - XBatteryTime%60/60) + "h" + - Str(XBatteryTime%60) + "m", "") + tooltip = GT("Battery") + ": " + Str(XBatteryLevel) + "%" + If(XBatteryTime, " " + + Str(XBatteryTime/60 - XBatteryTime%60/60) + GT("h") + + Str(XBatteryTime%60) + GT("m"), "") interval = 1000 } } diff --git a/config/bluez-popup.widget b/config/bluez-popup.widget index 2c1f197..111fea6 100644 --- a/config/bluez-popup.widget +++ b/config/bluez-popup.widget @@ -40,7 +40,7 @@ Function("XBluezUpdate") { "loc(1,0,2,1)" + "} " + "label '" + BluezGet("Path") +"_status' {" + - "value = '" + If(BluezState("Connecting")," Connecting ...","") + "' " + + "value = '" + If(BluezState("Connecting")," " + GT("Connecting") + " ...","") + "' " + "style = 'XBluezStatus' " + "interval = 0 " + "loc(2,1,1,1)" + diff --git a/config/bluez.widget b/config/bluez.widget index 7ddf47e..9d9a703 100644 --- a/config/bluez.widget +++ b/config/bluez.widget @@ -2,8 +2,8 @@ module("bluez") TriggerAction "bluez_updated", Function "XBluezUpdate" TriggerAction "bluez_removed", Function "XBluezRemove" -TriggerAction "bluez_scan", SetValue "XBluezScanButton", "Scanning ..." -TriggerAction "bluez_scan_complete", SetValue "XBluezScanButton", "Scan" +TriggerAction "bluez_scan", SetValue "XBluezScanButton", GT("Scanning") + " ..." +TriggerAction "bluez_scan_complete", SetValue "XBluezScanButton", GT("Scan") set XBluezTmpl = " grid 'XBluezGrid@BLUEZ_PAIRED@' { @@ -39,10 +39,10 @@ grid 'XBluezGrid@BLUEZ_PAIRED@' { }" Menu("XBluezItemMenu") { - item("Connect", BluezConnect Extract(WidgetId(),"(.*)_grid") ); - item("Disconnect", BluezDisConnect Extract(WidgetId(),"(.*)_grid") ); - item("Pair", BluezPair Extract(WidgetId(),"(.*)_grid") ); - item("Remove", BluezRemove Extract(WidgetId(),"(.*)_grid") ); + item(GT("Connect"), BluezConnect Extract(WidgetId(),"(.*)_grid") ); + item(GT("Disconnect"), BluezDisConnect Extract(WidgetId(),"(.*)_grid") ); + item(GT("Pair"), BluezPair Extract(WidgetId(),"(.*)_grid") ); + item(GT("Remove"), BluezRemove Extract(WidgetId(),"(.*)_grid") ); } Function("XBluezUpdate") { @@ -91,21 +91,21 @@ PopUp "XBluezWindow" { } style = "XBluezFrame" label { - value = "Paired devices" + value = GT("Paired devices") style = "XBluezSeparator" } grid "XBluezGridPaired" { style = "XBluezSection" } label { - value = "Available devices" + value = GT("Available devices") style = "XBluezSeparator" } grid "XBluezGridAvail" { style = "XBluezSection" } label "XBluezScanButton" { - value = "Scan" + value = GT("Scan") style = "XBluezScan" action = BluezScan } @@ -119,6 +119,7 @@ layout { style = "module" value = "bluetooth" action = Function "XBluezPop" + tooltip = "Bluetooth" } } diff --git a/config/cal.widget b/config/cal.widget index 523120b..0c218a7 100644 --- a/config/cal.widget +++ b/config/cal.widget @@ -57,18 +57,18 @@ Set XCalMOff = (Val(Map(Str(XCalMonth), "0"))+If(XCalMonth>2 & XCalYearIsLeap,1,0))%7 Set XCalDate = Map(Str(XCalMonth), - "1", "January", - "2", "February", - "3", "March", - "4", "April", - "5", "May", - "6", "June", - "7", "July", - "8", "August", - "9", "September", - "10", "October", - "11", "November", - "12", "December", + "1", GT("January"), + "2", GT("February"), + "3", GT("March"), + "4", GT("April"), + "5", GT("May"), + "6", GT("June"), + "7", GT("July"), + "8", GT("August"), + "9", GT("September"), + "10", GT("October"), + "11", GT("November"), + "12", GT("December"), "Huh?") + " " + Str(XCalYear) Function("XCalPopUp") { @@ -170,37 +170,37 @@ Popup("XCal") { loc(1,4) style = 'cal_grid' label { - value = "Mo" + value = GT("Mo") style = "cal_cell_current" loc(0,0) } label { - value = "Tu" + value = GT("Tu") style = "cal_cell_current" loc(1,0) } label { - value = "We" + value = GT("We") style = "cal_cell_current" loc(2,0) } label { - value = "Th" + value = GT("Th") style = "cal_cell_current" loc(3,0) } label { - value = "Fr" + value = GT("Fr") style = "cal_cell_current" loc(4,0) } label { - value = "Sa" + value = GT("Sa") style = "cal_cell_current" loc(5,0) } label { - value = "Su" + value = GT("Su") style = "cal_cell_current" loc(6,0) } diff --git a/config/memory.widget b/config/memory.widget index 2dae0ca..1ae21f3 100644 --- a/config/memory.widget +++ b/config/memory.widget @@ -5,7 +5,7 @@ layout { interval = 1000 style = If(XMemPresent,"memory","hidden") value = XMemUtilization - tooltip = "Memory: " + Str(XMemUtilization*100) + "%" + tooltip = GT("Memory") + ": " + Str(XMemUtilization*100) + "%" action = Exec $Term + " -e top -o %MEM" } } diff --git a/config/ncenter.widget b/config/ncenter.widget index 4465b19..87be148 100644 --- a/config/ncenter.widget +++ b/config/ncenter.widget @@ -138,7 +138,7 @@ Function("XNotificationRemove") { PopUp "XNotificationWindow" { style = "notification_popup" label { - value = "Notification Center" + value = GT("Notification Center") style = "notification_header" loc(1,1,2,1) } diff --git a/config/showdesktop.widget b/config/showdesktop.widget index 7361e98..0603d0b 100644 --- a/config/showdesktop.widget +++ b/config/showdesktop.widget @@ -49,7 +49,7 @@ layout { button { value = "user-desktop" style = "showdesktop" - tooltip = "Show Desktop" + tooltip = GT("Show Desktop") action = Function "target", "ShowDesktop" } taskbar "target" { diff --git a/config/startmenu.widget b/config/startmenu.widget index a69c57d..5953c41 100644 --- a/config/startmenu.widget +++ b/config/startmenu.widget @@ -5,6 +5,6 @@ layout { value = "open-menu" style = "startmenu" action = Menu "app_menu_system" - tooltip = "Application menu" + tooltip = GT("Application menu") } } diff --git a/config/volume.widget b/config/volume.widget index 8443c24..6a5559c 100644 --- a/config/volume.widget +++ b/config/volume.widget @@ -19,7 +19,7 @@ Menu('XVolumeSinkMenu') { }" Menu('XVolumeDeviceMenu') { - Item("Set As Default Device", + Item(GT("Set As Default Device"), { VolumeCtl 'sink-set-default-device ' + Extract(WidgetId(), '(.*)_name') } ) } @@ -43,7 +43,7 @@ grid 'volume_section_@DEVICE_IFACE@' { image '@DEVICE_ID@_expand' { value = 'pan-end' style = 'volume_control_expander' - tooltip = 'expand/collapse channels' + tooltip = GT('expand/collapse channels') action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } @@ -61,7 +61,7 @@ grid 'volume_section_@DEVICE_IFACE@' { 'checkbox-checked', 'checkbox') style = If('@DEVICE_IFACE@' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') - tooltip = 'set as default @DEVICE_IFACE@' + tooltip = GT('set as default') + ' @DEVICE_IFACE@' trigger = 'volume' action = VolumeCtl '@DEVICE_IFACE@-set-default @DEVICE_ID@' } @@ -69,7 +69,7 @@ grid 'volume_section_@DEVICE_IFACE@' { value = 'open-menu' style = If('@DEVICE_IFACE@' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') - tooltip = 'route to sink' + tooltip = GT('route to sink') action = Menu 'XVolumeSinkMenu' trigger = 'volume' } @@ -152,7 +152,7 @@ TriggerAction "volume-conf-removed", Function "XVolumeChannelRemove" PopUp "XVolumeWindow" { style = "volume_popup" label { - value = "sinks" + value = GT("sinks") style = If(Volume("sink-count")>0, "volume_separator", "hidden") trigger = "volume" } @@ -160,7 +160,7 @@ PopUp "XVolumeWindow" { style = "volume_section" } label { - value = "clients" + value = GT("clients") style = If(Volume("client-count")>0, "volume_separator", "hidden") trigger = "volume" } @@ -179,11 +179,11 @@ layout { 0, $XVolumeLowIcon, $XVolumeMutedIcon)) trigger = "volume" - tooltip = "Volume: " + Str(Volume("sink-volume"),0) + "%" + + tooltip = GT("Volume") + ": " + Str(Volume("sink-volume"),0) + "%" + If(Volume("sink-mute")," (muted)","") + - "\nForm: " + VolumeInfo("sink-form") + - "\nPort: " + VolumeInfo("sink-port") + - "\nMonitor: " + VolumeInfo("sink-monitor") + "\n" + GT("Form") + ": " + VolumeInfo("sink-form") + + "\n" + GT("Port") + ": " + VolumeInfo("sink-port") + + "\n" + GT("Monitor") + ": " + VolumeInfo("sink-monitor") style = If(Ident(volume),"module","hidden") action[RightClick] = VolumeCtl "sink-mute toggle" action[MiddleClick] = Exec $XPulseAction diff --git a/config/wifi.widget b/config/wifi.widget index acf7b65..e3a5dff 100644 --- a/config/wifi.widget +++ b/config/wifi.widget @@ -3,8 +3,8 @@ module("wifi-iwd") TriggerAction "wifi_updated", Function "XWifiUpdate" TriggerAction "wifi_removed", Function "XWifiRemove" -TriggerAction "wifi_scan", SetValue "XWifiScanButton", "Scanning ..." -TriggerAction "wifi_scan_complete", SetValue "XWifiScanButton", "Scan" +TriggerAction "wifi_scan", SetValue "XWifiScanButton", GT("Scanning") + " ..." +TriggerAction "wifi_scan_complete", SetValue "XWifiScanButton", GT("Scan") define XWifiIcon = "network-wireless-signal-" + Lookup(Val(WifiGet("Strength")), @@ -61,9 +61,9 @@ Function("XWifiConnect") { } Menu("XWifiItemMenu") { - item("Connect", Function "XWifiConnect" ); - item("Disconnect", WifiDisconnect Extract(WidgetId(),"(.*)_grid") ); - item("Forget", WifiForget Extract(WidgetId(),"(.*)_grid") ); + item(GT("Connect"), Function "XWifiConnect" ); + item(GT("Disconnect"), WifiDisconnect Extract(WidgetId(),"(.*)_grid") ); + item(GT("Forget"), WifiForget Extract(WidgetId(),"(.*)_grid") ); } PopUp "XWifiWindow" { @@ -75,21 +75,21 @@ PopUp "XWifiWindow" { } style = "XWifiFrame" label { - value = "Known networks" + value = GT("Known networks") style = "XWifiSeparator" } grid "XWifiGridKnown" { style = "XWifiSection" } label { - value = "Other networks" + value = GT("Other networks") style = "XWifiSeparator" } grid "XWifiGridOther" { style = "XWifiSection" } label "XWifiScanButton" { - value = "Scan" + value = GT("Scan") style = "XWifiScan" action = WifiScan } @@ -142,7 +142,7 @@ image#XWifiIconConnected { } image#XWifiIconConnected { - color: red; + color: green; } label#XWifiHeader { @@ -193,3 +193,8 @@ label#wifi_dialog_title { margin: 10px; } +#wifi_button_ok, +#wifi_user_entry, +#wifi_passphrase_entry { + background-color: @theme_bg_color; +} \ No newline at end of file diff --git a/config/winops.widget b/config/winops.widget index 3e32324..448f06e 100644 --- a/config/winops.widget +++ b/config/winops.widget @@ -9,8 +9,12 @@ function("ToggleMaximize") { } menu("winops") { - item("focus", Focus ); - item("close", Close ); - item("(un)minimize", Function "ToggleMinimize" ); - item("(un)maximize", Function "ToggleMaximize" ); +# item(" focus%gtk-find", Focus ); +# item(" close%window-close-symbolic", Close ); +# item(" (un)minimize%window-minimize-symbolic", Function "ToggleMinimize" ); +# item(" (un)maximize%window-maximize-symbolic", Function "ToggleMaximize" ); + item(" "+GT("focus")+"%gtk-find", Focus ); + item(" "+GT("close")+"%window-close-symbolic", Close ); + item(" "+GT("(un)minimize")+"%window-minimize-symbolic", Function "ToggleMinimize" ); + item(" "+GT("(un)maximize")+"%window-maximize-symbolic", Function "ToggleMaximize" ); } diff --git a/doc/sfwbar.rst b/doc/sfwbar.rst index 2039468..babb9b4 100644 --- a/doc/sfwbar.rst +++ b/doc/sfwbar.rst @@ -821,7 +821,7 @@ Operation Description ``>`` greater than ``>=`` greater than or equal ``<`` less than -``>=`` less than or equal +``<=`` less than or equal ``=`` equal ``Val`` convert a string into a number, the argument is a string or a string expression to convert. @@ -868,6 +868,7 @@ Operation Description function will return DefaultString. ``ReplaceAll`` Perform multiple substring replacements in a string, ``ReplaceAll(string, old1, new1, ... )`` +``GT`` gettext substring i.e. ``GT("msgid" [,"domain"])`` ============== =================================================================== In addition the following query functions are supported diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 0000000..de9375d --- /dev/null +++ b/po/ru.po @@ -0,0 +1,185 @@ +# Swfbar pot file +# Copyright (C) 2024 +# This file is distributed under the same license as the sfwbar package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: sfwbar\n" +"Report-Msgid-Bugs-To: https://github.com/LBCrion/sfwbar/issues\n" +"POT-Creation-Date: 2024-12-26 21:07+1000\n" +"PO-Revision-Date: 2024-12-26 21:07+1000\n" +"Last-Translator: sfs linux \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/config/startmenu.widget +msgid "Application menu" +msgstr "Меню" + +#: src/config/alsa-module.widget +msgid "Volume" +msgstr "Громкость" + +msgid "muted" +msgstr "выкл." + +msgid "h" +msgstr "ч" + +msgid "m" +msgstr "м" + +msgid "Connecting" +msgstr "Подключение" + +msgid "January" +msgstr "Январь" + +msgid "February" +msgstr "Февраль" + +msgid "March" +msgstr "Март" + +msgid "April" +msgstr "Апрель" + +msgid "May" +msgstr "Май" + +msgid "June" +msgstr "Июнь" + +msgid "July" +msgstr "Июль" + +msgid "August" +msgstr "Август" + +msgid "September" +msgstr "Сентябрь" + +msgid "October" +msgstr "Октябрь" + +msgid "November" +msgstr "Ноябрь" + +msgid "December" +msgstr "Декабрь" + +msgid "Mo" +msgstr "Пн" + +msgid "Tu" +msgstr "Вт" + +msgid "We" +msgstr "Ср" + +msgid "Th" +msgstr "Чт" + +msgid "Fr" +msgstr "Пт" + +msgid "Sa" +msgstr "Сб" + +msgid "Su" +msgstr "Вс" + +msgid "Memory" +msgstr "Память" + +msgid "Notification Center" +msgstr "Центр уведомлений" + +msgid "Show Desktop" +msgstr "Показать рабочий стол" + +msgid "Set As Default Device" +msgstr "По умолчанию" + +msgid "expand/collapse channels" +msgstr "развернуть/свернуть каналы" + +msgid "route to sink" +msgstr "переключить выход" + +msgid "Scanning" +msgstr "Поиск" + +msgid "Scan" +msgstr "Искать" + +msgid "Other" +msgstr "Другие" + +msgid "Known" +msgstr "Известные" + +msgid "Connected" +msgstr "Подключено" + +msgid "Connect" +msgstr "Вкл." + +msgid "Disconnect" +msgstr "Выкл." + +msgid "Forget" +msgstr "Забыть" + +msgid "Known networks" +msgstr "Известные сети" + +msgid "Other networks" +msgstr "Другие сети" + +msgid "focus" +msgstr "фокус" + +msgid "close" +msgstr "закрыть" + +msgid "(un)minimize" +msgstr "свернуть / развернуть" + +msgid "(un)maximize" +msgstr "окно / полный экран" + +msgid "Form" +msgstr "Формат" + +msgid "Port" +msgstr "Порт" + +msgid "Monitor" +msgstr "Монитор" + +msgid "sinks" +msgstr "выходы (sinks)" + +msgid "clients" +msgstr "клиенты" + +msgid "Pair" +msgstr "Сопряжение" + +msgid "Remove" +msgstr "Удалить" + +msgid "Available devices" +msgstr "Доступные устройства" + +msgid "Paired devices" +msgstr "Сопряженные устройства" + +msgid "Battery" +msgstr "Батарея" diff --git a/po/sfwbar.pot b/po/sfwbar.pot new file mode 100644 index 0000000..cb9d98d --- /dev/null +++ b/po/sfwbar.pot @@ -0,0 +1,185 @@ +# Swfbar pot file +# Copyright (C) 2024 +# This file is distributed under the same license as the sfwbar package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgsrt "" +"Project-Id-Version: sfwbar\n" +"Report-Msgid-Bugs-To: https://github.com/LBCrion/sfwbar/issues\n" +"POT-Creation-Date: 2024-12-26 21:07+1000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: sfs linux \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/config/startmenu.widget +msgid "Application menu" +msgsrt "" + +#: src/config/alsa-module.widget +msgid "Volume" +msgsrt "" + +msgid "muted" +msgsrt "" + +msgid "h" +msgsrt "" + +msgid "m" +msgsrt "" + +msgid "Connecting" +msgsrt "" + +msgid "January" +msgsrt "" + +msgid "February" +msgsrt "" + +msgid "March" +msgsrt "" + +msgid "April" +msgsrt "" + +msgid "May" +msgsrt "" + +msgid "June" +msgsrt "" + +msgid "July" +msgsrt "" + +msgid "August" +msgsrt "" + +msgid "September" +msgsrt "" + +msgid "October" +msgsrt "" + +msgid "November" +msgsrt "" + +msgid "December" +msgsrt "" + +msgid "Mo" +msgsrt "" + +msgid "Tu" +msgsrt "" + +msgid "We" +msgsrt "" + +msgid "Th" +msgsrt "" + +msgid "Fr" +msgsrt "" + +msgid "Sa" +msgsrt "" + +msgid "Su" +msgsrt "" + +msgid "Memory" +msgsrt "" + +msgid "Notification Center" +msgsrt "" + +msgid "Show Desktop" +msgsrt "" + +msgid "Set As Default Device" +msgsrt "" + +msgid "expand/collapse channels" +msgsrt "" + +msgid "route to sink" +msgsrt "" + +msgid "Scanning" +msgsrt "" + +msgid "Scan" +msgsrt "" + +msgid "Other" +msgsrt "" + +msgid "Known" +msgsrt "" + +msgid "Connected" +msgsrt "" + +msgid "Connect" +msgsrt "" + +msgid "Disconnect" +msgsrt "" + +msgid "Forget" +msgsrt "" + +msgid "Known networks" +msgsrt "" + +msgid "Other networks" +msgsrt "" + +msgid "focus" +msgsrt "" + +msgid "close" +msgsrt "" + +msgid "(un)minimize" +msgsrt "" + +msgid "(un)maximize" +msgsrt "" + +msgid "Form" +msgsrt "" + +msgid "Port" +msgsrt "" + +msgid "Monitor" +msgsrt "" + +msgid "sinks" +msgsrt "" + +msgid "clients" +msgsrt "" + +msgid "Pair" +msgsrt "" + +msgid "Remove" +msgsrt "" + +msgid "Available devices" +msgsrt "" + +msgid "Paired devices" +msgsrt "" + +msgid "Battery" +msgsrt ""