Skip to content

Commit 6b932c3

Browse files
moodyjmzclaude
andcommitted
fix(overview): remove mimeBasenames to avoid introducing new l10n strings
Use creator.label directly as the default filename in the create dialog instead of a MIME-keyed map of singular category names. This avoids adding new translation strings and works correctly in all locales. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
1 parent 9d9ceba commit 6b932c3

1 file changed

Lines changed: 1 addition & 27 deletions

File tree

src/views/OfficeOverview.vue

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -259,25 +259,6 @@ export default {
259259
}
260260
},
261261
262-
mimeBasenames() {
263-
return {
264-
'application/vnd.oasis.opendocument.text': t('richdocuments', 'Document'),
265-
'application/vnd.oasis.opendocument.text-template': t('richdocuments', 'Document'),
266-
'application/msword': t('richdocuments', 'Document'),
267-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': t('richdocuments', 'Document'),
268-
'application/vnd.oasis.opendocument.spreadsheet': t('richdocuments', 'Spreadsheet'),
269-
'application/vnd.oasis.opendocument.spreadsheet-template': t('richdocuments', 'Spreadsheet'),
270-
'application/vnd.ms-excel': t('richdocuments', 'Spreadsheet'),
271-
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': t('richdocuments', 'Spreadsheet'),
272-
'application/vnd.oasis.opendocument.presentation': t('richdocuments', 'Presentation'),
273-
'application/vnd.oasis.opendocument.presentation-template': t('richdocuments', 'Presentation'),
274-
'application/vnd.ms-powerpoint': t('richdocuments', 'Presentation'),
275-
'application/vnd.openxmlformats-officedocument.presentationml.presentation': t('richdocuments', 'Presentation'),
276-
'application/vnd.oasis.opendocument.graphics': t('richdocuments', 'Diagram'),
277-
'application/vnd.oasis.opendocument.graphics-template': t('richdocuments', 'Diagram'),
278-
}
279-
},
280-
281262
filteredFiles() {
282263
if (!this.activeCreator) {
283264
return []
@@ -375,14 +356,7 @@ export default {
375356
onTemplateSelect(creator, template) {
376357
this.pendingCreator = creator
377358
this.pendingTemplate = template
378-
let basename = creator.label
379-
for (const mime of (creator.mimetypes ?? [])) {
380-
if (this.mimeBasenames[mime]) {
381-
basename = this.mimeBasenames[mime]
382-
break
383-
}
384-
}
385-
this.newFileName = basename + creator.extension
359+
this.newFileName = creator.label + creator.extension
386360
this.createError = ''
387361
this.showCreateDialog = true
388362
this.$nextTick(() => {

0 commit comments

Comments
 (0)