YAMLスキーマとロード順序については構成を参照してください。
必要な入力
sourceLocaleソースロケート(例:en)は、**/*.en.resxなどのリソースファイルを見つけるために使われます。また、プロバイダーにもfrom=<locale>として転送されました。
提供者選定と資格
providerでは1回のランで1人の提供者を選びましょう。選択したプロバイダーの資格情報のみを提供してください — 完全なセットアップは入力と出力ガイドをご覧ください。
provider翻訳提供者:azure(デフォルト)、aws、またはgoogle。アクションコールごとに1つのプロバイダーのみが使用されます。
subscriptionKeyAzure AI Translator subscription key.azureに必須です。secretsで通過してください。
endpointAzure Translator endpoint URL、例:https://api.cognitive.microsofttranslator.com/。azureに必須です。
awsAccessKeyIdAWS アクセスキーID。オプションで、AWSのデフォルトの認証チェーン/OIDCの使用は省略(awsSecretAccessKeyと共に)。secretsで通過してください。
awsSecretAccessKeyAWSのシークレットアクセスキー。awsAccessKeyIdと一緒に供給する必要があります。secretsで通過してください。
awsSessionToken一時認証情報用のオプションAWSセッショントークン。secretsを通って。
awsRegionTranslateサービス(例:us-east-1)はAWSリージョンです。環境に設定されていない限りaws AWS_REGION必須です。
awsFormalityAWS Translate formality setting: FORMAL or INFORMAL.
awsBrevityWhen true, enables AWS Translate brevity mode for supported language pairs.
awsTerminologyNamesAWS Translate custom terminology resource names. Accepts a JSON array or comma-separated values.
awsParallelDataNamesAWS Translate parallel data resource names. Accepts a JSON array or comma-separated values.
googleApiKeyGoogle Cloud APIキー。このOR googleCredentialsをgoogleに提供してください。secretsを通って通れ。
googleCredentialsGoogle Cloud ServiceアカウントキーをJSON文字列として使います。このOR googleApiKeyをgoogleに提供してください。secretsを通って通れ。
googleProjectId任意のGoogle CloudプロジェクトIDも用意してください。通常はサービスアカウントの認証情報から推測されます。
googleModelGoogle Cloud Translation model, e.g. nmt or base.
googleApiEndpointOptional Google Cloud Translation API endpoint override.
googleAutoRetryOptional Google Cloud Translation automatic retry toggle. Leave unset to use the Google client default.
一般的なオプション入力
region翻訳リソース領域(グローバルリソースは省略)。
toLocales翻訳する場所。JSON配列(["fr","de"])またはカンマ区切られた値を受け入れます。
includeニューライン分離球状パターン;翻訳されるのは一致するファイルのみです。
excludeニューライン分離球状パターン;マッチングファイルはスキップされます(include後に適用されます)。
configPathYAML設定ファイルへのパス(ワークスペースルートに対して)。
changeDetectionSmart change detection mode. smart translates only keys whose source value, target presence, state entry, or translation-affecting settings require it. Use disabled or false to send every eligible key on every run.
statePathPath to the compact deterministic smart change-detection state manifest. Defaults to .github/resource-translator-state.json; commit it so future runs can audit and reuse unchanged translations.
snapshotOnlyWhen true, create/update the smart change-detection manifest from existing source and target files without calling a translation provider or writing target resource files. Useful when bootstrapping statePath while a provider is unavailable.
dryRuntrue時は翻訳を実行し、サマリーを発行しますが、ファイルを書き込みません。
failOnErrortrueすると予期せぬエラーが動作に失敗します。false時はエラーが警告となります。
Azure Translator request inputs
これらはAzure AI Translator v3のクエリパラメータに直接マッピングされ、Azureプロバイダーに適用されます。textTypeとprofanityActionはAWS/Googleにもマッピングされており、同等のものが存在する場合(プロバイダーガイド参照)、残りはアズールのみです。すべては任意です。トランスレーターのデフォルトは設定されていないときに適用されます。
categoryIdAzure Custom Translator category — the industry/domain/tone knob.?category=...として転送されました。
textTypeplainかhtml。リソース値が実際のHTMLフラグメントである場合にのみhtmlを使ってください。
profanityActionNoAction、Marked、またはDeleted。翻訳における下品な言葉の発せ方を制御します。
profanityMarkerAsteriskかTag。それが意味のあるのはMarked profanityAction時だけです。
allowFallbackfalseすると、categoryIdがターゲットロケーションにデプロイしていない場合、トランスレーターはエラーを返します。一般的なシステムに戻るのではなく。
apiVersionトランスレーターREST APIバージョン。
レジリエンスとプレースホルダー保護
これらの入力は、Translatorがリクエストを制限した際のアクションの挙動や、{{name}}や{0}のようなプレースホルダートークンが翻訳中に破損しないように保護する仕組みを制御します。
maxRetries一時的なHTTP応答に対する最大リトライ試行数(408, 425, 429, 500, 502, 503, 504)。リクエストあたりのHTTP呼び出し数の総数は1 + maxRetriesです。
retryBackoffMsバックオフスリープの1回分はミリ秒単位でキャップを設定しましょう。アクションはAzureのRetry-After応答ヘッダーを正確に尊重します。それ以外の場合は、この値に上限を設けたジッター指数バックオフを使用します。
protectPlaceholderstrue(デフォルト)になると、{{name}}、${var}、{0}、{0:N2}、%s、%1$s、HTMLなどのプレースホルダーは、翻訳前にセンチネルトークンに置き換えられ、翻訳後に復元されます。翻訳すべき文字通りの仮文を含むソースのみを無効にしてください。
customPlaceholderPatternsデフォルトのプレースホルダーセットに追加された換行分離正則表現(区切り符なし)、例えばカスタムトークン構文用の<<.+?>>。
noTranslatePatternsパーサーレベルのキー(JSON点線パス、RESX name、PO msgid、XLIFF単位の単位id、INI/restextキー)と照合したニューライン分離グロブパターン。マッチングキーはトランスレーター要求から削除され、ソース値を保持したままパスされます。
出力
summary-titlePRに適した短い要約、例:Machine-translated 320 files, a total of 5,418 translations。
summary-detailsPR機関や求人概要に適したマークダウンサマリー。
has-new-translations'true'、1つ以上の新しい翻訳が生成されたとき。