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

Document language in new documents does not respect language settings #496

Closed
bpcurse opened this issue May 9, 2019 · 16 comments
Closed
Labels
1. to develop Waiting for a developer bug Something isn't working

Comments

@bpcurse
Copy link

bpcurse commented May 9, 2019

Describe the bug
When a new document is created, the document language is always set to English (USA), although language and locale are set to German (informal) and Germany.

  • The document language can be set to German in the menu and is correctly preserved when the document is closed and reopened.

  • Choosing the "Reset to default language" option in the menu seems to have no effect, neither when English is the current document language, nor when German is. The command seems to be ignored.

Expected behavior
Collabora should respect the language settings when new documents are created.

Screenshots
Bildschirmfoto_2019-05-09_22-07-39
Bildschirmfoto_2019-05-09_22-08-25

Client details:

  • OS: Linux
  • Browser Firefox
  • Version 66.0.4
  • Device: Desktop

Server details

Operating system:
Shared Webhosting

Web server:
Apache

Database:
MySQL 5.7.25

PHP version:
7.2.13

Nextcloud version:
15.0.5

Version of the richdocuments app
3.3.2

Version of Collabora Online
CODE 4.0.1-1

@filipkemuel
Copy link

filipkemuel commented May 14, 2019

I'm having the same exact issue. Except all new documents are in German instead of Danish. I can change the language to Danish after making it. But new documents are always in German. And with spreadsheets also the table names start out in German so that I have to manually change them.

I found an old thread talking about replacing template documents in core/templates/filetemplates but that no longer seems to make a difference.

Client details

OS: Arch Linux
Browser: Firefox 66.0.5

Server details

Operating system:
Ubuntu 18.04.2

Web server:
Nginx

Database:
MariaDB 10.1.38

PHP version:
7.2.17

Nextcloud:
Version 16.0.0

richdocuments app:
Version 3.3.2

Collabora Online:
Running via docker and has -e "dictionaries=da en de" to enable Danish dictionaries.

LOOLWSD: 4.0.4 (git hash: 305832f)
LOKit: Collabora Office 6.0-29 (git hash: 5a695a1)

@thebearon thebearon added the bug Something isn't working label May 15, 2019
@thebearon
Copy link
Collaborator

This is because of the locale of the templates shipped with the installation. You can specify your own templates in the settings as a workaround.

Eventually this should be fixed in a way that at least empty files can be generated based on user language/locale. It will likely require modifications both in Collabora Online and in richdocuments.

@bpcurse bpcurse changed the title Document language in new documents is always set to "English (USA)" Document language in new documents does not respect language settings May 15, 2019
@kromsam
Copy link

kromsam commented May 30, 2019

This is because of the locale of the templates shipped with the installation. You can specify your own templates in the settings as a workaround.

Eventually this should be fixed in a way that at least empty files can be generated based on user language/locale. It will likely require modifications both in Collabora Online and in richdocuments.

@thebearon I did not see the option to change the templates in the settings. Is it shipped in an update?

I also opened a topic in the Nextcloud Community Support forum. https://help.nextcloud.com/t/how-do-i-change-the-default-language-in-collabora/53667

@zeigerpuppy
Copy link

this still seems to be an issue.
Is there a way to manually set the templates? Or does the Collabora docker container need to be started with a different environmental option?

The per-server and per-user templates option would be the best way to solve this.

@juliusknorr
Copy link
Member

It is currently not possible to change the empty templates, but I guess that would be the best option to avoid issues with the shipped ones.

@thebearon The shipped templates don't have any language/locale set, how is the language determined then in collabora?

@juliusknorr juliusknorr added the info needed Further information is requested label Aug 29, 2019
@MollyBe
Copy link

MollyBe commented Nov 19, 2019

@zeigerpuppy It is somewhat possible to change the default templates, see here.

Onlyoffice has language default to the personal language of each user.

@infidelus
Copy link

infidelus commented Jan 17, 2020

Doesn't seem to work. I created template files of each type and copied them into the empty_templates folder in ncdata but every file opened still defaults to German.

@manu-p
Copy link

manu-p commented Mar 23, 2020

Same on my side... So no way to force a default language in the templates provided other than those already setup?

Alternatively, since it's possible to upload your owns, is there a way to remove the "empty" ones as provided during installation (I guess)?

@juliusknorr
Copy link
Member

@thebearon I was thinking if we could somehow change the language that is used in the empty template files on the fly? Do you have any hint where the language is set in those templates?

@timar
Copy link
Member

timar commented Mar 30, 2020

@thebearon I was thinking if we could somehow change the language that is used in the empty template files on the fly? Do you have any hint where the language is set in those templates?

You can create language agnostic template files, and the language will be set to the UI language. See e.g. https://cgit.freedesktop.org/libreoffice/online/commit/?id=a66083de9b35034c79fae29b4a1c08a0fc2682de

@juliusknorr juliusknorr added 1. to develop Waiting for a developer and removed collabora info needed Further information is requested labels Mar 30, 2020
@thebearon
Copy link
Collaborator

This should be fine after fb68779.

@DanScharon
Copy link

@thebearon cannot confirm, seeing this still with richdocuments 3.7.11

@juliusknorr
Copy link
Member

Make sure to run occ richdocuments:update-empty-templates to get the latest empty templates into your system.

@infidelus
Copy link

infidelus commented Dec 7, 2020

Just tried the occ command and got:

sudo -u www-data php /var/www/nextcloud/occ richdocuments:update-empty-templates
Empty template files were updated
An unhandled exception has been thrown:
TypeError: Return value of "OCA\RichDocuments\Command\UpdateEmptyTemplates::execute()" must be of the type int, "null" returned. in /var/www/nextcloud/apps/mail/vendor/symfony/console/Command/Command.php:261
Stack trace:
#0 /var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(920): Symfony\Component\Console\Command\Command->run()
#1 /var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(266): Symfony\Component\Console\Application->doRunCommand()
#2 /var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(142): Symfony\Component\Console\Application->doRun()
#3 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#4 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#5 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

@juliusknorr
Copy link
Member

That is actually a mail issue: nextcloud/mail#4102

@DanScharon
Copy link

Make sure to run occ richdocuments:update-empty-templates to get the latest empty templates into your system.

thank you, that did the trick!

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

No branches or pull requests