WARNING
Since the publication of the article, the library has undergone some significant changes and some of the points described in this article are no longer relevant. You can find the latest instructions and examples in the repositories listed at the end of this article.
java -jar loco-laser-google.jar localization_config.json
Remark number 1
To execute the command, Java must be installed on the machine.
Remark number 2After executing the command, the corresponding resource files will be created and placed in the necessary folders. The first parameter must be the path to the configuration file. In the example above, this is the file
Once again, I don’t need to download jar directly to use the utility in my projects. For these purposes, there are ready-made scripts and plugins.
"localization_config.json"
. It is he who is responsible for setting all the intricacies of import and export. The file is a textual JSON which may look, for example, like this: { "platform": "android", "source": { "id":"1JZxUcu30BjxLwHg12bdHTxjDgsGFX9HA9zC4Jd8cuUM", "column_key":"key", "column_locales":["base", "ru"] } }
"platform"
parameter specifies the platform for which the import will be made. One of 2 options is possible: "android"
and "ios"
(Windows Phone is not supported yet, but it is only a matter of time). In addition to the format, the platform is responsible for the location of files with resources, their names, as well as a place for storing temporary files."source"
parameter is a JSON object. Its contents are responsible for where and how the lines will be loaded. The minimum set of parameters for it will be: "id"
, "column_key"
and "column_locales"
."source.id"
, a Google spreadsheet identifier must be specified. In order to find this identifier you need to look at the URL to the table. It should look like this docs.google.com/spreadsheets/d/1JZxUcu30BjxLwHg12bdHTxjDgsGFX9HA9zC4Jd8cuUM . In this example, the identifier will be "1JZxUcu30BjxLwHg12bdHTxjDgsGFX9HA9zC4Jd8cuUM"
. By the way, the link is clickable and by it you can see a real example of a table."source.column_key"
contains the name of the column with keys, and "source.column_locales"
array of column names with values, where the column name is also a locale. For the base locale, the word "base"
reserved."-"
symbol in the first column. The “crossed out” line is completely ignored and in no way participates in localization. If you look at the table at the link above, you will see that the first row with “human” headings is “crossed out” and is only a decorative element of the table. You can also “strike out” lines with resources, for example, when a line is not used anywhere, but it’s a pity to delete.Parameter | Type of | Description |
---|---|---|
id | String | ID Sheet Google Sheet. The URL to the table contains this identifier (https://docs.google.com/spreadsheets/d/*sheet_id*). Required. |
column_key | String | The name of the column with the keys. Required. |
column_locales | Strings array | An array of column names with values ​​where the column name is also a locale. For the base locale, use the column named "base" . Required. |
column_quantity | String | The name of the column with the quantitative values. Cells in the table must contain one of the following values: zero , one , two , few , many , other . An empty string is perceived as other. Optional parameter. By default, quantitative values ​​are not used. |
column_comment | String | The name of the column with comments. Optional parameter. By default, comments in the resource file are not recorded. |
worksheet_title | String | The name of the sheet in the Google Sheet table. Optional parameter. The default is the first sheet. |
credential_file | String | The path to the file containing the credentials for OAuth authorization. When using a relative path, the file path is specified relative to the working directory. Optional parameter. |
type | String | Type of data source. Must be "googlesheet" . Optional parameter. However, if you want to be sure that the configuration file and the utility work with the same type of source, you should specify its type. |
Parameter | Type of | Description |
---|---|---|
type | String | Type of platform. The possible values ​​are: "android" or "ios" . Required. |
res_name | String | The name of the resource file without the extension. The extension is selected depending on the type of file. Optional parameter. Default values: Android - "strings" iOS - "Localizable" |
res_dir | String | Path to the resource directory. Optional parameter. Default values: Android - "./src/main/res/" iOS - "./" |
temp_dir | String | Path to the directory for storing temporary files. Optional parameter. Default values: Android - "./build/tmp/" iOS - "../DerivedData/LocoLaserTemp/" |
Important!Other parameters
All relative paths are relative to the working directory. By default, the configuration file directory is used as the working directory.
Parameter | Type of | Description |
---|---|---|
work_dir | String | The path to the working folder. All relative paths are relative to this folder. The default is the configuration file directory. |
force_import | Boolean | The utility remembers the state of resources at the last execution and tries not to start the import unnecessarily. To ignore this and perform the import always in full, set force_import to true . The default is false. |
conflict_strategy | String | Determine how to resolve conflicts when combining platform resources and resources from Google Sheets. There are 3 options:
keep_new_platform . |
duplicate_comments | Boolean | If duplicate_comments = false comment will not be added to the resource file if this comment is equal to the localized string. The default is false . |
delay | Long | The time in minutes determines the minimum time to the next localization. Localization will not be performed more often than specified in the delay parameter. If force_import used force_import delay is ignored. |
duplicate_comments
parameter is especially useful if you use the base locale as a comment. In this case, there will always be a comment in the localized resources with text in the base language (usually English), and in the base resource there will be no comments, since in this case they repeat the string values ​​and are redundant. <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">LocoLaser example</string> <string name="screen_main_app_description">This is example application of how to use the LocoLaser.</string> <string name="screen_main_plural_example_title">Plural string examples</string> </resources>
/values-ru/strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> /* LocoLaser example */ <string name="app_name">LocoLaser </string> /* This is example application of how to use the LocoLaser. */ <string name="screen_main_app_description"> LocoLaser.</string> /* Plural string examples */ <string name="screen_main_plural_example_title"> Plural </string> </resources>
{ "platform": { "type":"android", "res_name":"strings_intro" }, "source": { "type":"googlesheet", "id":"1JZxUcu30BjxLwHg12bdHTxjDgsGFX9HA9zC4Jd8cuUM", "column_key":"key", "column_locales":["base", "ru"], "column_comment":"base", “worksheet_title”:”Strings intro” }, "force_import":true, "conflict_strategy":”keep_new_platform”, "delay":60, }
Argument | Description |
---|---|
--force or --f | Flag. Sets "force_import = true" |
-cs *string conflict strategy* | Overrides property "conflict_strategy" |
-delay *long delay* | Overrides property "delay" |
java -jar loco-laser-google.jar localization_config.json --f -cs keep_new_platform
"build.gradle"
file and add the following lines: buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "gradle.plugin.ru.pocketbyte.locolaser:plugin:1.0.1" } }
"build.gradle"
file and add one line to the beginning of the file: apply plugin: "ru.pocketbyte.locolaser"
"build.gradle"
. Open the "build.gradle"
module you need and at the very top of the file add the following line plugins { id "ru.pocketbyte.locolaser" version "1.0.1" }
dependencies { ... localize 'ru.pocketbyte.locolaser:locolaser-mobile-googlesheet:1.1.+' }
"localize_config.json"
as the configuration file. After the project is synchronized, the “localization” group will appear in the Gradle list of tasks, with 3 tasks in it."--force"
flag;"--force"
and "conflict_strategy" = "export_new_platform"
. afterEvaluate { preBuild.dependsOn project.tasks.localize }
GROUP="ru/pocketbyte/locolaser" ARTIFACT="locolaser-mobile-googlesheet" VERSION="1.1.1" CONFIG_FILE="localization_config.json" cd "`dirname \"$0\"`" ARTIFACTS_DIR="../DerivedData/LocoLaserTemp/artifacts/$GROUP/" mkdir -p $ARTIFACTS_DIR ARTIFACT_FILE="$ARTIFACTS_DIR$ARTIFACT-$VERSION.jar" if [ -f $ARTIFACT_FILE ] then echo "Artifact already downloaded" else ARTIFACT_URL="https://bintray.com/pocketbyte/maven/download_file?file_path=$GROUP/$ARTIFACT/$VERSION/$ARTIFACT-$VERSION.jar" echo "Loading: $ARTIFACT_URL" curl -L -o $ARTIFACT_FILE $ARTIFACT_URL if [ $? -eq 0 ] then echo "Artifact downloaded" else exit $? fi fi java -jar $ARTIFACT_FILE $CONFIG_FILE
"../DerivedData/LocoLaserTemp/artifacts/"
, and then launches it for execution. The configuration file is a file named "localize_config.json"
, as in Android. The solution is quite rough, you will have to specify the version of the artifact used. However, it copes well with its task and does not need to store the utility file in the jar project. As you can guess from relative paths, the script should be saved in the same folder as the configuration file. I have several such scripts in my project: localize.command , localizeForce.command and localizeExportNew.command . All these commands repeat the tasks from the Gradle plugin above."source.credential_file"
parameter is not specified in the configuration file, the browser with the Google authentication page will automatically open when the localizer starts. After successful authorization, the utility will continue its work. Next time you will not be required to log in to this table.credential_file
. As a credential file, the service Google Account file will do. To create it in the Google Developers console, you need to do the following:"source.credential_file"
. In order for a service account to have access to a Google spreadsheet, it is necessary to share it for a previously created service account. When sharing, specify the Service Account ID as Email. This identifier can be seen in the list of service accounts, or peeped in the downloaded key file. { "type": "service_account", "project_id": "myapp-1086", "private_key_id": "b67c2edcc47c7053c035d8681c8eb7e9f4d90c09", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJUV49mSQB2NSO\nw+tfQWq4pP63U4t7W8V6O6E7FABbYS5N4g35nRzVEj5NciqI27shHSKVrsl7U5ji\nM0IIA+vi+dgHXwHfCPhS9d85xZ73fuqFaj29iru+pTq9tuNieLDl60L04oCc1qQKBgQDLsMMnX2r9qkQw01H5L2WRB9R6er+bO4DE\n8Ecpripfd/e7qq89WcGu1H8S+3Jy49dBmN709vPvVcsGQx8mDdYdm4P0WPkKbgTo\nt12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hzThLVYf79vvwrO4klXm9Mv/7sa/uQ54GK7IkXVklSxUoZpThoOme5hT\n+8ScgJSnyqEpwFQjaslbNBUxtpc9IA2bseP1S7aCVDfZtEp7rHqOFZTvSgol5YD/AoGAdIMNKvg0IiS2xcIEbyHa\nPTNrUfpHeJk/P+Frr1cmDHhGe1l0FWNg9EDlhItAW5EP15ubZPdWQRrV7RuydJlc\ngWesc2RLPIG8+so1TpG1F62+tsQ9lGSF5imiew1x7sQ3H0VIpGtSfTvSMep6fuE7\niuSVbY0UnpxGnqzo9TBAYS4=\n-----END PRIVATE KEY-----\n", "client_email": "localizator@myapp-1086.iam.gserviceaccount.com", "client_id": "704739729071909788554", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/localizator%40myapp-1086.iam.gserviceaccount.com" }
KEY ----- \ nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJUV49mSQB2NSO \ nw + tfQWq4pP63U4t7W8V6O6E7FABbYS5N4g35nRzVEj5NciqI27shHSKVrsl7U5ji \ nM0IIA + vi + dgHXwHfCPhS9d85xZ73fuqFaj29iru + pTq9tuNieLDl60L04oCc1qQKBgQDLsMMnX2r9qkQw01H5L2WRB9R6er + bO4DE \ n8Ecpripfd / e7qq89WcGu1H8S + 3Jy49dBmN709vPvVcsGQx8mDdYdm4P0WPkKbgTo \ nt12OA07uiY6Zn54rW5CXrjdoscPXB94AS2ps4M3 / xY5hHTxwtS8yJxoUgTVEfgNB \ nDwzNrZSCVEMCoBAIYl6rWGITgNaR0 + FLuP + kjZw { "type": "service_account", "project_id": "myapp-1086", "private_key_id": "b67c2edcc47c7053c035d8681c8eb7e9f4d90c09", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjA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yDrxKhNrmXXKAEwR0rDz2uGTQCfJ0Zyk/Z1E7iDl/SDfYSSD70wAgGblH2\nAAIQzeoPAgMBAAECggEAb7Trswhft3qmb1V9LEzzN+OtxvHfqqKAkFO4Ijz1+b6R\n3/t4P7KTRhOqaHTZ7zjlu/kbsKzc9casRY+lqybp4/c4jNaGBklG6Vmu96E9wKBgEFPsRe88v/UaAV213Jlw0hdYE9I19yW6z7OSl+Q0dflDbLO5cRs\nTeHlh+9zhzThLVYf79vvwrO4klXm9Mv/7sa/uQ54GK7IkXVklSxUoZpThoOme5hT\n+8ScgJSnyqEpwFQjaslbNBUxtpc9IA2bseP1S7aCVDfZtEp7rHqOFZTvSgol5YD/AoGAdIMNKvg0IiS2xcIEbyHa\nPTNrUfpHeJk/P+Frr1cmDHhGe1l0FWNg9EDlhItAW5EP15ubZPdWQRrV7RuydJlc\ngWesc2RLPIG8+so1TpG1F62+tsQ9lGSF5imiew1x7sQ3H0VIpGtSfTvSMep6fuE7\niuSVbY0UnpxGnqzo9TBAYS4=\n-----END PRIVATE KEY-----\n", "client_email": "localizator@myapp-1086.iam.gserviceaccount.com", "client_id": "704739729071909788554", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/localizator%40myapp-1086.iam.gserviceaccount.com" }
\ n567XRUzJuLLYzbl2xj1HZWf8KbeTTnALKYg8Jz \ nxXXvLlZl2OJ8Frr9ry1DEszPkwWwTQJg5bRG7Z // QfpyEZ2PUvpCNVVpeRuMmUhv \ nu5rSLa0G + C97 / XIGz / O / 1ME9WXU6ZNRwwDkSDw6L7AIrXY8V + 8pIRL9e0ks4Uw / A \ n6ACYrlYMYYAIl79MNrUrizvF5KwxLiohHJ5KVpThGuRZDaidCPp9BL / h8tfhXPel \ nwQot9dM8P4CmQNR / fMpytQSVk7vv95B2JHrt6QmIsQKBgQD9BJ8gfZUVhlxtuaWO \ nMKl1PjiD + YKhz4rmIZUKM84xphsGYUBhH29s1zb98u9vlEnlx3bGUtDakNnjTDQp \ nagQv22 + 6STL + 0s1haOxyfbi1jIzXvzh47yij6 + v7WEIdNj45WV9kpcFTi2oUXURt \ { "type": "service_account", "project_id": "myapp-1086", "private_key_id": "b67c2edcc47c7053c035d8681c8eb7e9f4d90c09", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJUV49mSQB2NSO\nw+tfQWq4pP63U4t7W8V6O6E7FABbYS5N4g35nRzVEj5NciqI27shHSKVrsl7U5ji\nM0IIA+vi+dgHXwHfCPhS9d85xZ73fuqFaj29iru+pTq9tuNieLDl60L04oCc1qQKBgQDLsMMnX2r9qkQw01H5L2WRB9R6er+bO4DE\n8Ecpripfd/e7qq89WcGu1H8S+3Jy49dBmN709vPvVcsGQx8mDdYdm4P0WPkKbgTo\nt12OA07uiY6Zn54rW5CXrjdoscPXB94AS2ps4M3/xY5hHTxwtS8yJxoUgTVEfgNB\nDwzNrZSCVEMCoBAIYl6rWGITgNaR0+FLuP+kjZw\nHsLdkU8173J3nhuYhxo7N90BhO08lquIQ7bJAoGBAKLz\nVRxRdFlcdlMNK34K0dkVh4E4Y8K+9oQWqQeKIrHfWpuSr8CH5q+Dpek8qVGKPnFm\n567XRUzJuLLYzbl2xj1HZWf8KbeTTnALKYg8Jz\nxXXvLlZl2OJ8Frr9ry1DEszPkwWwTQJg5bRG7Z//QfpyEZ2PUvpCNVVpeRuMmUhv\nu5rSLa0G+C97/XIGz/O/1ME9WXU6ZNRwwDkSDw6L7AIrXY8V+8pIRL9e0ks4Uw/A\n6ACYrlYMYYAIl79MNrUrizvF5KwxLiohHJ5KVpThGuRZDaidCPp9BL/h8tfhXPel\nwQot9dM8P4CmQNR/fMpytQSVk7vv95B2JHrt6QmIsQKBgQD9BJ8gfZUVhlxtuaWO\nMKl1PjiD+YKhz4rmIZUKM84xphsGYUBhH29s1zb98u9vlEnlx3bGUtDakNnjTDQp\nagQv22+6STL+0s1haOxyfbi1jIzXvzh47yij6+v7WEIdNj45WV9kpcFTi2oUXURt\nEi3WskYTijYGbDNQmpG2kmY\nDz0KdeTFJxsnFstTT/VozEGvNIHf+8PhKv0123dBFuqSgBD5SFHDp3tQ2IzC81Jm\n5FJLldk3Hw1QRh6+WiEJBTX6nFU4DB5tVXKhbPOvhqYwI/CUYWWbVBQCQgqURcyr\nUdRxAHyDrxKhNrmXXKAEwR0rDz2uGTQCfJ0Zyk/Z1E7iDl/SDfYSSD70wAgGblH2\nAAIQzeoPAgMBAAECggEAb7Trswhft3qmb1V9LEzzN+OtxvHfqqKAkFO4Ijz1+b6R\n3/t4P7KTRhOqaHTZ7zjlu/kbsKzc9casRY+lqybp4/c4jNaGBklG6Vmu96E9wKBgEFPsRe88v/UaAV213Jlw0hdYE9I19yW6z7OSl+Q0dflDbLO5cRs\nTeHlh+9zhzThLVYf79vvwrO4klXm9Mv/7sa/uQ54GK7IkXVklSxUoZpThoOme5hT\n+8ScgJSnyqEpwFQjaslbNBUxtpc9IA2bseP1S7aCVDfZtEp7rHqOFZTvSgol5YD/AoGAdIMNKvg0IiS2xcIEbyHa\nPTNrUfpHeJk/P+Frr1cmDHhGe1l0FWNg9EDlhItAW5EP15ubZPdWQRrV7RuydJlc\ngWesc2RLPIG8+so1TpG1F62+tsQ9lGSF5imiew1x7sQ3H0VIpGtSfTvSMep6fuE7\niuSVbY0UnpxGnqzo9TBAYS4=\n-----END PRIVATE KEY-----\n", "client_email": "localizator@myapp-1086.iam.gserviceaccount.com", "client_id": "704739729071909788554", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/localizator%40myapp-1086.iam.gserviceaccount.com" }
n5FJLldk3Hw1QRh6 + WiEJBTX6nFU4DB5tVXKhbPOvhqYwI / CUYWWbVBQCQgqURcyr \ nUdRxAHyDrxKhNrmXXKAEwR0rDz2uGTQCfJ0Zyk / Z1E7iDl / SDfYSSD70wAgGblH2 \ nAAIQzeoPAgMBAAECggEAb7Trswhft3qmb1V9LEzzN + OtxvHfqqKAkFO4Ijz1 + b6R \ n3 / t4P7KTRhOqaHTZ7zjlu / kbsKzc9casRY + lqybp4 / c4jNaGBklG6Vmu96E9wKBgEFPsRe88v / UaAV213Jlw0hdYE9I19yW6z7OSl + Q0dflDbLO5cRs \ nTeHlh + 9zhzThLVYf79vvwrO4klXm9Mv / 7sa / uQ54GK7IkXVklSxUoZpThoOme5hT \ n + { "type": "service_account", "project_id": "myapp-1086", "private_key_id": "b67c2edcc47c7053c035d8681c8eb7e9f4d90c09", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJUV49mSQB2NSO\nw+tfQWq4pP63U4t7W8V6O6E7FABbYS5N4g35nRzVEj5NciqI27shHSKVrsl7U5ji\nM0IIA+vi+dgHXwHfCPhS9d85xZ73fuqFaj29iru+pTq9tuNieLDl60L04oCc1qQKBgQDLsMMnX2r9qkQw01H5L2WRB9R6er+bO4DE\n8Ecpripfd/e7qq89WcGu1H8S+3Jy49dBmN709vPvVcsGQx8mDdYdm4P0WPkKbgTo\nt12OA07uiY6Zn54rW5CXrjdoscPXB94AS2ps4M3/xY5hHTxwtS8yJxoUgTVEfgNB\nDwzNrZSCVEMCoBAIYl6rWGITgNaR0+FLuP+kjZw\nHsLdkU8173J3nhuYhxo7N90BhO08lquIQ7bJAoGBAKLz\nVRxRdFlcdlMNK34K0dkVh4E4Y8K+9oQWqQeKIrHfWpuSr8CH5q+Dpek8qVGKPnFm\n567XRUzJuLLYzbl2xj1HZWf8KbeTTnALKYg8Jz\nxXXvLlZl2OJ8Frr9ry1DEszPkw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npxGnqzo9TBAYS4=\n-----END PRIVATE KEY-----\n", "client_email": "localizator@myapp-1086.iam.gserviceaccount.com", "client_id": "704739729071909788554", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/localizator%40myapp-1086.iam.gserviceaccount.com" }
Frr1cmDHhGe1l0FWNg9EDlhItAW5EP15ubZPdWQRrV7RuydJlc \ ngWesc2RLPIG8 + so1TpG1F62 + tsQ9lGSF5imiew1x7sQ3H0VIpGtSfTvSMep6fuE7 \ niuSVbY0UnpxGnqzo9TBAYS4 = \ n ----- END PRIVATE KEY ----- \ n ", { "type": "service_account", "project_id": "myapp-1086", "private_key_id": "b67c2edcc47c7053c035d8681c8eb7e9f4d90c09", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJUV49mSQB2NSO\nw+tfQWq4pP63U4t7W8V6O6E7FABbYS5N4g35nRzVEj5NciqI27shHSKVrsl7U5ji\nM0IIA+vi+dgHXwHfCPhS9d85xZ73fuqFaj29iru+pTq9tuNieLDl60L04oCc1qQKBgQDLsMMnX2r9qkQw01H5L2WRB9R6er+bO4DE\n8Ecpripfd/e7qq89WcGu1H8S+3Jy49dBmN709vPvVcsGQx8mDdYdm4P0WPkKbgTo\nt12OA07uiY6Zn54rW5CXrjdoscPXB94AS2ps4M3/xY5hHTxwtS8yJxoUgTVEfgNB\nDwzNrZSCVEMCoBAIYl6rWGITgNaR0+FLuP+kjZw\nHsLdkU8173J3nhuYhxo7N90BhO08lquIQ7bJAoGBAKLz\nVRxRdFlcdlMNK34K0dkVh4E4Y8K+9oQWqQeKIrHfWpuSr8CH5q+Dpek8qVGKPnFm\n567XRUzJuLLYzbl2xj1HZWf8KbeTTnALKYg8Jz\nxXXvLlZl2OJ8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uE7\niuSVbY0UnpxGnqzo9TBAYS4=\n-----END PRIVATE KEY-----\n", "client_email": "localizator@myapp-1086.iam.gserviceaccount.com", "client_id": "704739729071909788554", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/localizator%40myapp-1086.iam.gserviceaccount.com" }
"client_email"
is the account ID.Source: https://habr.com/ru/post/323318/
All Articles