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

Some description labels do not change to selected language unless Delta Chat closed and executed again #1637

Closed
gerryfrancis opened this issue May 13, 2020 · 21 comments
Assignees
Labels
bug Something isn't working translations

Comments

@gerryfrancis
Copy link
Contributor

gerryfrancis commented May 13, 2020

  • Platform (linux/mac/windows):
    Windows 8.1 Pro.

  • Delta Chat Desktop Version:
    1.3.3-1.10.0.

  • Expected behavior:
    Delta Chat translates all English description labels to the previously selected language.

  • Actual behavior:
    Delta Chat does not translate all English description labels to the previously selected language.

  • Step to reproduce the problem:
    -- Select a different language than English (e.g. "Deutsch" for German).

  • Screenshot:
    -- This is the result when "Deutsch" (German) is selected:
    grafik

  • Remark:
    -- After Delta Chat is closed and executed again, the description labels show the texts in the previously selected language.

@Simon-Laux
Copy link
Member

At first glance I can't reproduce this on linux, maybe its an issue that appear only on windows?

@Simon-Laux Simon-Laux added the bug Something isn't working label May 14, 2020
@gerryfrancis
Copy link
Contributor Author

@Simon-Laux That is strange. Unfortunately I cannot test on Linux. As you can see at the screenshot, the only description label that is translated in German is "Suchen".

@Simon-Laux
Copy link
Member

Did you find anything interesting in the logfile?

@gerryfrancis
Copy link
Contributor Author

@Simon-Laux No, unfortunately not, just this:

"2020-05-14T11:06:20.410Z"	"main/menu"	"INFO"		"rebuilding menu with locale de"
"2020-05-14T11:06:21.373Z"	"main/state"	"INFO"		"Saving state to C:\\Users\\PC_USER\\AppData\\Local\\DeltaChat\\config.json"

@Simon-Laux
Copy link
Member

After Delta Chat is closed and executed again, the description labels show the texts in the previously selected language.

So german just doesn't work for you at all or is it fixed after a restart?

@gerryfrancis
Copy link
Contributor Author

@Simon-Laux It is fixed after a restart.

@Simon-Laux
Copy link
Member

Simon-Laux commented May 14, 2020

Okey, lets debug this then.

  1. start deltachat from the commandline (powershell or conhost/cmd.exe) with the argument -- debug
  2. This should open deltachat and the developer console and log all debug messages.
  3. Change the language and look for extras.getLocaleData in the dev console.
  4. Save the message varible to the global scope:
    Peek 2020-05-14 13-22
  5. after the message variable is copied to temp1 run
Object.keys(temp1).length

in the dev-console. This counts how many language strings were sent to the fronted.
What does this number say?

@gerryfrancis
Copy link
Contributor Author

@Simon-Laux Maybe I am stupid, but I cannot get the console by running DeltaChat.exe -- debug . :( (I am testing with the final version 1.3.3, has the console been withdrawn from it?)

@Jikstra
Copy link
Contributor

Jikstra commented May 14, 2020

It's:

  1. cd C:\Program Files\DeltaChat (not sure about the exact path)
  2. .\DeltaChat.exe -- --debug or .\DeltaChat.exe --debug currently dont have a windows system around but one of them should work

@gerryfrancis
Copy link
Contributor Author

gerryfrancis commented May 14, 2020

cd C:\Program Files\DeltaChat (not sure about the exact path)

@Jikstra Quite strange, on my Windows machine Delta Chat is installed in C:\Users\PC_USER\AppData\Local\Programs\deltachat-desktop . So this app is limited to the current user who installed it. (However, I do not know if it is intended to be this way, but that is a different story.)

.\DeltaChat.exe -- --debug

@Jikstra Hooray, you have nailed it! :)

What does this number say?

@Simon-Laux This number says 595 .

@Simon-Laux
Copy link
Member

that's the right number so the problem must be somewhere else...

@gerryfrancis
Copy link
Contributor Author

gerryfrancis commented May 14, 2020

I have found out that the texts in the global three-dot menu (on the right) are not affected and changed to the previously selected language. This would limit the issue to the texts located in the main window beyond the top menu bar.

@Simon-Laux
Copy link
Member

The the top menu bar is controlled by the main process, which also sends the language data to the front-end process. The thing you checked was whether the front-end process received this data. So we can say the problem most likely lies in applying the new data.

@gerryfrancis
Copy link
Contributor Author

@Simon-Laux To me it looks like the process of refreshing the text labels is stopped after the first one, which is "Suchen". Maybe that helps.

@gerryfrancis
Copy link
Contributor Author

Thanks, I will test the fix in the upcoming release! 👍

@gerryfrancis
Copy link
Contributor Author

gerryfrancis commented Jul 16, 2020

@Simon-Laux I am reopening this, because it seems that not all labels have been caught:

grafik

grafik

(Started in English and switched to German, tested in version 1.10.0.)

@gerryfrancis gerryfrancis reopened this Jul 16, 2020
@Jikstra
Copy link
Contributor

Jikstra commented Jul 16, 2020

@gerryfrancis you need to reselect a chat, then they should go away. Those are the strings we need to put into the core and the core gives back to us. We would need to refetch & rerender everything so that they get replaced with the translated strings. As they are not too many I think it's okay for now.

@gerryfrancis
Copy link
Contributor Author

gerryfrancis commented Jul 16, 2020

you need to reselect a chat, then they should go away.

@Jikstra After changing the language from English to German, I reselected "Device messages" and "Saved messages", but they stay as they are in the chatlist. Do you really think this is a core issue? (I should mention that translations for "Device messages" and "Saved messages" are available.)

@Simon-Laux
Copy link
Member

Simon-Laux commented Jul 16, 2020

as @Jikstra said those strings come from the core. also those chats are mostly hidden bellow in the chatlist so its ok for now.
There are more important things to do right now than fixing this mini cosmetic bug that only appears right after the user changes their language.

@gerryfrancis
Copy link
Contributor Author

@Simon-Laux As long as Delta Chat runs the system language (which did not work out in the past, but now it does), it is OK. When there is enough time left, we can fix this one, of course.

@Simon-Laux
Copy link
Member

Let's put it into project resurrection then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working translations
Projects
None yet
Development

No branches or pull requests

3 participants