mirror of
https://github.com/flarum/core.git
synced 2025-10-12 23:44:27 +02:00
Switch to ICU MessageFormat (#2759)
This commit is contained in:
committed by
GitHub
parent
edaf45d133
commit
b45519974a
@@ -17,6 +17,7 @@ use Illuminate\Contracts\Container\Container;
|
||||
use InvalidArgumentException;
|
||||
use RuntimeException;
|
||||
use SplFileInfo;
|
||||
use Symfony\Component\Translation\MessageCatalogueInterface;
|
||||
|
||||
class LanguagePack implements ExtenderInterface, LifecycleInterface
|
||||
{
|
||||
@@ -107,6 +108,9 @@ class LanguagePack implements ExtenderInterface, LifecycleInterface
|
||||
// extension) with the list of known names and all extension IDs.
|
||||
$slug = $file->getBasename(".{$file->getExtension()}");
|
||||
|
||||
// Ignore ICU MessageFormat suffixes.
|
||||
$slug = str_replace(MessageCatalogueInterface::INTL_DOMAIN_SUFFIX, '', $slug);
|
||||
|
||||
if (in_array($slug, self::CORE_LOCALE_FILES, true)) {
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user