diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 96dec13838f..09b3cbe2998 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',