From e325bc322e252d103dd32385a12410ee3d69ccec 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 db9c216f1a2..4d69afdb844 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -48,10 +48,12 @@ import { generateOcsUrl } from '@nextcloud/router' import { subscribe, unsubscribe } from '@nextcloud/event-bus' import getEditorInstance from '../components/Editor.singleton.js' import RichTextReader from '../components/RichTextReader.vue' +import { loadState } from '@nextcloud/initial-state' const IS_PUBLIC = !!(document.getElementById('isPublic')) 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',