Language in GUI of nymea:app

Is there any way of changing the language in which the GUI of the nymea:app is shown?

I am running this in Ubuntu LInux, and the only way to change the GUI from my native language seems to be by changing the language of my complete computer session. I wouldn’t like to do that as it might have side effects on my installation, such as the naming of system folders.

Still, from time to time it would be useful to have the nymea:app in English, for example for discussing the behaviour of the app here in the forum.

You can run it from the command line like that:

LANG=en_US nymea-app
1 Like

I’m sorry if I seem somewhat dense. Typing nymea-app in the terminal window on my Ubuntu desktop computer yields a bunch of error messages (possibly relating to missing windows geometry parameters) and then opens the app. Typing LANG=en_US nymea-app does exactly the same with no visible difference in the GUI. Everything is still in my own language, i.e. German.

Just tried it… seems to work fine for me…

Are you perhaps using the snap package? Snaps will override the environment. In that case you may have some luck with something like described in here: ubuntu - set or pass an environment variable to a snap application (reach pulseaudio server on another machine via tcp from within a snap application) - Unix & Linux Stack Exchange

i.e.

echo "LANG=en" | snap run --shell nymea-app

Thank you so much. Yes, indeed, I was using the snap package. I now am running nymea from the repository.

  1. Still no luck; UI still in German
  2. I am currently only testing nymea. I very much like what I see, but I haven’t yet decided whether I will keep on using it.
  3. Given that I’m only testing, this is becoming too much of an issue. I will drop the matter for now.
  4. However, running LANG=en nymea-app fetched me a funny set of error messages which may be of interest to you:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

(process:7869): Gtk-WARNING **: 17:51:10.622: Locale not supported by C library.
	Using the fallback 'C' locale.
Cyclic dependency detected between "qrc:/ui/utils/AirQualityIndex.qml" and "qrc:/ui/utils/AirQualityIndex.qml"
Cyclic dependency detected between "qrc:/ui/utils/AirQualityIndex.qml" and "qrc:/ui/utils/NymeaUtils.qml"
Cyclic dependency detected between "qrc:/ui/utils/NymeaUtils.qml" and "qrc:/ui/utils/NymeaUtils.qml"
qrc:/ui/RootItem.qml:512:31: QML TabButton: Binding loop detected for property "width"
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
qml: InterfaceTile, inlineButtonControl 2 image: Unhandled interface powersocket
qml: ButtonControls button 1 image: Unhandled interface powersocket
qml: InterfaceTile, inlineControl: Unhandled interface notifications
qml: InterfaceTile, inlineControl: Unhandled interface button
qrc:/ui/MainMenu.qml:55: TypeError: Cannot read property 'currentStyle' of null
qrc:/ui/MainPage.qml:289: TypeError: Cannot read property 'currentStyle' of null
qrc:/ui/mainviews/ThingsView.qml:82: TypeError: Cannot read property 'currentStyle' of null

That log still looks like coming from a snap package

I’m quite out of my depth here. I don’t really know what I’m doing. However, snap list shows no trace of nymea while the package tool synaptics shows nymea-app as an installed package. The above messages appeared in the terminal window when starting nymea-app.

This is what I get when running nymea-app as a snap:


hilipp@philipp-Aspire-S5-371:~$ nymea-app
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Qt: Session management error: Could not open network socket
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
qrc:/ui/RootItem.qml:512:31: QML TabButton: Binding loop detected for property "width"
qrc:/ui/MainMenu.qml:229:31: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:229:31: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:229:31: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:229:31: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:229:31: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:229:31: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:212:17: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:202:17: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:190:17: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:177:17: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qrc:/ui/MainMenu.qml:164:17: QML NymeaItemDelegate: Binding loop detected for property "implicitWidth"
qml: InterfaceTile, inlineButtonControl 2 image: Unhandled interface powersocket
qml: ButtonControls button 1 image: Unhandled interface powersocket
qml: InterfaceTile, inlineControl: Unhandled interface notifications
qml: InterfaceTile, inlineControl: Unhandled interface button

Well it’s fine to use the snap package it’s the same code, regardless if you run it from snap or not. The difference is just that without the snap you can set the LANG environment variable, but with the snap package that’s not so straight forward, but the line I’ve posted above should work for the snap.

Thank you for your patience, Michael. There seems to be an issue in both of my Ubuntu Linux computers and I’m not going to proceed any further in this topic. I can live with the UI being shown only in my own language.

However, I have found a few strange things which I am adding here just for your information, and I don’t expect you or anyone to actually respond here to that information:

The command LANG=en_US nymea-app
provokes (among others) this error message in the terminal:

Gtk-WARNING **: 13:35:31.582: Locale not supported by C library.
	Using the fallback 'C' locale.

while the command LANG=en_US.UTF-8 nymea-app
does not. Neither does it switch the UI language to English.

In both cases, nymea-app produces a mixed bunch of error message concerning circular references and missing objects. One of the commands also produces several error messages of the form

QQmlComponent: Created graphical object was not placed in the graphics scene.

while the other does not.

So, those messages about circular dependencies printed by the app aren’t nice, but they’re not an actual problem.

As for the language… I am reasonably confident that it should work fine, except for the snap part which I haven’t tried. This is what I’m using during development to test translations. I’m not sure what goes wrong in your setup.