357aa4a097
As discussed in https://hackmd.io/33M5Wb-JT7-0fneA0JuHPA `SourceMessage` strings are not sufficient for matching translations. This commit updates `@angular/localize` to use `MessageId`s for translation matching instead. Also the run-time translation will now log a warning to the console if a translation is missing. BREAKING CHANGE: Translations (loaded via the `loadTranslations()` function) must now use `MessageId` for the translation key rather than the previous `SourceMessage` string. PR Close #32594
36 lines
701 B
Python
36 lines
701 B
Python
load("//tools:defaults.bzl", "ng_package", "ts_library")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
ts_library(
|
|
name = "localize",
|
|
srcs = glob(
|
|
[
|
|
"*.ts",
|
|
"src/**/*.ts",
|
|
],
|
|
),
|
|
module_name = "@angular/localize",
|
|
deps = [
|
|
"//packages/compiler",
|
|
"//packages/localize/src/localize",
|
|
"@npm//@types/node",
|
|
],
|
|
)
|
|
|
|
ng_package(
|
|
name = "npm_package",
|
|
srcs = [
|
|
"package.json",
|
|
"//packages/localize/init:package.json",
|
|
],
|
|
entry_point = ":index.ts",
|
|
tags = [
|
|
"release-with-framework",
|
|
],
|
|
deps = [
|
|
":localize",
|
|
"//packages/localize/init",
|
|
],
|
|
)
|