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

force-locale option does not work #4176

Closed
1 task done
comecme opened this issue Apr 19, 2020 · 3 comments · Fixed by #4975
Closed
1 task done

force-locale option does not work #4176

comecme opened this issue Apr 19, 2020 · 3 comments · Fixed by #4975

Comments

@comecme
Copy link

comecme commented Apr 19, 2020

  • I have searched open and closed issues for duplicates.

Environment info

  • Duplicati version: 2.0.5.1_beta_2020-01-18
  • Operating system: Windows 10
  • Backend: External SSD

Description

Option --force-locale does not work

Steps to reproduce

  1. Set Windows Region settings to regional format "Dutch (Netherlands)"
  2. Run Duplicati.CommandLine.exe help advanced --force-locale = en-en
  • Actual result:
    Help text is in Dutch (well, some of it)
  • Expected result:
    Help text should be in English

But is is not just the help texts. The command line asking for a pass phrase is also in Dutch.

Screenshots

image

image

The same problem occurs if you set the regional settings to French. Then the texts are in French, no matter what you pass in for force-locale.

@duplicatibot
Copy link

This issue has been mentioned on Duplicati. There might be relevant details there:

https://forum.duplicati.com/t/how-to-force-commandline-output-in-english/5299/10

@drwtsn32x drwtsn32x changed the title force-local option does not work force-locale option does not work Apr 20, 2020
@Android-X13
Copy link

I confirm that the --force-locale option doesn't work; for example all error messages thrown by Duplicati Command Line are displayed using my system's locale, despite having set --force-locale to en or en-us (as an example).

@Jojo-1000
Copy link
Contributor

Jojo-1000 commented Jun 23, 2023

The issues I found with --force-locale not working:

  • The option is never used for the help command
  • The current implementation in the other operations that do use the option only set the system culture, not the localization which is separate
  • When running via the GUI, the culture is reset to the language of the request immediately

I thought this would be an easy fix, but the last one requires a bit of thinking to get around it.

Jojo-1000 added a commit to Jojo-1000/duplicati that referenced this issue Jun 23, 2023
- Localization culture is set from multiple threads on the server, so use current local context for every new call instead of global context
- Change locale before executing help commands if flag is present
- When force-locale is set, also change locale for log messages

Closes duplicati#4176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants