1
0
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:
Alexander Skvortsov
2021-04-30 12:44:39 -04:00
committed by GitHub
parent edaf45d133
commit b45519974a
24 changed files with 19152 additions and 3351 deletions

View File

@@ -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;
}