Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit883cc9a

Browse files
committed
[Translation] Parse PHP constants in YAML translation files
1 parenta603ba0 commit883cc9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/Symfony/Component/Translation/Loader/YamlFileLoader.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
useSymfony\Component\Translation\Exception\LogicException;
1616
useSymfony\Component\Yaml\ParserasYamlParser;
1717
useSymfony\Component\Yaml\Exception\ParseException;
18+
useSymfony\Component\Yaml\Yaml;
1819

1920
/**
2021
* YamlFileLoader loads translations from Yaml files.
@@ -39,7 +40,7 @@ protected function loadResource($resource)
3940
}
4041

4142
try {
42-
$messages =$this->yamlParser->parseFile($resource);
43+
$messages =$this->yamlParser->parseFile($resource, Yaml::PARSE_CONSTANT);
4344
}catch (ParseException$e) {
4445
thrownewInvalidResourceException(sprintf('Error parsing YAML, invalid file "%s"',$resource),0,$e);
4546
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp