Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yfquotes@thegli: add setting to manually update quotes data #1195

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions yfquotes@thegli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ To disable the debug log mode, delete the "DEBUG" file, and restart the Cinnamon

## Release Notes

### 0.12.0 - May 22, 2024

Features:

- new setting to manually update data by clicking on the "last update" timestamp label
- add Dutch translation (courtesy of [qadzek](https://github.com/qadzek))
- update Spanish translation (courtesy of [haggen88](https://github.com/haggen88))

### 0.11.0 - March 15, 2024

Features:
Expand Down
17 changes: 16 additions & 1 deletion yfquotes@thegli/files/yfquotes@thegli/desklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ StockQuoteDesklet.prototype = {
this.onSettingsChanged, null);
this.settings.bindProperty(Settings.BindingDirection.IN, "showLastUpdateTimestamp", "showLastUpdateTimestamp",
this.onSettingsChanged, null);
this.settings.bindProperty(Settings.BindingDirection.IN, "manualDataUpdate", "manualDataUpdate",
this.onSettingsChanged, null);
this.settings.bindProperty(Settings.BindingDirection.IN, "sendCustomUserAgent", "sendCustomUserAgent",
this.onSettingsChanged, null);
this.settings.bindProperty(Settings.BindingDirection.IN, "customUserAgent", "customUserAgent",
Expand Down Expand Up @@ -724,11 +726,24 @@ StockQuoteDesklet.prototype = {
},

createLastUpdateLabel: function(settings) {
return new St.Label({
const label = new St.Label({
text: _("Updated at ") + this.formatCurrentTimestamp(settings),
style_class: "quotes-last-update",
reactive: this.manualDataUpdate,
style: "color: " + settings.fontColor + "; " + (settings.fontSize > 0 ? "font-size: " + settings.fontSize + "px;" : "")
});

if (this.manualDataUpdate) {
const updateButton = new St.Button();
updateButton.add_actor(label);
updateButton.connect("clicked", Lang.bind(this, function() {
this.removeUpdateTimer();
this.onUpdate();
}));
return updateButton;
} else {
return label;
}
},

createErrorLabel: function(errorMsg) {
Expand Down
2 changes: 1 addition & 1 deletion yfquotes@thegli/files/yfquotes@thegli/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"name": "Yahoo Finance Quotes",
"prevent-decorations": true,
"max-instances": "10",
"version": "0.11.0",
"version": "0.12.0",
"uuid": "yfquotes@thegli"
}
29 changes: 19 additions & 10 deletions yfquotes@thegli/files/yfquotes@thegli/po/da.po
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Yahoo Finance Quotes Desklet
# Copyright (C) 2020 Thomas Egli
# Copyright (C) 2018 Thomas Egli
# This file is distributed under the same license as the Yahoo Finance Quotes Desklet package.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-03-15 19:46+0100\n"
"POT-Creation-Date: 2024-05-22 21:38+0200\n"
"PO-Revision-Date: 2023-12-08 08:06+0100\n"
"Last-Translator: Alan Mortensen <alanmortensen.am@gmail.com>\n"
"Language-Team: \n"
Expand All @@ -21,44 +22,44 @@ msgstr ""
msgid "Yahoo Finance service not available!\\nStatus: "
msgstr "Yahoo Finance er ikke tilgængelig!\\nStatus: "

#: desklet.js:728
#: desklet.js:730
msgid "Updated at "
msgstr "Opdateret "

#: desklet.js:736
#: desklet.js:751
msgid "Error: "
msgstr "Fejl: "

#: desklet.js:798
#: desklet.js:813
msgid ""
"Failed to retrieve authorization parameter! Unable to fetch quotes data."
"\\nStatus: "
msgstr ""
"Kunne ikke hente godkendelsesparameter! Kunne ikke hente kursdata.\n"
"Status: "

#: desklet.js:823
#: desklet.js:838
msgid "Consent processing failed! Unable to fetch quotes data.\\nStatus: "
msgstr "Samtykkebehandling mislykkedes! Kunne ikke hente kursdata.\\nStatus: "

#: desklet.js:828
#: desklet.js:843
msgid ""
"Consent processing not completed! Unable to fetch quotes data.\\nStatus: "
msgstr ""
"Samtykkebehandling ikke gennemført! Kunne ikke hente kursdata.\\nStatus: "

#: desklet.js:850
#: desklet.js:865
msgid ""
"Failed to retrieve authorization crumb! Unable to fetch quotes data."
"\\nStatus: "
msgstr ""
"Kunne ikke hente godkendelseskrumme! Kunne ikke hente kursdata.\\nStatus: "

#: desklet.js:877
#: desklet.js:892
msgid "Cannot display quotes information for symbols: "
msgstr "Kan ikke vise kurser for symbolerne: "

#: desklet.js:878
#: desklet.js:893
msgid "The following error occurred: "
msgstr "Følgende fejl opstod: "

Expand Down Expand Up @@ -202,6 +203,14 @@ msgstr "Vis, hvornår data sidst blev opdateret"
msgid "Display timestamp when quotes were updated last"
msgstr "Viser tidsstempel for den sidste opdatering af kurserne."

#. settings-schema.json->manualDataUpdate->description
msgid "Manual update"
msgstr ""

#. settings-schema.json->manualDataUpdate->tooltip
msgid "Click last update timestamp to instantly refresh quotes data"
msgstr ""

#. settings-schema.json->sendCustomUserAgent->description
msgid "Send custom User-Agent header"
msgstr "Send brugerdefineret User-Agent-header"
Expand Down
29 changes: 19 additions & 10 deletions yfquotes@thegli/files/yfquotes@thegli/po/de.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# German translation for Yahoo Finance Quotes Desklet
# Yahoo Finance Quotes Desklet
# Copyright (C) 2018 Thomas Egli
# This file is distributed under the same license as the Yahoo Finance Quotes Desklet package.
#
Expand All @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-03-15 20:39+0100\n"
"POT-Creation-Date: 2024-05-22 21:38+0200\n"
"PO-Revision-Date: 2023-08-28 16:36+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand All @@ -21,48 +21,48 @@ msgstr ""
msgid "Yahoo Finance service not available!\\nStatus: "
msgstr "Yahoo Finance Service nicht verfügbar!\\nStatus: "

#: desklet.js:728
#: desklet.js:730
msgid "Updated at "
msgstr "Aktualisiert um "

#: desklet.js:736
#: desklet.js:751
msgid "Error: "
msgstr "Fehler: "

#: desklet.js:798
#: desklet.js:813
msgid ""
"Failed to retrieve authorization parameter! Unable to fetch quotes data."
"\\nStatus: "
msgstr ""
"Empfang von Autorisierungsparameter ist fehlgeschlagen! Finanzdaten-Abfrage "
"nicht möglich.\\nStatus: "

#: desklet.js:823
#: desklet.js:838
msgid "Consent processing failed! Unable to fetch quotes data.\\nStatus: "
msgstr ""
"Consent-Erteilung ist fehlgeschlagen! Finanzdaten-Abfrage nicht möglich."
"\\nStatus: "

#: desklet.js:828
#: desklet.js:843
msgid ""
"Consent processing not completed! Unable to fetch quotes data.\\nStatus: "
msgstr ""
"Consent-Erteilung nicht abgeschlossen! Finanzdaten-Abfrage nicht möglich."
"\\nStatus: "

#: desklet.js:850
#: desklet.js:865
msgid ""
"Failed to retrieve authorization crumb! Unable to fetch quotes data."
"\\nStatus: "
msgstr ""
"Emfang von Autorisierungs-Crumb ist fehlgeschlagen! Finanzdaten-Abfrage "
"nicht möglich.\\nStatus: "

#: desklet.js:877
#: desklet.js:892
msgid "Cannot display quotes information for symbols: "
msgstr "Finanzdaten können nicht angezeigt werden für die Symbole: "

#: desklet.js:878
#: desklet.js:893
msgid "The following error occurred: "
msgstr "Folgender Fehler ist aufgetreten: "

Expand Down Expand Up @@ -208,6 +208,15 @@ msgstr "Zeitpunkt der letzten Aktualisierung anzeigen"
msgid "Display timestamp when quotes were updated last"
msgstr "Zeigt den Zeitstempel der letzten Aktualisierung der Finanzdaten an"

#. settings-schema.json->manualDataUpdate->description
#, fuzzy
msgid "Manual update"
msgstr "Manuelle Aktualisierung"

#. settings-schema.json->manualDataUpdate->tooltip
msgid "Click last update timestamp to instantly refresh quotes data"
msgstr "Zeitstempel anklicken für sofortige Aktualisierung"

#. settings-schema.json->sendCustomUserAgent->description
msgid "Send custom User-Agent header"
msgstr "Sende individuellen User-Agent Header"
Expand Down
26 changes: 17 additions & 9 deletions yfquotes@thegli/files/yfquotes@thegli/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-03-15 19:46+0100\n"
"POT-Creation-Date: 2024-05-22 21:38+0200\n"
"PO-Revision-Date: 2024-03-15 19:21-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand All @@ -21,48 +21,48 @@ msgstr ""
msgid "Yahoo Finance service not available!\\nStatus: "
msgstr "El servicio de Yahoo Finanzas no está disponible: "

#: desklet.js:728
#: desklet.js:730
msgid "Updated at "
msgstr "Actualizado en "

#: desklet.js:736
#: desklet.js:751
msgid "Error: "
msgstr "Error: "

#: desklet.js:798
#: desklet.js:813
msgid ""
"Failed to retrieve authorization parameter! Unable to fetch quotes data."
"\\nStatus: "
msgstr ""
"Error al recuperar el parámetro de autorización. No se han podido recuperar "
"los datos de las cotizaciones: "

#: desklet.js:823
#: desklet.js:838
msgid "Consent processing failed! Unable to fetch quotes data.\\nStatus: "
msgstr ""
"No se ha podido procesar el consentimiento. No se han podido recuperar los "
"datos de las cotizaciones: "

#: desklet.js:828
#: desklet.js:843
msgid ""
"Consent processing not completed! Unable to fetch quotes data.\\nStatus: "
msgstr ""
"No se ha completado el procesamiento del consentimiento. No se han podido "
"recuperar los datos de las cotizaciones: "

#: desklet.js:850
#: desklet.js:865
msgid ""
"Failed to retrieve authorization crumb! Unable to fetch quotes data."
"\\nStatus: "
msgstr ""
"¡No se pudo recuperar la ruta de autorización! No se pueden recuperar los "
"datos de las cotizaciones: "

#: desklet.js:877
#: desklet.js:892
msgid "Cannot display quotes information for symbols: "
msgstr "No se puede mostrar información de cotizaciones para los símbolos: "

#: desklet.js:878
#: desklet.js:893
msgid "The following error occurred: "
msgstr "El siguiente error ha ocurrido: "

Expand Down Expand Up @@ -208,6 +208,14 @@ msgstr "Mostrar la fecha de la última actualización"
msgid "Display timestamp when quotes were updated last"
msgstr "Muestra la fecha de la última actualización de las cotizaciones."

#. settings-schema.json->manualDataUpdate->description
msgid "Manual update"
msgstr ""

#. settings-schema.json->manualDataUpdate->tooltip
msgid "Click last update timestamp to instantly refresh quotes data"
msgstr ""

#. settings-schema.json->sendCustomUserAgent->description
msgid "Send custom User-Agent header"
msgstr "Enviar encabezado User-Agent personalizado"
Expand Down
26 changes: 17 additions & 9 deletions yfquotes@thegli/files/yfquotes@thegli/po/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-03-15 19:46+0100\n"
"POT-Creation-Date: 2024-05-22 21:38+0200\n"
"PO-Revision-Date: 2023-12-22 11:33+0200\n"
"Last-Translator: Kimmo Kujansuu <mrkujansuu@gmail.com>\n"
"Language-Team: \n"
Expand All @@ -22,40 +22,40 @@ msgstr ""
msgid "Yahoo Finance service not available!\\nStatus: "
msgstr "Yahoo Finance palvelu ei ole saatavilla!\\nTila: "

#: desklet.js:728
#: desklet.js:730
msgid "Updated at "
msgstr "Päivitetty klo "

#: desklet.js:736
#: desklet.js:751
msgid "Error: "
msgstr "Virhe: "

#: desklet.js:798
#: desklet.js:813
msgid ""
"Failed to retrieve authorization parameter! Unable to fetch quotes data."
"\\nStatus: "
msgstr "Valtuutuksen haku epäonnistui! Tietoja ei voi noutaa.\\nTila: "

#: desklet.js:823
#: desklet.js:838
msgid "Consent processing failed! Unable to fetch quotes data.\\nStatus: "
msgstr "Suostumuksen käsittely epäonnistui! Tietoja ei voi noutaa.\\nTila: "

#: desklet.js:828
#: desklet.js:843
msgid ""
"Consent processing not completed! Unable to fetch quotes data.\\nStatus: "
msgstr "Suostumusta ei ole suoritettu loppuun! Tietoja ei voi noutaa.\\nTila: "

#: desklet.js:850
#: desklet.js:865
msgid ""
"Failed to retrieve authorization crumb! Unable to fetch quotes data."
"\\nStatus: "
msgstr "Valtuutuksen nouto epäonnistui! Tietoja ei voi noutaa.\\nTila: "

#: desklet.js:877
#: desklet.js:892
msgid "Cannot display quotes information for symbols: "
msgstr "Symbolien tietoja ei voi näyttää: "

#: desklet.js:878
#: desklet.js:893
msgid "The following error occurred: "
msgstr "Tapahtui seuraava virhe: "

Expand Down Expand Up @@ -199,6 +199,14 @@ msgstr "Näytä päivitysaika"
msgid "Display timestamp when quotes were updated last"
msgstr "Näytää ajan, jolloin kurssit päivitettiin viimeksi."

#. settings-schema.json->manualDataUpdate->description
msgid "Manual update"
msgstr ""

#. settings-schema.json->manualDataUpdate->tooltip
msgid "Click last update timestamp to instantly refresh quotes data"
msgstr ""

#. settings-schema.json->sendCustomUserAgent->description
msgid "Send custom User-Agent header"
msgstr "Lähetä mukautetut selaimen asetukset"
Expand Down
Loading