From cf04356c0bd04620ed21c5ff9ec61bb556e3faf4 Mon Sep 17 00:00:00 2001 From: Himadri Sekhar Basu <41947504+hsbasu@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:52:36 +0530 Subject: [PATCH] Start porting to meson python build (#55) --- data/meson.build | 0 meson.build | 29 ++++ po/LINGUAS | 1 + po/{POTFILES.in => POTFILES} | 6 +- po/battery-monitor.pot | 275 ++++++++--------------------------- po/en.po | 242 ++++++++++++++++++++++++++++++ po/meson.build | 2 + pyproject.toml | 49 ++++++- src/meson.build | 0 9 files changed, 386 insertions(+), 218 deletions(-) create mode 100644 data/meson.build create mode 100644 meson.build create mode 100644 po/LINGUAS rename po/{POTFILES.in => POTFILES} (71%) create mode 100644 po/en.po create mode 100644 po/meson.build create mode 100644 src/meson.build diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..e69de29 diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..327a888 --- /dev/null +++ b/meson.build @@ -0,0 +1,29 @@ +project('battery-monitor', + version: run_command('head', '-1', 'debian/changelog', check: true).stdout().split(' ')[1].strip('(').strip(')'), + default_options: ['warning_level=3', + 'prefix=/usr', + ] +) + + +i18n = import('i18n') +gnome = import('gnome') +pymod = import('python') +python = pymod.find_installation('python3') +gettext_package = meson.project_name() + +# dependency('gobject') +# dependency('bs4') +# dependency('configobj') + +datadir = get_option('datadir') + +subdir('data') +subdir('po') +subdir('src') + +gnome.post_install( + glib_compile_schemas: true, + gtk_update_icon_cache: true, + update_desktop_database: true, +) diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..c574d07 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1 @@ +en diff --git a/po/POTFILES.in b/po/POTFILES similarity index 71% rename from po/POTFILES.in rename to po/POTFILES index 04196c1..933a3d4 100644 --- a/po/POTFILES.in +++ b/po/POTFILES @@ -11,6 +11,6 @@ src/BatteryMonitor/indicator.py src/BatteryMonitor/__init__.py src/BatteryMonitor/main.py src/BatteryMonitor/Notification.py -src/BatteryMonitor/ui/battery-monitor.ui -src/BatteryMonitor/ui/logger.ui -src/BatteryMonitor/ui/shortcuts.ui +[type: gettext/glade]src/BatteryMonitor/ui/battery-monitor.ui +[type: gettext/glade]src/BatteryMonitor/ui/logger.ui +[type: gettext/glade]src/BatteryMonitor/ui/shortcuts.ui diff --git a/po/battery-monitor.pot b/po/battery-monitor.pot index e0d653c..50418b2 100644 --- a/po/battery-monitor.pot +++ b/po/battery-monitor.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-02 13:12+0530\n" +"POT-Creation-Date: 2024-03-24 08:49+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,377 +17,226 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: data/battery-monitor-autostart.desktop.in:3 +#: ../data/battery-monitor-autostart.desktop.in.h:1 msgid "Battery Monitor Indicator" msgstr "" -#: data/battery-monitor-autostart.desktop.in:4 +#: ../data/battery-monitor-autostart.desktop.in.h:2 msgid "Start indicator for Battery Monitor." msgstr "" -#: data/battery-monitor.desktop.in:3 src/BatteryMonitor/about_window.py:74 -#: src/BatteryMonitor/config.py:117 src/BatteryMonitor/config.py:127 -#: src/BatteryMonitor/config.py:132 src/BatteryMonitor/gui.py:89 -#: src/BatteryMonitor/gui.py:402 src/BatteryMonitor/indicator.py:62 -#: src/BatteryMonitor/Notification.py:77 -#: src/BatteryMonitor/ui/battery-monitor.ui:720 +#: ../data/battery-monitor.desktop.in.h:1 +#: ../src/BatteryMonitor/about_window.py:75 ../src/BatteryMonitor/config.py:117 +#: ../src/BatteryMonitor/config.py:127 ../src/BatteryMonitor/config.py:132 +#: ../src/BatteryMonitor/gui.py:89 ../src/BatteryMonitor/gui.py:402 +#: ../src/BatteryMonitor/indicator.py:62 +#: ../src/BatteryMonitor/Notification.py:77 msgid "Battery Monitor" msgstr "" -#: data/battery-monitor.desktop.in:4 +#: ../data/battery-monitor.desktop.in.h:2 msgid "" "A utility tool, notifies user about charging, discharging and not charging " "state of the battery on Linux." msgstr "" -#: src/BatteryMonitor/about_window.py:71 src/BatteryMonitor/gui.py:138 -#: src/BatteryMonitor/indicator.py:81 src/BatteryMonitor/ui/shortcuts.ui:66 +#. Add "About" option in drop-down menu +#: ../src/BatteryMonitor/about_window.py:72 ../src/BatteryMonitor/gui.py:138 +#: ../src/BatteryMonitor/indicator.py:81 msgid "About" msgstr "" -#: src/BatteryMonitor/about_window.py:79 +#: ../src/BatteryMonitor/about_window.py:80 msgid "" "Battery Monitor is a utility tool developed on Python3 and PyGtk3. It will " "notify the user about charging, discharging, not charging and critically low " "battery state of the battery on Linux (surely if the battery is present)." msgstr "" -#: src/BatteryMonitor/about_window.py:85 +#. self.about_dialog.add_credit_section('AUR maintained by', ['Yochanan Marqos ']) +#: ../src/BatteryMonitor/about_window.py:86 msgid "Maintainer" msgstr "" -#: src/BatteryMonitor/config.py:118 +#: ../src/BatteryMonitor/config.py:118 msgid "Cheers! Your battery is being monitored now." msgstr "" -#: src/BatteryMonitor/config.py:128 +#: ../src/BatteryMonitor/config.py:128 msgid "Alas! Battery is not yet present!" msgstr "" -#: src/BatteryMonitor/config.py:133 +#: ../src/BatteryMonitor/config.py:133 msgid "Dependency Error! acpi is not installed." msgstr "" -#: src/BatteryMonitor/config.py:137 src/BatteryMonitor/config.py:189 -#: src/BatteryMonitor/ui/battery-monitor.ui:190 +#: ../src/BatteryMonitor/config.py:137 ../src/BatteryMonitor/config.py:189 msgid "Charging" msgstr "" -#: src/BatteryMonitor/config.py:138 src/BatteryMonitor/config.py:143 -#: src/BatteryMonitor/config.py:158 src/BatteryMonitor/config.py:168 -#: src/BatteryMonitor/config.py:173 src/BatteryMonitor/config.py:178 -#: src/BatteryMonitor/config.py:182 +#: ../src/BatteryMonitor/config.py:138 ../src/BatteryMonitor/config.py:143 +#: ../src/BatteryMonitor/config.py:158 ../src/BatteryMonitor/config.py:168 +#: ../src/BatteryMonitor/config.py:173 ../src/BatteryMonitor/config.py:178 +#: ../src/BatteryMonitor/config.py:182 #, python-brace-format msgid "Now {battery_percentage} %, {remaining_time}" msgstr "" -#: src/BatteryMonitor/config.py:142 src/BatteryMonitor/config.py:190 -#: src/BatteryMonitor/ui/battery-monitor.ui:364 +#: ../src/BatteryMonitor/config.py:142 ../src/BatteryMonitor/config.py:190 msgid "Discharging" msgstr "" -#: src/BatteryMonitor/config.py:147 +#: ../src/BatteryMonitor/config.py:147 msgid "Fully Charged - Unplug your Charger" msgstr "" -#: src/BatteryMonitor/config.py:148 src/BatteryMonitor/config.py:153 +#: ../src/BatteryMonitor/config.py:148 ../src/BatteryMonitor/config.py:153 #, python-brace-format msgid "{battery_percentage} % Remaining" msgstr "" -#: src/BatteryMonitor/config.py:152 +#: ../src/BatteryMonitor/config.py:152 msgid "Fully Charged" msgstr "" -#: src/BatteryMonitor/config.py:157 +#: ../src/BatteryMonitor/config.py:157 msgid "Low Battery" msgstr "" -#: src/BatteryMonitor/config.py:162 +#: ../src/BatteryMonitor/config.py:162 msgid "Critically Low Battery" msgstr "" -#: src/BatteryMonitor/config.py:163 +#: ../src/BatteryMonitor/config.py:163 #, python-brace-format msgid "Only {battery_percentage} %, {remaining_time}" msgstr "" -#: src/BatteryMonitor/config.py:167 +#: ../src/BatteryMonitor/config.py:167 msgid "First Custom Warning" msgstr "" -#: src/BatteryMonitor/config.py:172 +#: ../src/BatteryMonitor/config.py:172 msgid "Second Custom Warning" msgstr "" -#: src/BatteryMonitor/config.py:177 +#: ../src/BatteryMonitor/config.py:177 msgid "Third Custom Warning" msgstr "" -#: src/BatteryMonitor/config.py:181 +#: ../src/BatteryMonitor/config.py:181 msgid "Upper Threshold Warning - Unplug your Charger" msgstr "" -#: src/BatteryMonitor/config.py:188 +#: ../src/BatteryMonitor/config.py:188 msgid "Full" msgstr "" -#: src/BatteryMonitor/config.py:193 +#: ../src/BatteryMonitor/config.py:193 msgid "00:10:12 remaining" msgstr "" -#: src/BatteryMonitor/config.py:194 +#: ../src/BatteryMonitor/config.py:194 msgid "01:47:31 remaining" msgstr "" -#: src/BatteryMonitor/config.py:195 +#: ../src/BatteryMonitor/config.py:195 msgid "02:33:47 remaining" msgstr "" -#: src/BatteryMonitor/config.py:196 +#: ../src/BatteryMonitor/config.py:196 msgid "03:24:25 remaining" msgstr "" -#: src/BatteryMonitor/config.py:197 +#: ../src/BatteryMonitor/config.py:197 msgid "discharging at zero rate - will never fully discharge" msgstr "" -#: src/BatteryMonitor/gui.py:130 +#: ../src/BatteryMonitor/gui.py:130 msgid "Keyboard Shortcuts" msgstr "" -#: src/BatteryMonitor/gui.py:144 +#. Add "Close" option in drop-down menu +#: ../src/BatteryMonitor/gui.py:144 msgid "Close Window" msgstr "" -#: src/BatteryMonitor/gui.py:256 +#: ../src/BatteryMonitor/gui.py:256 msgid "Successfully Saved!" msgstr "" -#: src/BatteryMonitor/gui.py:257 +#: ../src/BatteryMonitor/gui.py:257 msgid "Your settings have been saved successfully." msgstr "" -#: src/BatteryMonitor/gui.py:266 +#: ../src/BatteryMonitor/gui.py:266 msgid "Validation Error!" msgstr "" -#: src/BatteryMonitor/gui.py:279 +#: ../src/BatteryMonitor/gui.py:279 msgid "Upper threshold Warning must be greater than zero." msgstr "" -#: src/BatteryMonitor/gui.py:283 +#: ../src/BatteryMonitor/gui.py:283 msgid "" "The value of first custom warning must be greater than then value of second " "custom warning." msgstr "" -#: src/BatteryMonitor/gui.py:287 +#: ../src/BatteryMonitor/gui.py:287 msgid "" "The value of second custom warning must be greater than the value 0f third " "custom warning." msgstr "" -#: src/BatteryMonitor/gui.py:291 +#: ../src/BatteryMonitor/gui.py:291 msgid "" "The value of third custom warning must be greater than the value of low " "battery warning." msgstr "" -#: src/BatteryMonitor/gui.py:295 +#: ../src/BatteryMonitor/gui.py:295 msgid "" "The value of low battery warning must be greater than the value of critical " "battery warning." msgstr "" -#: src/BatteryMonitor/gui.py:298 +#: ../src/BatteryMonitor/gui.py:298 msgid "Low battery warning can not be empty." msgstr "" -#: src/BatteryMonitor/gui.py:300 +#: ../src/BatteryMonitor/gui.py:300 msgid "Critical battery warning can not be empty." msgstr "" -#: src/BatteryMonitor/gui.py:304 +#: ../src/BatteryMonitor/gui.py:304 msgid "Notification stability time must be greater than zero." msgstr "" -#: src/BatteryMonitor/gui.py:306 +#: ../src/BatteryMonitor/gui.py:306 msgid "Notification stability time can not be empty." msgstr "" -#: src/BatteryMonitor/gui.py:310 +#: ../src/BatteryMonitor/gui.py:310 msgid "Notification count must be greater than zero." msgstr "" -#: src/BatteryMonitor/gui.py:312 +#: ../src/BatteryMonitor/gui.py:312 msgid "Notification count can not be empty." msgstr "" -#: src/BatteryMonitor/gui.py:321 +#: ../src/BatteryMonitor/gui.py:321 msgid "Restore default settings?" msgstr "" -#: src/BatteryMonitor/gui.py:322 +#: ../src/BatteryMonitor/gui.py:322 msgid "Click ok to restore and save default settings successfully." msgstr "" -#: src/BatteryMonitor/indicator.py:75 src/BatteryMonitor/ui/shortcuts.ui:41 +#: ../src/BatteryMonitor/indicator.py:75 msgid "Settings" msgstr "" -#: src/BatteryMonitor/indicator.py:86 -#: src/BatteryMonitor/ui/battery-monitor.ui:662 -#: src/BatteryMonitor/ui/shortcuts.ui:80 +#: ../src/BatteryMonitor/indicator.py:86 msgid "Quit" msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:94 -msgid "Disable Success Notification:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:107 -msgid "Enable/disable to show/hide success notification at startup." -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:125 -msgid "Battery" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:162 -msgid "Upper Threshold Warning at:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:174 -msgid "" -"Indicates whether success notification has been shown. Make it no/No/NO to " -"show the success notification.\t" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:228 -msgid "First Custom Warning at:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:241 -msgid "Set in percentage, must be greater than Second Custom Warning" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:255 -msgid "Second Custom Warning at:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:267 -msgid "Set in percentage, must be greater than Third Custom Warning" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:281 -msgid "Third Custom Warning at:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:293 -msgid "Set in percentage, must be smaller than Other Warnings." -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:307 -msgid "Low Battery Warning at:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:320 -#: src/BatteryMonitor/ui/battery-monitor.ui:347 -msgid "Set in percentage." -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:334 -msgid "Critical Battery Warning at:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:380 -msgid "Battery Configuration" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:423 -msgid "Disable Notification Sound:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:436 -msgid "Enable/Disable notification sound." -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:451 -msgid "Select Custom Sound File:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:463 -msgid "Select an Audio file to be played while showing notification." -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:465 -msgid "Select an audio file" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:478 -msgid "Sound" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:497 -msgid "Sound Configuration" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:540 -msgid "Notification Duration:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:552 -#: src/BatteryMonitor/ui/battery-monitor.ui:577 -msgid "Set in second" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:565 -msgid "Notification Count:" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:591 -#: src/BatteryMonitor/ui/battery-monitor.ui:610 -msgid "Notification" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:634 -#: src/BatteryMonitor/ui/shortcuts.ui:53 -msgid "Save" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:638 -msgid "Saves current values as default settings." -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:648 -msgid "Reset to defaults" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:652 -msgid "Resets current values to default settings." -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:666 -msgid "Close this Window(Press Ctrl+W)" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:704 -msgid "Status" -msgstr "" - -#: src/BatteryMonitor/ui/battery-monitor.ui:721 -msgid "Utility tool to notify the user about different battery states." -msgstr "" - -#: src/BatteryMonitor/ui/shortcuts.ui:46 -msgid "Reset" -msgstr "" - -#: src/BatteryMonitor/ui/shortcuts.ui:61 -msgid "Other Shortcuts" -msgstr "" - -#: src/BatteryMonitor/ui/shortcuts.ui:73 -msgid "Shortcuts" -msgstr "" diff --git a/po/en.po b/po/en.po new file mode 100644 index 0000000..50418b2 --- /dev/null +++ b/po/en.po @@ -0,0 +1,242 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-03-24 08:49+0530\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../data/battery-monitor-autostart.desktop.in.h:1 +msgid "Battery Monitor Indicator" +msgstr "" + +#: ../data/battery-monitor-autostart.desktop.in.h:2 +msgid "Start indicator for Battery Monitor." +msgstr "" + +#: ../data/battery-monitor.desktop.in.h:1 +#: ../src/BatteryMonitor/about_window.py:75 ../src/BatteryMonitor/config.py:117 +#: ../src/BatteryMonitor/config.py:127 ../src/BatteryMonitor/config.py:132 +#: ../src/BatteryMonitor/gui.py:89 ../src/BatteryMonitor/gui.py:402 +#: ../src/BatteryMonitor/indicator.py:62 +#: ../src/BatteryMonitor/Notification.py:77 +msgid "Battery Monitor" +msgstr "" + +#: ../data/battery-monitor.desktop.in.h:2 +msgid "" +"A utility tool, notifies user about charging, discharging and not charging " +"state of the battery on Linux." +msgstr "" + +#. Add "About" option in drop-down menu +#: ../src/BatteryMonitor/about_window.py:72 ../src/BatteryMonitor/gui.py:138 +#: ../src/BatteryMonitor/indicator.py:81 +msgid "About" +msgstr "" + +#: ../src/BatteryMonitor/about_window.py:80 +msgid "" +"Battery Monitor is a utility tool developed on Python3 and PyGtk3. It will " +"notify the user about charging, discharging, not charging and critically low " +"battery state of the battery on Linux (surely if the battery is present)." +msgstr "" + +#. self.about_dialog.add_credit_section('AUR maintained by', ['Yochanan Marqos ']) +#: ../src/BatteryMonitor/about_window.py:86 +msgid "Maintainer" +msgstr "" + +#: ../src/BatteryMonitor/config.py:118 +msgid "Cheers! Your battery is being monitored now." +msgstr "" + +#: ../src/BatteryMonitor/config.py:128 +msgid "Alas! Battery is not yet present!" +msgstr "" + +#: ../src/BatteryMonitor/config.py:133 +msgid "Dependency Error! acpi is not installed." +msgstr "" + +#: ../src/BatteryMonitor/config.py:137 ../src/BatteryMonitor/config.py:189 +msgid "Charging" +msgstr "" + +#: ../src/BatteryMonitor/config.py:138 ../src/BatteryMonitor/config.py:143 +#: ../src/BatteryMonitor/config.py:158 ../src/BatteryMonitor/config.py:168 +#: ../src/BatteryMonitor/config.py:173 ../src/BatteryMonitor/config.py:178 +#: ../src/BatteryMonitor/config.py:182 +#, python-brace-format +msgid "Now {battery_percentage} %, {remaining_time}" +msgstr "" + +#: ../src/BatteryMonitor/config.py:142 ../src/BatteryMonitor/config.py:190 +msgid "Discharging" +msgstr "" + +#: ../src/BatteryMonitor/config.py:147 +msgid "Fully Charged - Unplug your Charger" +msgstr "" + +#: ../src/BatteryMonitor/config.py:148 ../src/BatteryMonitor/config.py:153 +#, python-brace-format +msgid "{battery_percentage} % Remaining" +msgstr "" + +#: ../src/BatteryMonitor/config.py:152 +msgid "Fully Charged" +msgstr "" + +#: ../src/BatteryMonitor/config.py:157 +msgid "Low Battery" +msgstr "" + +#: ../src/BatteryMonitor/config.py:162 +msgid "Critically Low Battery" +msgstr "" + +#: ../src/BatteryMonitor/config.py:163 +#, python-brace-format +msgid "Only {battery_percentage} %, {remaining_time}" +msgstr "" + +#: ../src/BatteryMonitor/config.py:167 +msgid "First Custom Warning" +msgstr "" + +#: ../src/BatteryMonitor/config.py:172 +msgid "Second Custom Warning" +msgstr "" + +#: ../src/BatteryMonitor/config.py:177 +msgid "Third Custom Warning" +msgstr "" + +#: ../src/BatteryMonitor/config.py:181 +msgid "Upper Threshold Warning - Unplug your Charger" +msgstr "" + +#: ../src/BatteryMonitor/config.py:188 +msgid "Full" +msgstr "" + +#: ../src/BatteryMonitor/config.py:193 +msgid "00:10:12 remaining" +msgstr "" + +#: ../src/BatteryMonitor/config.py:194 +msgid "01:47:31 remaining" +msgstr "" + +#: ../src/BatteryMonitor/config.py:195 +msgid "02:33:47 remaining" +msgstr "" + +#: ../src/BatteryMonitor/config.py:196 +msgid "03:24:25 remaining" +msgstr "" + +#: ../src/BatteryMonitor/config.py:197 +msgid "discharging at zero rate - will never fully discharge" +msgstr "" + +#: ../src/BatteryMonitor/gui.py:130 +msgid "Keyboard Shortcuts" +msgstr "" + +#. Add "Close" option in drop-down menu +#: ../src/BatteryMonitor/gui.py:144 +msgid "Close Window" +msgstr "" + +#: ../src/BatteryMonitor/gui.py:256 +msgid "Successfully Saved!" +msgstr "" + +#: ../src/BatteryMonitor/gui.py:257 +msgid "Your settings have been saved successfully." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:266 +msgid "Validation Error!" +msgstr "" + +#: ../src/BatteryMonitor/gui.py:279 +msgid "Upper threshold Warning must be greater than zero." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:283 +msgid "" +"The value of first custom warning must be greater than then value of second " +"custom warning." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:287 +msgid "" +"The value of second custom warning must be greater than the value 0f third " +"custom warning." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:291 +msgid "" +"The value of third custom warning must be greater than the value of low " +"battery warning." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:295 +msgid "" +"The value of low battery warning must be greater than the value of critical " +"battery warning." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:298 +msgid "Low battery warning can not be empty." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:300 +msgid "Critical battery warning can not be empty." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:304 +msgid "Notification stability time must be greater than zero." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:306 +msgid "Notification stability time can not be empty." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:310 +msgid "Notification count must be greater than zero." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:312 +msgid "Notification count can not be empty." +msgstr "" + +#: ../src/BatteryMonitor/gui.py:321 +msgid "Restore default settings?" +msgstr "" + +#: ../src/BatteryMonitor/gui.py:322 +msgid "Click ok to restore and save default settings successfully." +msgstr "" + +#: ../src/BatteryMonitor/indicator.py:75 +msgid "Settings" +msgstr "" + +#: ../src/BatteryMonitor/indicator.py:86 +msgid "Quit" +msgstr "" diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..877500e --- /dev/null +++ b/po/meson.build @@ -0,0 +1,2 @@ +add_project_arguments('-DGETTEXT_PACKAGE="battery-monitor"', language:'python') +i18n.gettext(gettext_package, preset: 'glib') diff --git a/pyproject.toml b/pyproject.toml index 638dd9c..afb7cd2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,48 @@ [build-system] -requires = ["setuptools>=61.0"] -build-backend = "setuptools.build_meta" +build-backend = 'mesonpy' +requires = [ + "meson >= 1.3.0", + "meson-python >= 0.14.0", +] + +[project] +name = "battery-monitor" +authors = [ + {name = "Himadri Sekhar Basu", email = "hsb10@iitbbs.ac.in"}, +] +description = "Battery Monitor" +readme = {file = "README.md", content-type = "text/markdown"} +license = {file = "LICENSE"} +requires-python = ">=3.8" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: X11 Applications :: GTK", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved", + " :: GNU General Public License v3 or later (GPLv3+)", + "Operating System :: POSIX", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Accessories", +] +dependencies = [ + "configobj", + "PyGObject", + "setproctitle", + "tldextract", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://hsbasu.github.io/battery-monitor" +Repository = "https://www.github.com/mamolinux/battery-monitor.git" +Issues = "https://www.github.com/mamolinux/battery-monitor/issues" + +[project.scripts] +battery-monitor = "BatteryMonitor.main:start_BM" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +"*" = ["*VERSION", "*.ui"] diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..e69de29