我试图在Google中设置一个翻译流,并将其下载到.strings文件中,并为每个NSLocalizedString键生成一个具有常量的translations快速结构。我被身份验证部分卡住了:
安装了翻译插件
fastlane add_plugin translation在Fastfile中创建了lane
lane :translations do
translation(
doc_id:'PASTED_FROM_GOOGLE_DOC_URL',
key: 0,
ios_output_paths:{
'DummyProject/da.lproj/Localizable.strings' => 1,
'DummyProject/en.lproj/Localizable.strings' => 2
},
swift_struct_path: 'DummyProject/Translations.swift',
config_path: "fastlane/config.json"
)
endconfig.json文件内容
{
"client_id": "136678564448-ta8gq3t1ipcpb9n97s0gbnee1rl94l8q.apps.googleusercontent.com",
"client_secret": "_LDTyiL4u0gHmU2QoasZCBI4",
"scope": [
"https://www.googleapis.com/auth/drive",
"https://spreadsheets.google.com/feeds/"
],
"refresh_token": "1/kALA83pkHtJD1jFXnlLsQxrVKoz4KW77NFVVNTLl7d4"
}我如何获得client_id,client_secret和refresh_token,以便插件可以从Google下载翻译?
发布于 2018-10-25 08:20:05
遵循[https://github.com/gimite/google-drive-ruby/blob/master/doc/authorization.md#on-behalf-of-you-command-line-authorization][1]获取client_id,client_secret获取config.json
必须创建项目以生成OAuth 2.0客户端凭据
如果config.json文件中省略了该字段,并且脚本要求您进入一个特殊的网页,则可以在第一次获取刷新令牌。
https://stackoverflow.com/questions/52984498
复制相似问题