-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(compiler-cli): add i18n parameters to tsconfig #16365
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,27 @@ interface Options extends ts.CompilerOptions { | |
|
||
// Whether to enable support for <template> and the template attribute (true by default) | ||
enableLegacyTemplate?: boolean; | ||
|
||
// format for extracted messages file (xlf, xlf2, xmb) | ||
i18nFormat?: string; | ||
|
||
// locale of your application for extracted messages file | ||
locale?: string; | ||
|
||
// path & name for the extracted messages file | ||
outFile?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is probably confusing.
I think either these options need to have i18n in the name, or be nested:
WDYT? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We used the names of the current cli options (when possible). We can nest them though, what do you think @vicb ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's not possible to nest the options: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't |
||
|
||
// format for imported translation files (xlf, xlf2, xtb) | ||
i18nTranslationFormat?: string; | ||
|
||
// locale for imported translation files | ||
translationLocale?: string; | ||
|
||
// path & name of your translations file | ||
i18nFile?: string; | ||
|
||
// strategy to use for missing translations (error, warning or ignore) | ||
missingTranslation?: string; | ||
} | ||
|
||
export default Options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting multiple locales to appear here. Users shouldn't have N tsconfig files (and note that the tsconfig "extends" behavior doesn't cover unknown config properties like "angularCompilerOptions")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the locale used for extracted messages, which is the main locale of your application. There is only one here since you only do one extraction.
You are referring to
translationLocale?: string;
which is the locale used when you compile the application. I had a comment there that @vicb told me remove which was something like "only use this if you have one tsconfig file / locale".I agree that it would be better if we could compile all locales in one command, but that is not possible yet. There's a bit refactor coming for the compiler and it will probably change at that point, but for now we can only compile for one locale.