diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2025-05-15 14:23:41 +0200 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2025-05-15 15:07:08 +0000 |
commit | 62a9ec20676d64a9d519df508cae75c12cfff9f3 (patch) | |
tree | 4cbd8a5ca5b157223b7db5fff4d37bc0fd439786 | |
parent | 20e69bc1b00bcc6cdf88de6f59b97856678202e9 (diff) | |
download | nextcloud-server-62a9ec20676d64a9d519df508cae75c12cfff9f3.tar.gz nextcloud-server-62a9ec20676d64a9d519df508cae75c12cfff9f3.zip |
fix(core): remove untranslated mime names
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
4 files changed, 25 insertions, 53 deletions
diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php index 60445b4b117..f8f19a61993 100644 --- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php +++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php @@ -73,7 +73,7 @@ class GenerateMimetypeFileBuilder { $namesOutput = ''; foreach ($names as $key => $name) { - if (str_starts_with($key, '_')) { + if (str_starts_with($key, '_') || trim($name) === '') { // Skip internal names continue; } diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js index 1e2aeaa3f00..eb937c440cc 100644 --- a/core/js/mimetypelist.js +++ b/core/js/mimetypelist.js @@ -152,12 +152,19 @@ OC.MimeTypeList={ "x-office-spreadsheet" ], themes: [], - names: {'application/epub+zip': t('core', "Electronic book document"), + names: {'application/cmd': t('core', "Windows Command Script"), +'application/epub+zip': t('core', "Electronic book document"), +'application/font-sfnt': t('core', "TrueType Font Collection"), +'application/font-woff': t('core', "Web Open Font Format"), 'application/gpx+xml': t('core', "GPX geographic data"), 'application/gzip': t('core', "Gzip archive"), 'application/illustrator': t('core', "Adobe Illustrator document"), +'application/java': t('core', "Java source code"), +'application/javascript': t('core', "JavaScript source code"), 'application/json': t('core', "JSON document"), -'application/msword': t('core', "Word document"), +'application/msaccess': t('core', "Microsoft Access database"), +'application/msonenote': t('core', "Microsoft OneNote document"), +'application/msword': t('core', "Microsoft Word document"), 'application/octet-stream': t('core', "Unknown"), 'application/pdf': t('core', "PDF document"), 'application/postscript': t('core', "PostScript document"), @@ -171,6 +178,7 @@ OC.MimeTypeList={ 'application/vnd.ms-excel.sheet.binary.macroEnabled.12': t('core', "Excel 2007 binary spreadsheet"), 'application/vnd.ms-excel.sheet.macroEnabled.12': t('core', "Excel spreadsheet"), 'application/vnd.ms-excel.template.macroEnabled.12': t('core', "Excel spreadsheet template"), +'application/vnd.ms-outlook': t('core', "Outlook Message"), 'application/vnd.ms-powerpoint': t('core', "PowerPoint presentation"), 'application/vnd.ms-powerpoint.addin.macroEnabled.12': t('core', "PowerPoint add-in"), 'application/vnd.ms-powerpoint.presentation.macroEnabled.12': t('core', "PowerPoint presentation"), @@ -202,7 +210,9 @@ OC.MimeTypeList={ 'application/x-7z-compressed': t('core', "7-zip archive"), 'application/x-blender': t('core', "Blender scene"), 'application/x-bzip2': t('core', "Bzip2 archive"), +'application/x-deb': t('core', "Debian package"), 'application/x-fictionbook+xml': t('core', "FictionBook document"), +'application/x-font': t('core', "Unknown font"), 'application/x-krita': t('core', "Krita document"), 'application/x-mobipocket-ebook': t('core', "Mobipocket e-book"), 'application/x-msi': t('core', "Windows Installer package"), @@ -218,19 +228,24 @@ OC.MimeTypeList={ 'audio/mp4': t('core', "MPEG-4 audio"), 'audio/mpeg': t('core', "MP3 audio"), 'audio/ogg': t('core', "Ogg audio"), +'audio/wav': t('core', "RIFF\/WAVe standard Audio"), 'audio/webm': t('core', "WebM audio"), 'audio/x-scpls': t('core', "MP3 ShoutCast playlist"), 'image/bmp': t('core', "Windows BMP image"), +'image/bpg': t('core', "Better Portable Graphics image"), 'image/emf': t('core', "EMF image"), 'image/gif': t('core', "GIF image"), +'image/heic': t('core', "HEIC image"), 'image/heif': t('core', "HEIF image"), 'image/jp2': t('core', "JPEG-2000 JP2 image"), 'image/jpeg': t('core', "JPEG image"), 'image/png': t('core', "PNG image"), 'image/svg+xml': t('core', "SVG image"), +'image/tga': t('core', "Truevision Targa image"), 'image/tiff': t('core', "TIFF image"), 'image/webp': t('core', "WebP image"), 'image/x-dcraw': t('core', "Digital raw image"), +'image/x-icon': t('core', "Windows Icon"), 'message/rfc822': t('core', "Email message"), 'text/calendar': t('core', "VCS\/ICS calendar"), 'text/css': t('core', "CSS stylesheet"), @@ -239,13 +254,17 @@ OC.MimeTypeList={ 'text/markdown': t('core', "Markdown document"), 'text/org': t('core', "Org-mode file"), 'text/plain': t('core', "Plain text document"), +'text/rtf': t('core', "Rich Text document"), 'text/vcard': t('core', "Electronic business card"), 'text/x-c++src': t('core', "C++ source code"), +'text/x-java-source': t('core', "Java source code"), 'text/x-ldif': t('core', "LDIF address book"), 'text/x-nfo': t('core', "NFO document"), +'text/x-php': t('core', "PHP source"), 'text/x-python': t('core', "Python script"), 'text/x-rst': t('core', "ReStructuredText document"), 'video/3gpp': t('core', "3GPP multimedia file"), +'video/MP2T': t('core', "MPEG video"), 'video/dv': t('core', "DV video"), 'video/mp2t': t('core', "MPEG-2 transport stream"), 'video/mp4': t('core', "MPEG-4 video"), @@ -256,5 +275,6 @@ OC.MimeTypeList={ 'video/x-flv': t('core', "Flash video"), 'video/x-matroska': t('core', "Matroska video"), 'video/x-ms-wmv': t('core', "Windows Media video"), +'video/x-msvideo': t('core', "AVI video"), }, }; diff --git a/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js b/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js index 5d1666e9c30..2ac7338d04b 100644 --- a/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js +++ b/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js @@ -154,24 +154,15 @@ OC.MimeTypeList={ ], themes: [], names: {'application/cmd': t('core', "Windows Command Script"), -'application/comicbook+7z': t('core', ""), -'application/comicbook+ace': t('core', ""), -'application/comicbook+rar': t('core', ""), -'application/comicbook+tar': t('core', ""), -'application/comicbook+truecrypt': t('core', ""), -'application/comicbook+zip': t('core', ""), -'application/coreldraw': t('core', ""), 'application/epub+zip': t('core', "Electronic book document"), 'application/font-sfnt': t('core', "TrueType Font Collection"), 'application/font-woff': t('core', "Web Open Font Format"), 'application/gpx+xml': t('core', "GPX geographic data"), 'application/gzip': t('core', "Gzip archive"), 'application/illustrator': t('core', "Adobe Illustrator document"), -'application/internet-shortcut': t('core', ""), 'application/java': t('core', "Java source code"), 'application/javascript': t('core', "JavaScript source code"), 'application/json': t('core', "JSON document"), -'application/km': t('core', ""), 'application/msaccess': t('core', "Microsoft Access database"), 'application/msonenote': t('core', "Microsoft OneNote document"), 'application/msword': t('core', "Microsoft Word document"), @@ -179,10 +170,7 @@ OC.MimeTypeList={ 'application/pdf': t('core', "PDF document"), 'application/postscript': t('core', "PostScript document"), 'application/rss+xml': t('core', "RSS summary"), -'application/sgf': t('core', ""), 'application/vnd.android.package-archive': t('core', "Android package"), -'application/vnd.excalidraw+json': t('core', ""), -'application/vnd.garmin.tcx+xml': t('core', ""), 'application/vnd.google-earth.kml+xml': t('core', "KML geographic data"), 'application/vnd.google-earth.kmz': t('core', "KML geographic compressed data"), 'application/vnd.lotus-wordpro': t('core', "Lotus Word Pro document"), @@ -191,19 +179,12 @@ OC.MimeTypeList={ 'application/vnd.ms-excel.sheet.binary.macroEnabled.12': t('core', "Excel 2007 binary spreadsheet"), 'application/vnd.ms-excel.sheet.macroEnabled.12': t('core', "Excel spreadsheet"), 'application/vnd.ms-excel.template.macroEnabled.12': t('core', "Excel spreadsheet template"), -'application/vnd.ms-fontobject': t('core', ""), 'application/vnd.ms-outlook': t('core', "Outlook Message"), 'application/vnd.ms-powerpoint': t('core', "PowerPoint presentation"), 'application/vnd.ms-powerpoint.addin.macroEnabled.12': t('core', "PowerPoint add-in"), 'application/vnd.ms-powerpoint.presentation.macroEnabled.12': t('core', "PowerPoint presentation"), 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12': t('core', "PowerPoint presentation"), 'application/vnd.ms-powerpoint.template.macroEnabled.12': t('core', "PowerPoint presentation template"), -'application/vnd.ms-visio.drawing': t('core', ""), -'application/vnd.ms-visio.drawing.macroEnabled.12': t('core', ""), -'application/vnd.ms-visio.stencil': t('core', ""), -'application/vnd.ms-visio.stencil.macroEnabled.12': t('core', ""), -'application/vnd.ms-visio.template': t('core', ""), -'application/vnd.ms-visio.template.macroEnabled.12': t('core', ""), 'application/vnd.ms-word.document.macroEnabled.12': t('core', "Word document"), 'application/vnd.oasis.opendocument.formula': t('core', "ODF formula"), 'application/vnd.oasis.opendocument.graphics': t('core', "ODG drawing"), @@ -224,50 +205,29 @@ OC.MimeTypeList={ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': t('core', "Excel 2007 spreadsheet"), 'application/vnd.openxmlformats-officedocument.spreadsheetml.template': t('core', "Excel 2007 spreadsheet template"), 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': t('core', "Word 2007 document"), -'application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf': t('core', ""), -'application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform': t('core', ""), 'application/vnd.openxmlformats-officedocument.wordprocessingml.template': t('core', "Word 2007 document template"), -'application/vnd.recordare.musicxml': t('core', ""), -'application/vnd.recordare.musicxml+xml': t('core', ""), 'application/vnd.visio': t('core', "Microsoft Visio document"), 'application/vnd.wordperfect': t('core', "WordPerfect document"), -'application/vnd.xmind.workbook': t('core', ""), 'application/x-7z-compressed': t('core', "7-zip archive"), -'application/x-bin': t('core', ""), 'application/x-blender': t('core', "Blender scene"), 'application/x-bzip2': t('core', "Bzip2 archive"), -'application/x-cbr': t('core', ""), 'application/x-deb': t('core', "Debian package"), 'application/x-fictionbook+xml': t('core', "FictionBook document"), 'application/x-font': t('core', "Unknown font"), -'application/x-freemind': t('core', ""), -'application/x-gimp': t('core', ""), -'application/x-iwork-keynote-sffkey': t('core', ""), -'application/x-iwork-numbers-sffnumbers': t('core', ""), -'application/x-iwork-pages-sffpages': t('core', ""), -'application/x-kdbx': t('core', ""), 'application/x-krita': t('core', "Krita document"), 'application/x-mobipocket-ebook': t('core', "Mobipocket e-book"), -'application/x-ms-dos-executable': t('core', ""), -'application/x-msdos-program': t('core', ""), 'application/x-msi': t('core', "Windows Installer package"), 'application/x-perl': t('core', "Perl script"), -'application/x-photoshop': t('core', ""), 'application/x-php': t('core', "PHP script"), -'application/x-rar-compressed': t('core', ""), -'application/x-shockwave-flash': t('core', ""), 'application/x-tar': t('core', "Tar archive"), -'application/x-tex': t('core', ""), 'application/xml': t('core', "XML document"), 'application/yaml': t('core', "YAML document"), 'application/zip': t('core', "Zip archive"), 'application/zstd': t('core', "Zstandard archive"), 'audio/aac': t('core', "AAC audio"), 'audio/flac': t('core', "FLAC audio"), -'audio/m4b': t('core', ""), 'audio/mp4': t('core', "MPEG-4 audio"), 'audio/mpeg': t('core', "MP3 audio"), -'audio/mpegurl': t('core', ""), 'audio/ogg': t('core', "Ogg audio"), 'audio/wav': t('core', "RIFF\/WAVe standard Audio"), 'audio/webm': t('core', "WebM audio"), @@ -281,7 +241,6 @@ OC.MimeTypeList={ 'image/jp2': t('core', "JPEG-2000 JP2 image"), 'image/jpeg': t('core', "JPEG image"), 'image/png': t('core', "PNG image"), -'image/sgi': t('core', ""), 'image/svg+xml': t('core', "SVG image"), 'image/tga': t('core', "Truevision Targa image"), 'image/tiff': t('core', "TIFF image"), @@ -289,32 +248,25 @@ OC.MimeTypeList={ 'image/x-dcraw': t('core', "Digital raw image"), 'image/x-icon': t('core', "Windows Icon"), 'message/rfc822': t('core', "Email message"), -'text/asciidoc': t('core', ""), 'text/calendar': t('core', "VCS\/ICS calendar"), 'text/css': t('core', "CSS stylesheet"), 'text/csv': t('core', "CSV document"), 'text/html': t('core', "HTML document"), -'text/impress': t('core', ""), 'text/markdown': t('core', "Markdown document"), 'text/org': t('core', "Org-mode file"), 'text/plain': t('core', "Plain text document"), -'text/reveal': t('core', ""), 'text/rtf': t('core', "Rich Text document"), 'text/vcard': t('core', "Electronic business card"), -'text/x-c': t('core', ""), 'text/x-c++src': t('core', "C++ source code"), -'text/x-h': t('core', ""), 'text/x-java-source': t('core', "Java source code"), 'text/x-ldif': t('core', "LDIF address book"), 'text/x-nfo': t('core', "NFO document"), 'text/x-php': t('core', "PHP source"), 'text/x-python': t('core', "Python script"), 'text/x-rst': t('core', "ReStructuredText document"), -'text/x-shellscript': t('core', ""), 'video/3gpp': t('core', "3GPP multimedia file"), 'video/MP2T': t('core', "MPEG video"), 'video/dv': t('core', "DV video"), -'video/dvd': t('core', ""), 'video/mp2t': t('core', "MPEG-2 transport stream"), 'video/mp4': t('core', "MPEG-4 video"), 'video/mpeg': t('core', "MPEG video"), diff --git a/tests/data/integritycheck/mimetypeListModified/core/signature.json b/tests/data/integritycheck/mimetypeListModified/core/signature.json index d2f0df3aaf1..04f4c1b923c 100644 --- a/tests/data/integritycheck/mimetypeListModified/core/signature.json +++ b/tests/data/integritycheck/mimetypeListModified/core/signature.json @@ -1,7 +1,7 @@ { "hashes": { - "core\/js\/mimetypelist.js": "444869eb217a65e43af6fb5c0c83b31ffd83fb9e650998a5fc6ed383427ea591ae7066d6011df1805dffde12db3f543cc1c89afe7dfc0821a78d3e83005a7c66" + "core\/js\/mimetypelist.js": "1bb7ea82996776ad23da2841beefe7b80b3d25d410c6aaf53f73d094705ad95694520427888c16922286645208d7619de3c71c9c8e22c13dabc7c8bf26c92b57" }, - "signature": "q7Okc2qgYIE8AM8S9ppg6\/VXO5bWwH7yQd2eeHMtBQ2EmaTa5eO3v8DDt7h41nwqHRU0f1keNn3dUEf+K6ldxF4Pt7yjY+AL81YAh\/7TNAP0X0z9\/f+CifMkihI9LAHhNK5+me52j9RFD+sMMh1+qJv8T12+A9XkuVvsFJojHaWwdRlyFJyEGlCqvT1qqie3UixJNMF1cimnOFa7WiTVHVD\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