Issue #3419394 by quietone, longwave, smustgrave: File mime type and other file related words in the dictionary
(cherry picked from commit f8a2ccac36
)
merge-requests/9720/head
parent
f4f3108294
commit
dfafcf727f
|
@ -17,6 +17,7 @@ class ExtensionMimeTypeGuesser implements MimeTypeGuesserInterface {
|
||||||
* Array of mimetypes correlated to the extensions that relate to them.
|
* Array of mimetypes correlated to the extensions that relate to them.
|
||||||
*/
|
*/
|
||||||
protected $defaultMapping = [
|
protected $defaultMapping = [
|
||||||
|
// cspell:disable
|
||||||
'mimetypes' => [
|
'mimetypes' => [
|
||||||
0 => 'application/andrew-inset',
|
0 => 'application/andrew-inset',
|
||||||
1 => 'application/atom',
|
1 => 'application/atom',
|
||||||
|
@ -867,6 +868,7 @@ class ExtensionMimeTypeGuesser implements MimeTypeGuesserInterface {
|
||||||
'json' => 361,
|
'json' => 361,
|
||||||
'avif' => 362,
|
'avif' => 362,
|
||||||
],
|
],
|
||||||
|
// cspell:enable
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,6 +6,8 @@ use Drupal\Component\Utility\Html;
|
||||||
use Drupal\Component\Utility\Xss;
|
use Drupal\Component\Utility\Xss;
|
||||||
use Drupal\Core\Site\Settings;
|
use Drupal\Core\Site\Settings;
|
||||||
|
|
||||||
|
// cspell:ignore officedocument openxmlformats wordprocessingml
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a class containing utility methods for formatting mail messages.
|
* Defines a class containing utility methods for formatting mail messages.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,7 +11,6 @@ allwords
|
||||||
alphadecimal
|
alphadecimal
|
||||||
ampm
|
ampm
|
||||||
anyall
|
anyall
|
||||||
applix
|
|
||||||
archiver
|
archiver
|
||||||
archivers
|
archivers
|
||||||
arrowrefresh
|
arrowrefresh
|
||||||
|
@ -152,7 +151,6 @@ contextuals
|
||||||
controlgroup
|
controlgroup
|
||||||
conv
|
conv
|
||||||
corge
|
corge
|
||||||
cpio
|
|
||||||
createrole
|
createrole
|
||||||
createuser
|
createuser
|
||||||
crema
|
crema
|
||||||
|
@ -293,7 +291,6 @@ funic
|
||||||
gabilondo
|
gabilondo
|
||||||
gids
|
gids
|
||||||
gloop
|
gloop
|
||||||
gnumeric
|
|
||||||
googleapis
|
googleapis
|
||||||
greeking
|
greeking
|
||||||
gripsmall
|
gripsmall
|
||||||
|
@ -350,9 +347,6 @@ keypresses
|
||||||
keyvalue
|
keyvalue
|
||||||
kinberg
|
kinberg
|
||||||
kolkata
|
kolkata
|
||||||
kpresenter
|
|
||||||
kspread
|
|
||||||
kword
|
|
||||||
lamoids
|
lamoids
|
||||||
languageswitcher
|
languageswitcher
|
||||||
libc
|
libc
|
||||||
|
@ -384,13 +378,10 @@ lrdd
|
||||||
lstitle
|
lstitle
|
||||||
ltitle
|
ltitle
|
||||||
lzma
|
lzma
|
||||||
lzop
|
|
||||||
macbinary
|
|
||||||
mainpage
|
mainpage
|
||||||
mank
|
mank
|
||||||
maryjane
|
maryjane
|
||||||
matchout
|
matchout
|
||||||
mathematica
|
|
||||||
maximumred
|
maximumred
|
||||||
maxlifetime
|
maxlifetime
|
||||||
maynot
|
maynot
|
||||||
|
@ -424,7 +415,6 @@ montag
|
||||||
msgctxt
|
msgctxt
|
||||||
msgid
|
msgid
|
||||||
msgstr
|
msgstr
|
||||||
msword
|
|
||||||
mucho
|
mucho
|
||||||
mulrev
|
mulrev
|
||||||
mulrevpub
|
mulrevpub
|
||||||
|
@ -480,14 +470,11 @@ nyan
|
||||||
nyancat
|
nyancat
|
||||||
nyans
|
nyans
|
||||||
oembed
|
oembed
|
||||||
officedocument
|
|
||||||
omittable
|
omittable
|
||||||
onecol
|
onecol
|
||||||
oneplusfourgrid
|
oneplusfourgrid
|
||||||
onetwo
|
onetwo
|
||||||
onewidgetfield
|
onewidgetfield
|
||||||
opendocument
|
|
||||||
openxmlformats
|
|
||||||
optgroups
|
optgroups
|
||||||
optin
|
optin
|
||||||
orgchart
|
orgchart
|
||||||
|
@ -553,7 +540,6 @@ preprocessors
|
||||||
prerender
|
prerender
|
||||||
prerendered
|
prerendered
|
||||||
presave
|
presave
|
||||||
presentationml
|
|
||||||
pretransaction
|
pretransaction
|
||||||
preuninstall
|
preuninstall
|
||||||
processlist
|
processlist
|
||||||
|
@ -657,13 +643,11 @@ specialchars
|
||||||
spiffiness
|
spiffiness
|
||||||
splitbutton
|
splitbutton
|
||||||
splitbuttons
|
splitbuttons
|
||||||
spreadsheetml
|
|
||||||
squaresmall
|
squaresmall
|
||||||
squiz
|
squiz
|
||||||
squizlabs
|
squizlabs
|
||||||
srcset
|
srcset
|
||||||
ssess
|
ssess
|
||||||
stardivision
|
|
||||||
starterkit
|
starterkit
|
||||||
statuscode
|
statuscode
|
||||||
stdclass
|
stdclass
|
||||||
|
@ -676,7 +660,6 @@ strikethrough
|
||||||
striptags
|
striptags
|
||||||
strs
|
strs
|
||||||
sttid
|
sttid
|
||||||
stuffit
|
|
||||||
styleguide
|
styleguide
|
||||||
stylelint
|
stylelint
|
||||||
stylescombo
|
stylescombo
|
||||||
|
@ -731,7 +714,6 @@ tablesorts
|
||||||
tabset
|
tabset
|
||||||
tabwidth
|
tabwidth
|
||||||
tappable
|
tappable
|
||||||
tarz
|
|
||||||
taskless
|
taskless
|
||||||
tcomment
|
tcomment
|
||||||
templating
|
templating
|
||||||
|
@ -846,8 +828,6 @@ webmozart
|
||||||
webroot
|
webroot
|
||||||
webservers
|
webservers
|
||||||
widthx
|
widthx
|
||||||
wmlscript
|
|
||||||
wordprocessingml
|
|
||||||
wordsafe
|
wordsafe
|
||||||
writeln
|
writeln
|
||||||
wwwrun
|
wwwrun
|
||||||
|
|
|
@ -4,8 +4,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Drupal\file;
|
namespace Drupal\file;
|
||||||
|
|
||||||
// cspell:ignore abiword
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A utility class for working with MIME types.
|
* A utility class for working with MIME types.
|
||||||
*/
|
*/
|
||||||
|
@ -48,6 +46,7 @@ final class IconMimeTypes {
|
||||||
* The generic icon MIME package expected for this file.
|
* The generic icon MIME package expected for this file.
|
||||||
*/
|
*/
|
||||||
public static function getGenericMimeType(string $mimeType): string | false {
|
public static function getGenericMimeType(string $mimeType): string | false {
|
||||||
|
// cspell:disable
|
||||||
switch ($mimeType) {
|
switch ($mimeType) {
|
||||||
// Word document types.
|
// Word document types.
|
||||||
case 'application/msword':
|
case 'application/msword':
|
||||||
|
@ -171,6 +170,7 @@ final class IconMimeTypes {
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
// cspell:enable
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ namespace Drupal\Tests\file\Kernel;
|
||||||
|
|
||||||
use Drupal\KernelTests\KernelTestBase;
|
use Drupal\KernelTests\KernelTestBase;
|
||||||
|
|
||||||
|
// cspell:ignore msword
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests file module deprecations.
|
* Tests file module deprecations.
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,7 +18,7 @@ use Drupal\user\Entity\User;
|
||||||
use GuzzleHttp\RequestOptions;
|
use GuzzleHttp\RequestOptions;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
// cspell:ignore èxample
|
// cspell:ignore èxample msword
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests binary data file upload route.
|
* Tests binary data file upload route.
|
||||||
|
|
|
@ -18,7 +18,7 @@ use Drupal\user\Entity\User;
|
||||||
use GuzzleHttp\RequestOptions;
|
use GuzzleHttp\RequestOptions;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
// cspell:ignore èxample
|
// cspell:ignore èxample msword
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests binary data file upload route.
|
* Tests binary data file upload route.
|
||||||
|
|
|
@ -6,6 +6,8 @@ namespace Drupal\Tests\system\Functional\DrupalKernel;
|
||||||
|
|
||||||
use Drupal\Tests\BrowserTestBase;
|
use Drupal\Tests\BrowserTestBase;
|
||||||
|
|
||||||
|
// cspell:ignore msword
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests content negotiation.
|
* Tests content negotiation.
|
||||||
*
|
*
|
||||||
|
|
|
@ -7,6 +7,8 @@ namespace Drupal\Tests\Core\Mail;
|
||||||
use Drupal\Core\Mail\MailFormatHelper;
|
use Drupal\Core\Mail\MailFormatHelper;
|
||||||
use Drupal\Tests\UnitTestCase;
|
use Drupal\Tests\UnitTestCase;
|
||||||
|
|
||||||
|
// cspell:ignore officedocument openxmlformats wordprocessingml
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @coversDefaultClass \Drupal\Core\Mail\MailFormatHelper
|
* @coversDefaultClass \Drupal\Core\Mail\MailFormatHelper
|
||||||
* @group Mail
|
* @group Mail
|
||||||
|
|
Loading…
Reference in New Issue