\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Poedit 3.0.1\n"
+
+#: confirmDialog.js:23 confirmDialog.js:32
+msgid "Hibernate"
+msgstr "Hibernar"
+
+#: extension.js:192
+msgid "Hybrid Sleep"
+msgstr "Suspensão Híbrida"
+
+#: confirmDialog.js:24
+msgid "Do you really want to hibernate the system?"
+msgstr "Deseja realmente hibernar o sistema?"
+
+#: confirmDialog.js:27 confirmDialog.js:44 confirmDialog.js:67
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: confirmDialog.js:40
+msgid "Hibernate button: Systemd Missing"
+msgstr "Systemd não está instalado"
+
+#: confirmDialog.js:41
+msgid "Systemd seems to be missing and is required."
+msgstr "Systemd não está instalado e é necessário."
+
+#: confirmDialog.js:49 confirmDialog.js:72
+msgid "Disable Extension"
+msgstr "Desabilitar extensão"
+
+#: confirmDialog.js:58
+msgid "Hibernate button: Hibernate failed"
+msgstr "Hibernação falhou"
+
+#: confirmDialog.js:59
+msgid ""
+"Looks like hibernation failed.\n"
+"On some linux distributions hibernation is disabled\n"
+"because not all hardware supports it well;\n"
+"please check your distribution documentation\n"
+"on how to enable it."
+msgstr ""
+"Parece que a hibernação falhou.\n"
+"Em algumas distribuições Linux a hibernação é desabilitada\n"
+"já que nem todo hardware oferece suporte adequado à ela;\n"
+"Confira a documentação de sua distribuição\n"
+"para aprender como habilitá-la."
+
+#: confirmDialog.js:64
+msgid "You are wrong, don't check this anymore!"
+msgstr "Você errou! Não selecione isso novamente!"
+
+#: prefs.js:99
+msgid "This extension has no settings available"
+msgstr "Essa extensão não possui configurações disponíveis"
diff --git a/hibernate-status/locale/ru/LC_MESSAGES/hibernate-status-button.po b/hibernate-status/locale/ru/LC_MESSAGES/hibernate-status-button.po
new file mode 100644
index 0000000..c279315
--- /dev/null
+++ b/hibernate-status/locale/ru/LC_MESSAGES/hibernate-status-button.po
@@ -0,0 +1,74 @@
+# Russian translation of hibernate-status-button
+# Copyright (C) 2021 Serhii Riznychenko
+# This file is distributed under the same license as the hibernate-status-button package.
+# Serhii Riznychenko, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Hibernate Status Button\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-04-11 18:31+0200\n"
+"PO-Revision-Date: 2021-11-11 02:00+0200\n"
+"Last-Translator: Serhii Riznychenko\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"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
+"X-Generator: Poedit 3.0\n"
+"X-Poedit-Basepath: .\n"
+
+#: extension.js:189 confirmDialog.js:23 confirmDialog.js:32
+msgid "Hibernate"
+msgstr "Спящий режим"
+
+#: extension.js:192
+msgid "Hybrid Sleep"
+msgstr "Гибридный сон"
+
+#: confirmDialog.js:24
+msgid "Do you really want to hibernate the system?"
+msgstr "Вы действительно хотите перевести систему в спящий режим?"
+
+#: confirmDialog.js:27 confirmDialog.js:44 confirmDialog.js:67
+msgid "Cancel"
+msgstr "Отмена"
+
+#: confirmDialog.js:40
+msgid "Hibernate button: Systemd Missing"
+msgstr "Не обнаружено systemd"
+
+#: confirmDialog.js:41
+msgid "Systemd seems to be missing and is required."
+msgstr "Кажется отсутствует systemd, необходимый для режима сна."
+
+#: confirmDialog.js:49 confirmDialog.js:72
+msgid "Disable Extension"
+msgstr "Отключить расширение"
+
+#: confirmDialog.js:58
+msgid "Hibernate button: Hibernate failed"
+msgstr "Не удалось перевести систему в сон"
+
+#: confirmDialog.js:59
+msgid ""
+"Looks like hibernation failed.\n"
+"On some linux distributions hibernation is disabled\n"
+"because not all hardware supports it well;\n"
+"please check your distribution documentation\n"
+"on how to enable it."
+msgstr ""
+"Попытка перевести систему в сон завершилась неудачей.\n"
+"На некоторых дистрибутивах режим сна отключен\n"
+"так как не каждое оборудование имеет поддержку,\n"
+"пожалуйста обратитесь к документации своего дистрибутива\n"
+"чтобы узнать как его включить."
+
+#: confirmDialog.js:64
+msgid "You are wrong, don't check this anymore!"
+msgstr "Вы ошиблись, пожалуйста не трогайте это!"
+
+#: prefs.js:99
+msgid "This extension has no settings available"
+msgstr "Это расширение не содержит параметров"
diff --git a/hibernate-status/locale/uk/LC_MESSAGES/hibernate-status-button.po b/hibernate-status/locale/uk/LC_MESSAGES/hibernate-status-button.po
new file mode 100644
index 0000000..68c6b8c
--- /dev/null
+++ b/hibernate-status/locale/uk/LC_MESSAGES/hibernate-status-button.po
@@ -0,0 +1,74 @@
+# Ukrainian translation of hibernate-status-button
+# Copyright (C) 2021 Serhii Riznychenko
+# This file is distributed under the same license as the hibernate-status-button package.
+# Serhii Riznychenko, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Hibernate Status Button\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-04-11 18:31+0200\n"
+"PO-Revision-Date: 2021-11-11 02:00+0200\n"
+"Last-Translator: Serhii Riznychenko\n"
+"Language-Team: Ukraine\n"
+"Language: uk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
+"X-Generator: Poedit 3.0\n"
+"X-Poedit-Basepath: .\n"
+
+#: extension.js:189 confirmDialog.js:23 confirmDialog.js:32
+msgid "Hibernate"
+msgstr "Перейти в сон"
+
+#: extension.js:192
+msgid "Hybrid Sleep"
+msgstr "Перейти в гібридний сон"
+
+#: confirmDialog.js:24
+msgid "Do you really want to hibernate the system?"
+msgstr "Ви дійсно хочете перевести систему в режим сну?"
+
+#: confirmDialog.js:27 confirmDialog.js:44 confirmDialog.js:67
+msgid "Cancel"
+msgstr "Відміна"
+
+#: confirmDialog.js:40
+msgid "Hibernate button: Systemd Missing"
+msgstr "Не виявлено systemd"
+
+#: confirmDialog.js:41
+msgid "Systemd seems to be missing and is required."
+msgstr "Здається відсутній systemd, необхідний режиму сну."
+
+#: confirmDialog.js:49 confirmDialog.js:72
+msgid "Disable Extension"
+msgstr "Вимкнути розширення"
+
+#: confirmDialog.js:58
+msgid "Hibernate button: Hibernate failed"
+msgstr "Не вдалося перевести систему в сон"
+
+#: confirmDialog.js:59
+msgid ""
+"Looks like hibernation failed.\n"
+"On some linux distributions hibernation is disabled\n"
+"because not all hardware supports it well;\n"
+"please check your distribution documentation\n"
+"on how to enable it."
+msgstr ""
+"Спроба перевести систему в сон завершилася невдачею.\n"
+"На деяких дистрибутивах режим сну вимкнено\n"
+"оскільки не кожне обладнання має його підтримку,\n"
+"Будь ласка, зверніться до документації свого дистрибутива\n"
+"щоб дізнатися, як його включити."
+
+#: confirmDialog.js:64
+msgid "You are wrong, don't check this anymore!"
+msgstr "Ви помилилися, будь ласка, не чіпайте це!"
+
+#: prefs.js:99
+msgid "This extension has no settings available"
+msgstr "Це розширення не містить параметрів"
diff --git a/hibernate-status/locale/zh_CN/LC_MESSAGES/hibernate-status-button.po b/hibernate-status/locale/zh_CN/LC_MESSAGES/hibernate-status-button.po
new file mode 100644
index 0000000..be1a6b1
--- /dev/null
+++ b/hibernate-status/locale/zh_CN/LC_MESSAGES/hibernate-status-button.po
@@ -0,0 +1,59 @@
+# Simplified Chinese translation of hibernate-status-button
+# Copyright (C) 2019 zhmars
+# This file is distributed under the same license as the hibernate-status-button package.
+# zhmars <1403122061@qq.com>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Hibernate Status Button\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-11-22 00:08+0800\n"
+"PO-Revision-Date: 2019-11-21 20:00+0800\n"
+"Last-Translator: zhmars <1403122061@qq.com>\n"
+"Language-Team: Chinese (Simplified) <>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: confirmDialog.js:23 confirmDialog.js:32
+msgid "Hibernate"
+msgstr "休眠"
+
+#: confirmDialog.js:24
+msgid "Do you really want to hibernate the system?"
+msgstr "确定要休眠系统吗?"
+
+#: confirmDialog.js:27 confirmDialog.js:44 confirmDialog.js:67
+msgid "Cancel"
+msgstr "取消"
+
+#: confirmDialog.js:40
+msgid "Hibernate button: Systemd Missing"
+msgstr "无法找到 Systemd"
+
+#: confirmDialog.js:41
+msgid "Systemd seems to be missing and is required."
+msgstr "本功能依赖 Systemd,但目前无法找到。"
+
+#: confirmDialog.js:49 confirmDialog.js:72
+msgid "Disable Extension"
+msgstr "禁用扩展"
+
+#: confirmDialog.js:58
+msgid "Hibernate button: Hibernate failed"
+msgstr "休眠失败"
+
+#: confirmDialog.js:59
+msgid ""
+"Looks like hibernation failed.\n"
+"On some linux distributions hibernation is disabled\n"
+"because not all hardware supports it well;\n"
+"please check your distribution documentation\n"
+"on how to enable it."
+msgstr "休眠好像失败了。由于不是所有硬件都对该功能支持良好,"
+"某些发行版默认禁用了休眠,关于如何启用请查阅你所用的发行版文档"
+
+#: confirmDialog.js:64
+msgid "You are wrong, don't check this anymore!"
+msgstr "忽略本项检查"
diff --git a/hibernate-status/metadata.json b/hibernate-status/metadata.json
new file mode 100644
index 0000000..94098fe
--- /dev/null
+++ b/hibernate-status/metadata.json
@@ -0,0 +1,10 @@
+{
+ "uuid": "hibernate-status@dromi",
+ "name": "Hibernate Status Button",
+ "url": "https://github.com/arelange/gnome-shell-extension-hibernate-status",
+ "description": "Adds a Hibernate button in Status menu. Using Alt modifier, you can also select Hybrid Sleep instead.",
+ "shell-version": [
+ "43"
+ ],
+ "gettext-domain": "hibernate-status-button"
+}
diff --git a/hibernate-status/prefs.js b/hibernate-status/prefs.js
new file mode 100644
index 0000000..cdcd50e
--- /dev/null
+++ b/hibernate-status/prefs.js
@@ -0,0 +1,105 @@
+const Gio = imports.gi.Gio;
+const Gtk = imports.gi.Gtk;
+const Me = imports.misc.extensionUtils.getCurrentExtension();
+// Use __() and N__() for the extension gettext domain, and reuse
+// the shell domain with the default _() and N_()
+const Gettext = imports.gettext.domain('hibernate-status-button');
+const __ = Gettext.gettext;
+const N__ = function(e) { return e };
+const ExtensionUtils = imports.misc.extensionUtils;
+
+var Prefs = class Prefs {
+ /**
+ * Creates a new Settings-object to access the settings of this extension.
+ * @private
+ */
+ constructor() {
+ this.KEY_HIBERNATE_WORKS_CHECK = "hibernate-works-check";
+ this._schemaName = "org.gnome.shell.extensions.hibernate-status-button";
+
+ let schemaDir = Me.dir.get_child('schemas').get_path();
+
+ let schemaSource = Gio.SettingsSchemaSource.new_from_directory(
+ schemaDir, Gio.SettingsSchemaSource.get_default(), false
+ );
+ let schema = schemaSource.lookup(this._schemaName, false);
+
+ this._setting = new Gio.Settings({
+ settings_schema: schema
+ });
+ }
+ /**
+ * Binds the given 'callback'-function to the "changed"-signal on the given
+ * key.
+ * The 'callback'-function is passed an argument which holds the new
+ * value of 'key'. The argument is of type "GLib.Variant". Given that the
+ * receiver knows the internal type, use one of the get_XX()-methods to get
+ * it's actual value.
+ * @see http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/GLib.Variant.html
+ * @param key the key to watch for changes.
+ * @param callback the callback-function to call.
+ */
+ bindKey(key, callback) {
+ // Validate:
+ if (key === undefined || key === null || typeof key !== "string") {
+ throw TypeError("The 'key' should be a string. Got: '" + key + "'");
+ }
+ if (callback === undefined || callback === null || typeof callback !== "function") {
+ throw TypeError("'callback' needs to be a function. Got: " + callback);
+ }
+ // Bind:
+ this._setting.connect("changed::" + key, function (source, key) {
+ callback(source.get_value(key));
+ });
+ }
+ /**
+ * Get if check for working hibernation is enabled. The user might
+ * choose to disable it if we happen to be wrong.
+ *
+ * @returns bool true if we need to check if hibernation works.
+ */
+ getHibernateWorksCheckEnabled() {
+ return this._setting.get_boolean(this.KEY_HIBERNATE_WORKS_CHECK);
+ }
+ /**
+ * Set if check for working hibernation is enabled. The user might
+ * choose to disable it if we happen to be wrong.
+ *
+ * @returns bool true if we need to check if hibernation works.
+ */
+ setHibernateWorksCheckEnabled(enabled) {
+ let key = this.KEY_HIBERNATE_WORKS_CHECK;
+ if (this._setting.is_writable(key)) {
+ if (this._setting.set_boolean(key, enabled)) {
+ Gio.Settings.sync();
+ } else {
+ throw this._errorSet(key);
+ }
+ } else {
+ throw this._errorWritable(key);
+ }
+ }
+ _errorWritable(key) {
+ return "The key '" + key + "' is not writable.";
+ }
+ _errorSet(key) {
+ return "Couldn't set the key '" + key + "'";
+ }
+}
+
+// These "preferences" aren't user accessible so define
+// init() and buildPrefsWidget() to empty functions
+function init() {
+ ExtensionUtils.initTranslations('hibernate-status-button');
+}
+function buildPrefsWidget() {
+ let frame = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL,
+ 'margin-top': 10,
+ 'margin-end': 10,
+ 'margin-bottom': 10,
+ 'margin-start': 10});
+ let setting_label = new Gtk.Label({label: __("This extension has no settings available"),
+ xalign: 0 });
+ frame.append(setting_label);
+ return frame;
+}
diff --git a/hibernate-status/schemas/org.gnome.shell.extensions.hibernate-status-button.gschema.xml b/hibernate-status/schemas/org.gnome.shell.extensions.hibernate-status-button.gschema.xml
new file mode 100644
index 0000000..f29ec1c
--- /dev/null
+++ b/hibernate-status/schemas/org.gnome.shell.extensions.hibernate-status-button.gschema.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ true
+
+
+