From 50d850af0595e05828480b57e9d16720251c0c30 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Tue, 31 Dec 2024 08:22:03 +0100 Subject: [PATCH] fix: showing RichWorkspace for non-English language Signed-off-by: Luka Trovic --- src/views/RichWorkspace.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 0e77fbf8cfb..c35df0212dd 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -32,10 +32,12 @@ import { subscribe, unsubscribe } from '@nextcloud/event-bus' import { getSharingToken, isPublicShare } from '@nextcloud/sharing/public' import getEditorInstance from '../components/Editor.singleton.js' import RichTextReader from '../components/RichTextReader.vue' +import { loadState } from '@nextcloud/initial-state' const IS_PUBLIC = isPublicShare() const WORKSPACE_URL = generateOcsUrl('apps/text' + (IS_PUBLIC ? '/public' : '') + '/workspace', 2) -const SUPPORTED_STATIC_FILENAMES = ['Readme.md', 'README.md', 'readme.md'] +const descriptionFile = t('text', 'Readme') + '.' + loadState('text', 'default_file_extension') +const SUPPORTED_STATIC_FILENAMES = [descriptionFile, 'Readme.md', 'README.md', 'readme.md'] export default { name: 'RichWorkspace',