angular-docs-cn/packages/core
Andrew Kushnir 8c2d8428d5 fix(core): verify parsed ICU expression at runtime before executing it (#35923)
Prior to this commit, i18n runtime logic relied on the assumption that provided translation is syntactically correct, specifically around ICU syntax. However provided translations might contain some errors that lead to parsing failure. Specifically when translation contains curly braces, runtime i18n logic tries to parse them as an ICU expression and fails. This commit validates ICU parsing result (making sure it was parsed correctly) and throws an error if parsing error happens. The error that is thrown also contains translated message text for easier debugging.

Note: the check and the error message introduced in this PR is a safeguard against the problem that led to unhandled i18n runtime logic crash. So the framework behavior remains the same, we just improve the error message and it should be safe to merge to the patch branch.

Resolves #35689.

PR Close #35923
2020-03-13 07:58:53 -07:00
..
global docs(ivy): document global debugging utilities and clean up API (#34453) 2020-01-30 11:30:32 -08:00
schematics build: typescript 3.8 support (#35864) 2020-03-10 17:51:20 -04:00
src fix(core): verify parsed ICU expression at runtime before executing it (#35923) 2020-03-13 07:58:53 -07:00
test fix(core): verify parsed ICU expression at runtime before executing it (#35923) 2020-03-13 07:58:53 -07:00
testing perf(core): avoid recursive scope recalculation when TestBed.overrideModule is used (#35454) 2020-02-25 13:11:42 -08:00
BUILD.bazel build: provide full paths to `ts_api_guardian_test_npm_package` and `ts_api_guardian_test` (#36034) 2020-03-12 09:49:00 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts
package.json build(packaging): add repository.directory field to package.jsons (#27544) 2020-02-25 13:12:45 -08:00
public_api.ts