Giter VIP home page Giter VIP logo

Comments (11)

raveit65 avatar raveit65 commented on August 28, 2024

Hi,
i checked build log of 1.24 release but i didn't see a build warning for translations of your language.
https://travis-ci.org/github/mate-desktop/mate-sensors-applet/jobs/649558212
I am using sensor-applet too with amd and nvidia hardware.
So, i can switch tomorrow morning (when i am fresh :) ) my desktop to Turkish language, to see if i can reproduce the issue.
Not sure if i can debug something because i am in doubt that i understand my desktop in Turkish :)

But i recall that i got such a temp1 warning sometimes. It seems that temp1 is my wifi card. So every time i disable wifi with network-manager i get a temp1 warning.

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

Ok, it happens with all sensors from libsensors and udisk2 plugin. Only the nvidia plug-in is working here.
Bildschirmfoto zu 2020-06-06 10-59-53
With that error message

rave@satellite ~]$ LANG=tr_TR
[rave@satellite ~]$ /usr/libexec/mate-sensors-applet

(mate-sensors-applet:4025): Gtk-WARNING **: 11:03:28.221: Invalid input string

(mate-sensors-applet:4025): Gtk-WARNING **: 11:03:28.221: Invalid input string

I guess it was a problem with migration from intltools to gettext.
@mate-desktop/core-team
Can you please take a look into it. Issue is posted from our transifex admin (team).

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

The tooltip of the sensors shows me Errror compiling URL regex

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

libsensors plugin looks at this place for the url.
https://github.com/mate-desktop/mate-sensors-applet/blob/master/plugins/libsensors/libsensors-plugin.c#L199
url = g_strdup_printf ("sensor://%s/%d", chip_name, data->number);
and the tooltip error message is here.
https://github.com/mate-desktop/mate-sensors-applet/blob/master/plugins/libsensors/libsensors-plugin.c#L429
g_set_error (error, SENSORS_APPLET_PLUGIN_ERROR, LIBSENSORS_REGEX_URL_COMPILE_ERROR, "Error compiling URL regex");

I guess something is wrong with reading the vars from url.

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

@cardpuncher
Do you have this symbol errors when calling lm_sensors directly in terminal?

[rave@satellite ~]$ sensors
BAT1-acpi-0
Adapter: ACPI interface
in0:          12.53 V  
curr1:         0.00 A  

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +39.0�C  (high = +95.0�C, crit = +105.0�C)
Core 2:       +35.0�C  (high = +95.0�C, crit = +105.0�C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +43.0�C  (crit = +100.0�C)

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

Hmm, with fr_FR language i get this warning too
(mate-sensors-applet:4025): Gtk-WARNING **: 11:03:28.221: Invalid input string
but all sensors are displaying fine.

I checked tr.po but i didn't saw any error.

from mate-sensors-applet.

rbuj avatar rbuj commented on August 28, 2024

There is an error in the translation, but I don't think it's related to the runtime error, tomorrow I will debug the code in order to find the source of the error as I can't do it today.

$ msgfmt -c --check-accelerators='_' po/tr.po 
po/tr.po:409: msgstr lacks the keyboard accelerator mark '_'
msgfmt: found 1 fatal error

Missing accelerator '_' at po/tr.po:409:

#: sensors-applet/sensor-config-dialog.c:651
msgid "Alarm _repeat interval (secs)"
msgstr "Alarmın tekrarlanma aralığı (saniye)"

@raveit65 I don't think the error is located on libsensors-plugin.c:199, because SENSORS_API_VERSION > 0x400

$ grep SENSORS_API_VERSION /usr/include/sensors/sensors.h
#define SENSORS_API_VERSION		0x500

from mate-sensors-applet.

cardpuncher avatar cardpuncher commented on August 28, 2024

from mate-sensors-applet.

rbuj avatar rbuj commented on August 28, 2024

glibc's regexec returns 1 for Turkish locale, i.e. no match.

if (regexec (&uri_re, path, 3, m, 0) == 0) {

Displaying the error message

Untitled

--- a/plugins/libsensors/libsensors-plugin.c
+++ b/plugins/libsensors/libsensors-plugin.c
@@ -396,10 +396,11 @@ static gdouble libsensors_plugin_get_sensor_value(const gchar *path,
                                                     SensorType type,
                                                     GError **error) {
     gdouble result = 0;
+    int status;
     regmatch_t m[3];
 
     /* parse the uri into a (chip, feature) tuplet */
-    if (regexec (&uri_re, path, 3, m, 0) == 0) {
+    if ((status = regexec (&uri_re, path, 3, m, 0)) == 0) {
         const sensors_chip_name *found_chip;
         int feature;
 
@@ -426,7 +427,9 @@ static gdouble libsensors_plugin_get_sensor_value(const gchar *path,
             g_set_error (error, SENSORS_APPLET_PLUGIN_ERROR, LIBSENSORS_CHIP_NOT_FOUND_ERROR, "Chip not found");
         }
     } else {
-        g_set_error (error, SENSORS_APPLET_PLUGIN_ERROR, LIBSENSORS_REGEX_URL_COMPILE_ERROR, "Error compiling URL regex");
+        char buffer[100];
+        regerror(status, &uri_re, buffer, 100);
+        g_set_error (error, SENSORS_APPLET_PLUGIN_ERROR, LIBSENSORS_REGEX_URL_COMPILE_ERROR, "Error compiling URL regex: %s", buffer);
     }
     return result;
 }

Ekran Görüntüsü 2020-06-09 12-19-38

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

@cardpuncher
Do you like to test #107 ?
It fixes for me the issue.

from mate-sensors-applet.

cardpuncher avatar cardpuncher commented on August 28, 2024

from mate-sensors-applet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.