Skip to content

Commit 1ee6735

Browse files
committed
fix(intl): allow partial override of existing translations
1 parent c690f72 commit 1ee6735

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/intl/src/Catalog/CatalogInitializer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public function initialize(Container $container): Catalog
3232
Str\ends_with($path, ['.yaml', '.yml']) => Yaml::parse($contents),
3333
};
3434

35-
foreach (Arr\undot($messages) as $key => $message) {
36-
$catalog[$locale][$key] = $message;
35+
foreach (Arr\dot($messages) as $key => $message) {
36+
$catalog[$locale] = Arr\set_by_key($catalog[$locale], $key, $message);
3737
}
3838
}
3939
}

0 commit comments

Comments
 (0)