ng extract-i18n
從原始碼中提取 i18n 訊息。
Extracts i18n messages from source code.
ng extract-i18n <project> [options]
ng i18n-extract <project> [options]
ng xi18n <project> [options]
引數
引數 | 說明 |
---|---|
<project> | 要建構的專案名。可以是應用或函式庫。 The name of the project to build. Can be an application or a library. |
選項
選項 | 說明 |
---|---|
--browser-target=browser-target | 一個瀏覽器建構器目標,用來以 A browser builder target to extract i18n messages in the format of |
--configuration=configuration | 建構器的一個或多個命名配置,是一個逗號分隔的列表,就像在 angular.json 的 "configurations" 部分指定的一樣。 建構器使用這些命名配置執行給定的目標。 欲知詳情,參見 https://angular.cn/guide/workspace-config#alternate-build-configurations。 可以透過顯式指定 "--prod" 標誌來覆蓋它。 One or more named builder configurations as a comma-separated list as specified in the "configurations" section of angular.json. The builder uses the named configurations to run the given target. For more information, see https://angular.io/guide/workspace-config#alternate-build-configurations. Setting this explicitly overrides the "--prod" flag. 別名: -c |
--format= | 要產生檔案的輸出格式。 Output format for the generated file. 預設值: |
--help= | 在控制檯顯示關於本命令的幫助資訊。 Shows a help message for this command in the console. 預設值: |
--i18n-format= | 已棄用: 改用 'format' 選項代替。 Use 'format' option instead. 要產生檔案的輸出格式。 Output format for the generated file. 預設值: |
--i18n-locale=i18n-locale | 已棄用: 使用 'i18n' 專案級的子配置 'sourceLocale' 代替。 Use 'i18n' project level sub-option 'sourceLocale' instead. 指定應用程式的源語言。 Specifies the source language of the application. |
--ivy=true|false | 使用 Ivy 編譯器提取翻譯。在 Ivy 應用中預設啟用。 Use Ivy compiler to extract translations. The default for Ivy applications. |
--out-file=out-file | 要輸出的檔名。 Name of the file to output. |
--output-path=output-path | 要放置輸出結果的路徑。 Path where output will be placed. |
--prod=true|false | "--configuration=production" 的簡寫形式。 把建構配置的目標設定為產品環境。 預設情況下,產品環境目標是在工作空間配置中設定的,可以設定打包方式、搖樹優化限制、死程式碼移除限制等方面。 Shorthand for "--configuration=production". Set the build configuration to the production target. By default, the production target is set up in the workspace configuration such that all builds make use of bundling, limited tree-shaking, and also limited dead code elimination. |
--progress=true|false | 將進度記錄到控制檯。 Log progress to the console. 預設值: |