-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'gorayan/master'
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# yaml-translater | ||
Google Cloud Translation APIを使ったYamlファイル翻訳するPythonスクリプト | ||
## Setup | ||
サービスアカウントキーの設定(windows) | ||
``` | ||
setx GOOGLE_APPLICATION_CREDENTIALS <json_key_path> -m | ||
``` | ||
[公式ドキュメント](https://cloud.google.com/translate/docs/setup) | ||
## Requirements | ||
* Python 3.9 | ||
* pyyaml 5.4.1 | ||
* google-cloud-translate 2.0.1 | ||
## Example | ||
before | ||
``` | ||
a: Hello | ||
b: | ||
a: Good Night | ||
b: I am Fine | ||
c: | ||
- What are you doing? | ||
- a: Hey Guys! | ||
b: We have a gift for you | ||
``` | ||
after | ||
``` | ||
a: こんにちは | ||
b: | ||
a: おやすみ | ||
b: 私は元気です | ||
c: | ||
- 何してるの? | ||
- a: やあみんな! | ||
b: 私たちはあなたへの贈り物を持っています | ||
``` |