Skip to content

Commit

Permalink
Merge branch 'unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanisław committed Nov 13, 2019
2 parents 81c10e6 + cb1b281 commit fd607aa
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
language: node_js

node_js:
- lts/*
- 10/*

sudo: required

Expand Down
10 changes: 4 additions & 6 deletions data/com.github.stsdc.monitor.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
<url type="help">https://github.com/stsdc/monitor/issues</url>

<releases>
<release version="0.6.0" date="2019-10-29">
<release version="0.6.1" date="2019-11-13">
​ <description>
​ <ul>
<li> Update Italian translation (Mirko Brombin)</li>
<li> Show swap usage (Ryo Nakano)</li>
<li> Update Russian translation (camellan)</li>
<li> Code refactoring (Ryo Nakano)</li>
<li> Update Japanese translation (Ryo Nakano)</li>
<li> Update Portuguese translation (Hugo Carvalho)</li>
<li> Update French translation (Nathan Bonnemains and Skeudwenn)</li>
<li> Fix: Don't show swap percentage when it's not available (Ryo Nakano) </li>
</ul>
​ </description>
​ </release>
Expand Down
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
com.github.stsdc.monitor (0.6.1) bionic; urgency=low

* Update Portuguese translation (Hugo Carvalho)
* Update French translation (Nathan Bonnemains and Skeudwenn)
* Fix: Don't show swap percentage when it's not available (Ryo Nakano)

-- Stanisław Dac <[email protected]> Wed, 13 Nov 2019 21:18:52 +0100

com.github.stsdc.monitor (0.6.0) bionic; urgency=low

* Update Italian translation (Mirko Brombin)
Expand Down
2 changes: 1 addition & 1 deletion po/extra/LINGUAS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
de es fr ja lt nl pl ru uk
de es fr ja lt nl pl pt ru uk
52 changes: 52 additions & 0 deletions po/extra/pt.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the extra package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-20 22:25+0900\n"
"PO-Revision-Date: 2019-11-04 12:19+0000\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.4\n"
"Last-Translator: Hugo Carvalho <[email protected]>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: pt\n"

#: data/com.github.stsdc.monitor.appdata.xml.in:7
#: data/com.github.stsdc.monitor.desktop.in:3
msgid "Monitor"
msgstr "Monitor"

#: data/com.github.stsdc.monitor.appdata.xml.in:8
msgid "Manage processes and monitor system resources"
msgstr "Gerir processos e monitorizar os recursos do sistema"

#: data/com.github.stsdc.monitor.appdata.xml.in:10
msgid "Display usage of system resources, filter and manage processes."
msgstr "Exibir o uso dos recursos do sistema, filtrar e gerir processos."

#: data/com.github.stsdc.monitor.appdata.xml.in:22
msgid "Stanisław Dac"
msgstr "Stanisław Dac"

#: data/com.github.stsdc.monitor.desktop.in:4
msgid "System Monitor"
msgstr "Monitor do sistema"

#: data/com.github.stsdc.monitor.desktop.in:6
msgid "Manage processes and monitor resource usage of the system"
msgstr "Gerir processos e monitorizar a utilização de recursos do sistema"

#: data/com.github.stsdc.monitor.desktop.in:10
msgid "com.github.stsdc.monitor"
msgstr "com.github.stsdc.monitor"

#: data/com.github.stsdc.monitor.desktop.in:14
msgid "System monitor;System usage;Task manager;"
msgstr "Monitor do sistema;Utilização do sistema;Gestor de tarefas;"
54 changes: 19 additions & 35 deletions po/fr.po
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
# 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 <EMAIL@ADDRESS>, YEAR.
# Raí B. Toffoletto <[email protected]>, 2019.
# French translations for com.github.stsdc.monitor package.
# Copyright (C) 2019 THE com.github.stsdc.monitor'S COPYRIGHT HOLDER
# This file is distributed under the same license as the com.github.stsdc.monitor package.
# Nathan Bonnemains, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Project-Id-Version: com.github.stsdc.monitor\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-17 21:21+0200\n"
"PO-Revision-Date: 2019-03-31 10:30+0200\n"
"Last-Translator: Raí B. Toffoletto <[email protected]>\n"
"PO-Revision-Date: 2019-11-03 14:15+0200\n"
"Last-Translator: Nathan Bonnemains\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Gtranslator 2.91.7\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: src/Indicator/Widgets/PopoverWidget.vala:12
msgid "Show Monitor"
msgstr "Montrer Monitor"
msgstr "Afficher Monitor"

#: src/Indicator/Widgets/PopoverWidget.vala:13
msgid "Quit Monitor"
Expand All @@ -31,48 +29,44 @@ msgstr "Quitter Monitor"
#. Unique name
#: src/Indicator/Indicator.vala:44
msgid "Monitor Indicator"
msgstr "Icône du panneau"
msgstr "Indicateur du panneau"

#. Localised name
#: src/Indicator/Indicator.vala:45
msgid "Show system resources"
msgstr "Montrer ressources du système"
msgstr "Afficher les ressources du système"

#: src/Widgets/Headerbar.vala:15
msgid "Monitor"
msgstr "Monitor"

#: src/Widgets/Headerbar.vala:23
#, fuzzy
msgid "End Process"
msgstr "Terminer le processus"
msgstr "Mettre fin au processus"

#: src/Widgets/Headerbar.vala:26
#, fuzzy
msgid "End selected process"
msgstr "Terminer le processus"
msgstr "Mettre fin au processus sélectionné"

#: src/Widgets/Headerbar.vala:30
#, fuzzy
msgid "Kill Process"
msgstr ""
msgstr "Tuer le processus"

#: src/Widgets/Headerbar.vala:32
msgid "Kill selected process"
msgstr ""
msgstr "Tuer le processus sélectionné"

#: src/Widgets/Headerbar.vala:42
msgid "Settings"
msgstr "Préférences"
msgstr "Paramètres"

#: src/Widgets/Headerbar.vala:56
#, fuzzy
msgid "Show an indicator:"
msgstr "Montrer icône du panneau"
msgstr "Afficher un indicateur :"

#: src/Widgets/Headerbar.vala:62
msgid "Start in background:"
msgstr ""
msgstr "Démarrer en arrière-plan :"

#. setup name column
#: src/Widgets/OverallView.vala:21
Expand Down Expand Up @@ -108,24 +102,14 @@ msgid "Search Process"
msgstr "Rechercher un processus"

#: src/Widgets/Search.vala:15
#, fuzzy
msgid "Type process name or PID to search"
msgstr "Entrez le nom d'un processus ou un PID"
msgstr "Tapez le nom d'un processus ou un PID à rechercher"

#: src/Widgets/Statusbar/Statusbar.vala:12
#: src/Widgets/Statusbar/Statusbar.vala:16
msgid "Calculating…"
msgstr ""
msgstr "Calcul en cours…"

#: src/Models/GenericModel.vala:274
msgid "Background Applications"
msgstr "Applications en arrière-plan"

#~ msgid "Ctrl+E"
#~ msgstr "Ctrl+E"

#~ msgid "CPU:"
#~ msgstr "CPU :"

#~ msgid "Memory:"
#~ msgstr "Mémoire :"
37 changes: 16 additions & 21 deletions po/pt.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-17 21:21+0200\n"
"PO-Revision-Date: 2019-03-31 10:19+0200\n"
"Last-Translator: Raí B. Toffoletto <rai@raibtoffoletto.com>\n"
"PO-Revision-Date: 2019-11-04 11:58+0000\n"
"Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
"Language-Team: \n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Gtranslator 2.91.7\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.4\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#: src/Indicator/Widgets/PopoverWidget.vala:12
msgid "Show Monitor"
msgstr "Monitor Mostrar"
msgstr "Mostrar Monitor"

#: src/Indicator/Widgets/PopoverWidget.vala:13
msgid "Quit Monitor"
Expand All @@ -31,7 +31,7 @@ msgstr "Fechar Monitor"
#. Unique name
#: src/Indicator/Indicator.vala:44
msgid "Monitor Indicator"
msgstr "Ícone do painel"
msgstr "Indicador do monitor"

#. Localised name
#: src/Indicator/Indicator.vala:45
Expand All @@ -43,36 +43,32 @@ msgid "Monitor"
msgstr "Monitor"

#: src/Widgets/Headerbar.vala:23
#, fuzzy
msgid "End Process"
msgstr "Terminar processo"

#: src/Widgets/Headerbar.vala:26
#, fuzzy
msgid "End selected process"
msgstr "Terminar processo"
msgstr "Terminar processo selecionado"

#: src/Widgets/Headerbar.vala:30
#, fuzzy
msgid "Kill Process"
msgstr ""
msgstr "Matar processo"

#: src/Widgets/Headerbar.vala:32
msgid "Kill selected process"
msgstr ""
msgstr "Matar processo selecionado"

#: src/Widgets/Headerbar.vala:42
msgid "Settings"
msgstr "Preferências"
msgstr "Definições"

#: src/Widgets/Headerbar.vala:56
#, fuzzy
msgid "Show an indicator:"
msgstr "Mostrar ícone do painel"
msgstr "Mostra um indicador:"

#: src/Widgets/Headerbar.vala:62
msgid "Start in background:"
msgstr ""
msgstr "Inicia em segundo plano:"

#. setup name column
#: src/Widgets/OverallView.vala:21
Expand Down Expand Up @@ -105,21 +101,20 @@ msgstr "GiB"

#: src/Widgets/Search.vala:14
msgid "Search Process"
msgstr "Buscar por um processo"
msgstr "Procurar processo"

#: src/Widgets/Search.vala:15
#, fuzzy
msgid "Type process name or PID to search"
msgstr "Digite o nome de um processo ou um PID"
msgstr "Escreva o nome do processo ou PID a pesquisar"

#: src/Widgets/Statusbar/Statusbar.vala:12
#: src/Widgets/Statusbar/Statusbar.vala:16
msgid "Calculating…"
msgstr ""
msgstr "A calcular…"

#: src/Models/GenericModel.vala:274
msgid "Background Applications"
msgstr "Aplicações ativas em background"
msgstr "Aplicações em segundo plano"

#~ msgid "Ctrl+E"
#~ msgstr "Ctrl+E"
Expand Down
8 changes: 7 additions & 1 deletion src/Resources/Swap.vala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ public class Monitor.Swap : Object {
public int percentage {
get {
update ();
return (int) (Math.round ((used / total) * 100));

// The total amount of the swap is 0 when it is unavailable
if (total == 0) {
return 0;
} else {
return (int) (Math.round ((used / total) * 100));
}
}
}

Expand Down
11 changes: 8 additions & 3 deletions src/Widgets/Statusbar/Statusbar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ public class Monitor.Statusbar : Gtk.ActionBar {
public bool update (Utils.SystemResources sysres) {
cpu_usage_label.set_text (("%d%%").printf (sysres.cpu_percentage));
memory_usage_label.set_text (("%d%%").printf (sysres.memory_percentage));
swap_usage_label.set_text (("%d%%").printf (sysres.swap_percentage));

string memory_tooltip_text = ("%.1f %s / %.1f %s").printf (sysres.memory_used, _ ("GiB"), sysres.memory_total, _ ("GiB"));
memory_usage_label.tooltip_text = memory_tooltip_text;

string swap_tooltip_text = ("%.1f %s / %.1f %s").printf (sysres.swap_used, _ ("GiB"), sysres.swap_total, _ ("GiB"));
swap_usage_label.tooltip_text = swap_tooltip_text;
// The total amount of the swap is 0 when it is unavailable
if (sysres.swap_total == 0) {
swap_usage_label.set_text ("N/A");
} else {
swap_usage_label.set_text (("%d%%").printf (sysres.swap_percentage));
string swap_tooltip_text = ("%.1f %s / %.1f %s").printf (sysres.swap_used, _ ("GiB"), sysres.swap_total, _ ("GiB"));
swap_usage_label.tooltip_text = swap_tooltip_text;
}

return true;
}
Expand Down

0 comments on commit fd607aa

Please sign in to comment.