Skip to content

feat: allow overriding the language through the configuration - #8096

Merged
mgallien merged 1 commit into
masterfrom
feature/enforce-translations
Apr 7, 2025
Merged

feat: allow overriding the language through the configuration#8096
mgallien merged 1 commit into
masterfrom
feature/enforce-translations

Conversation

@nilsding

@nilsding nilsding commented Mar 31, 2025

Copy link
Copy Markdown
Member

e.g. this config entry:

; nextcloud.cfg
[General]
language=de

will ensure that the application will always be translated to German.

It's also possible to set the configuration option from the command line:

# set the language to German for the next client startup
./nextcloud --set-language de

# set the language to the OS default for the next client startup
./nextcloud --set-language ""

partial fix for #111, as this is not a GUI option

@nilsding nilsding added feature: 🗣️ localization Languages, localization and translations. 3. to review labels Mar 31, 2025
@nilsding nilsding added this to the 3.17.0 milestone Mar 31, 2025
@nilsding nilsding self-assigned this Mar 31, 2025

@mgallien mgallien left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the application suddenly stop if the forced translation does not exist
maybe the command line could provide a hint why the application is stopping or even better fallback to the default locale

@nilsding
nilsding force-pushed the feature/enforce-translations branch from 66bdf57 to 12ed3d6 Compare April 1, 2025 07:29
@nilsding

nilsding commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

changed the CLI option to --set-language to indicate that it just changes the config and doesn't do anything else

if it's set to invalid values Qt will not load any language either

e.g. this config entry:

```ini
; nextcloud.cfg
[General]
language=de
```

will ensure that the application will always be translated to German.

It's also possible to set the configuration option from the command
line:

```sh
# set the language to German for the next client startup
./nextcloud --set-language de

# set the language to the OS default for the next client startup
./nextcloud --set-language ""
```

partial fix for #111, as this is not a GUI option

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>

# Date:      Mon Mar 31 12:44:55 2025 +0200
#
# On branch feature/enforce-translations
# Your branch and 'origin/feature/enforce-translations' have diverged,
# and have 1 and 1 different commits each, respectively.
#
# Changes to be committed:
#	modified:   src/gui/application.cpp
#	modified:   src/gui/application.h
#	modified:   src/libsync/configfile.cpp
#	modified:   src/libsync/configfile.h
#
# Untracked files:
#	.kateproject.build
#	metainfo.po
#	test.metainfo.xml
#
@mgallien
mgallien force-pushed the feature/enforce-translations branch from 12ed3d6 to 1998d33 Compare April 7, 2025 13:39
@mgallien
mgallien merged commit e5c20c1 into master Apr 7, 2025
@mgallien
mgallien deleted the feature/enforce-translations branch April 7, 2025 13:39
@github-actions

github-actions Bot commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-8096.zip

SHA256 checksum: 5e2a3550ee0b9dc5746d194177c08c998b52299d03c9899080898d890a490cbb

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

sonarqubecloud Bot commented Apr 7, 2025

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants