Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

extract-i18n does not extract message from files loaded only server side

未关闭
#22,871 7 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
angular, typescript

调研方向

在链接的复现应用中运行 extract-i18n,并将其输出与 server-service.service.ts 中的消息进行比较。跟踪该命令如何发现不直接依赖于 app.module 或浏览器端代码的文件。当服务器端服务中的消息包含在提取输出中时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

area: @angular-devkit/build-angular devkit/build-angular:i18n feature feature: insufficient votes

🐞 Bug report

Command (mark with an x)
  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • [x ] extract-i18n
  • run
  • config
  • help
  • version
  • doc
Is this a regression?
Yes, the previous version in which this bug was not present was: ....
Description

The extraction tool does not process files that do not have a direct dependency on the app.module, or, generally, on the browser side.
In my case an abstract service is replaced by two versions of the service, one browser side, the other server side. The server-side one is ignored during the extraction process.

🔬 Minimal Reproduction

I made a simple repro app that reproduce the problem.
Just run extract-i18n to see that message in server-service.service.ts is ignored.

🔥 Exception or Error





🌍 Your Environment




Angular: 12.0.1
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1200.5
@angular-devkit/build-angular     12.0.5
@angular-devkit/build-optimizer   0.1200.5
@angular-devkit/core              12.0.1
@angular-devkit/schematics        12.0.1
@angular/flex-layout              12.0.0-beta.34
@angular/localize                 12.0.5
@nguniversal/builders             12.1.3
@nguniversal/common               12.0.0
@nguniversal/express-engine       12.0.0
@schematics/angular               12.0.1
rxjs                              7.4.0
typescript                        4.2.4

Anything else relevant?

主要语言
TypeScript
星标
27k
派生
11.8k
平均合并
17 小时 25 分钟
30 天内合并 PR
183

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/angular-cli 的其他 Issue

查看 angular/angular-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。