Skip to content

Commit 2baa5be

Browse files
committed
Add language support, fix exception typo
1 parent db85890 commit 2baa5be

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/Assets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function tag(string $file)
112112
break;
113113

114114
default:
115-
throw AssetsException::forUnsupportExtension($extension);
115+
throw AssetsException::forUnsupportedExtension($extension);
116116

117117
endswitch;
118118
}

src/Exceptions/AssetsException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
class AssetsException extends FrameworkException implements ExceptionInterface
77
{
8-
public static function forUnsupportExtension(string $extension = null)
8+
public static function forUnsupportedExtension(string $extension = null)
99
{
10-
return new static("Unsupported file extension: '{$extension}'");
10+
return new static(lang('Assets.unsupportedExtension', [$extension]));
1111
}
1212
}

src/Language/en/Assets.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
'unsupportedExtension' => 'Unsupported file extension: "{0}"',
5+
];

0 commit comments

Comments
 (0)