GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Include localized diagnostics by mhegazy · Pull Request #18702 · microsoft/TypeScript Conversation
Contributor
Include localized error messages with the ts package. Localized error messages will be under for background, the Messages are localized by the MS localization team. The communication with the loc team is all done in a specific XML formats, the The change adds:
Fixes #13703
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
…alize as part of local
Mohamed Hegazy (mhegazy)
requested review from
Paul van Brenk (paulvanbrenk) and
Wesley Wigham (weswigham)
Member
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. Should probably also add
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
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. These should be
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
| // Local target to build the compiler and services | ||
| desc("Builds the full compiler and services"); | ||
| task("local", ["build-fold-start", "generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile, serverFile, buildProtocolDts, builtGeneratedDiagnosticMessagesJSON, "lssl", "build-fold-end"]); | ||
| task("local", ["build-fold-start", "generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile, serverFile, buildProtocolDts, builtGeneratedDiagnosticMessagesJSON, "lssl", "build-fold-end", "localize"]); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
"localize" should come before "build-fold-end", probably.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As discussed we should consider building the NPM packages on the build server vs. this another machine. This way we can include signing in the future.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| } | ||
|
|
||
| function xmlObjectToString(o: any) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Add a comment here what we expect the incoming XML to look like
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| // generate other langs | ||
| fs.readdir(inputPath, (err, files) => { | ||
| handelError(err); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
handle :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| }); | ||
| } | ||
|
|
||
| function objectToList(o: Record<string, string>) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If we're assuming an ES2015 runtime, you can use Object.entries instead, but this is probably fine.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We already use const in some of our build scripts, I believe, and haven't received any complaints. We only build on back to Node 4, so it seems reasonable.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Object.entries is ES2017. not sure if was on node v4 or not..
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
According to http://node.green/, node 7.5 was the first with Object.entries... so probably not yet. However map.entries has been available since node 4. 🐱
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What would the error output look like? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
c:\ts>tsc --v Version 2.6.0-dev.20171003 c:\ts>tsc --locale rus --pretty c:\test\a.ts ../test/a.ts(1,5): error TS2322: Тип ""string"" не может быть назначен для типа "number". 1 var x: number = "string"; ~ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
And help in JPN would look like: PS C:\ts> tsc --v Version 2.6.0-dev.20171003 PS C:\ts> tsc --locale jpn バージョン 2.6.0-dev.20171003 構文: tsc [オプション] [ファイル ...] 例: tsc hello.ts tsc --outFile file.js file.ts tsc @args.txt オプション: -h, --help このメッセージを表示します。 --all コンパイラ オプションをすべて表示します。 -v, --version コンパイラのバージョンを表示します。 --init TypeScript プロジェクトを初期化して、tsconfig.json ファイルを作成します。 -p ファイルまたはディレクトリ, --project ファイルまたはディレクトリ 構成ファイルか、'tsconfig.json' を含むフォルダーにパスが指定されたプロジェクトをコ ンパイルします。 --pretty 色とコンテキストを使用してエラーとメッセージにスタイルを適用します (試験的)。 -w, --watch 入力ファイルを監視します。 -t バージョン, --target バージョン ECMAScript のターゲット バージョンを指定します: 'ES3' (既定)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES NEXT'。 -m 種類, --module 種類 モジュール コード生成を指定します: 'none'、'commonjs'、'amd'、'system'、'umd'、'es2015'、'ESNext'。 --lib コンパイルに含めるライブラリ ファイルを指定します: 'es5' 'es6' 'es2015' 'es7' 'es2016' 'es2017' 'esnext' 'dom' 'dom.iterable' 'webworker' 'scripthost' 'es201 5.core' 'es2015.collection' 'es2015.generator' 'es2015.iterable' 'es2015.promise' 'es2015.proxy' 'es2015.reflect' 'es2015.symbol' 'es2015.symbol.wellkno wn' 'es2016.array.include' 'es2017.object' 'es2017.sharedmemory' 'es2017.string' 'es2017.intl' 'esnext.asynciterable' --allowJs javascript ファイルのコンパイルを許可します。 --jsx 種類 JSX コード生成を指定します: 'preserve'、'react-native'、'react'。 -d, --declaration 対応する '.d.ts' ファイルを生成します。 --sourceMap 対応する '.map' ファイルを生成します。 --outFile ファイル 出力を連結して 1 つのファイルを生成します。 --outDir ディレクトリ ディレクトリへ出力構造をリダイレクトします。 --removeComments コメントを出力しないでください。 --noEmit 出力しないでください。 --strict strict 型チェックのオプションをすべて有効にします。 --noImplicitAny 暗黙的な 'any' 型を含む式と宣言に関するエラーを発生させます。 --strictNullChecks 厳格な null チェックを有効にします。 --strictFunctionTypes Enable strict checking of function types. --noImplicitThis 暗黙的な 'any' 型を持つ 'this' 式でエラーが発生します。 --alwaysStrict 厳格モードで解析してソース ファイルごとに "use strict" を生成します。 --noUnusedLocals 使用されていないローカルに関するエラーを報告します。 --noUnusedParameters 使用されていないパラメーターに関するエラーを報告します。 --noImplicitReturns 関数の一部のコード パスが値を返さない場合にエラーを報告します。 --noFallthroughCasesInSwitch switch ステートメントに case のフォールスルーがある場合にエラーを報告します。 --types コンパイルに含む型宣言ファイル。 @<ファイル> |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.