Loading...
Loading...
Compare original and translation side by side
gplay auth loginGPLAY_SERVICE_ACCOUNT--packageGPLAY_PACKAGEgplay subscriptions creategplay auth loginGPLAY_SERVICE_ACCOUNT--packageGPLAY_PACKAGEgplay subscriptions createaf, am, ar, hy-AM, az-AZ, eu-ES, be, bn-BD, bg, my-MM, ca,
zh-HK, zh-CN, zh-TW, hr, cs-CZ, da-DK, nl-NL, en-AU, en-CA,
en-GB, en-IN, en-SG, en-US, en-ZA, et, fil, fi-FI, fr-CA,
fr-FR, gl-ES, ka-GE, de-DE, el-GR, gu, he-IL, hi-IN, hu-HU,
is-IS, id, it-IT, ja-JP, kn-IN, kk, km-KH, ko-KR, ky-KG,
lo-LA, lv, lt, mk-MK, ms, ms-MY, ml-IN, mr-IN, mn-MN, ne-NP,
no-NO, fa, pl-PL, pt-BR, pt-PT, pa, ro, rm, ru-RU, sr, si-LK,
sk, sl, es-419, es-ES, es-US, sw, sv-SE, ta-IN, te-IN, th,
tr-TR, uk, ur, vi, zuEDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output tableaf, am, ar, hy-AM, az-AZ, eu-ES, be, bn-BD, bg, my-MM, ca,
zh-HK, zh-CN, zh-TW, hr, cs-CZ, da-DK, nl-NL, en-AU, en-CA,
en-GB, en-IN, en-SG, en-US, en-ZA, et, fil, fi-FI, fr-CA,
fr-FR, gl-ES, ka-GE, de-DE, el-GR, gu, he-IL, hi-IN, hu-HU,
is-IS, id, it-IT, ja-JP, kn-IN, kk, km-KH, ko-KR, ky-KG,
lo-LA, lv, lt, mk-MK, ms, ms-MY, ml-IN, mr-IN, mn-MN, ne-NP,
no-NO, fa, pl-PL, pt-BR, pt-PT, pa, ro, rm, ru-RU, sr, si-LK,
sk, sl, es-419, es-ES, es-US, sw, sv-SE, ta-IN, te-IN, th,
tr-TR, uk, ur, vi, zuEDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output tablegplay subscriptions list --package com.example.app --paginate --output tablegplay subscriptions list --package com.example.app --paginate --output tablegplay subscriptions get \
--package com.example.app \
--product-id premium_monthly \
--output json --prettylistings{
"productId": "premium_monthly",
"listings": {
"en-US": {
"title": "Premium Monthly",
"benefits": ["Unlimited access", "No ads"],
"description": "Get premium access to all features"
}
}
}gplay subscriptions get \
--package com.example.app \
--product-id premium_monthly \
--output json --prettylistings{
"productId": "premium_monthly",
"listings": {
"en-US": {
"title": "Premium Monthly",
"benefits": ["Unlimited access", "No ads"],
"description": "Get premium access to all features"
}
}
}subscription-listings.json{
"listings": {
"en-US": {
"title": "Premium Monthly",
"benefits": ["Unlimited access", "No ads", "Priority support"],
"description": "Get premium access to all features every month."
},
"de-DE": {
"title": "Premium Monatlich",
"benefits": ["Unbegrenzter Zugang", "Keine Werbung", "Prioritäts-Support"],
"description": "Erhalten Sie jeden Monat Premium-Zugang zu allen Funktionen."
},
"fr-FR": {
"title": "Premium Mensuel",
"benefits": ["Accès illimité", "Sans publicité", "Support prioritaire"],
"description": "Accédez à toutes les fonctionnalités premium chaque mois."
},
"es-ES": {
"title": "Premium Mensual",
"benefits": ["Acceso ilimitado", "Sin anuncios", "Soporte prioritario"],
"description": "Obtén acceso premium a todas las funciones cada mes."
},
"ja-JP": {
"title": "プレミアム月額",
"benefits": ["無制限アクセス", "広告なし", "優先サポート"],
"description": "毎月すべての機能にプレミアムアクセスできます。"
},
"ko-KR": {
"title": "프리미엄 월간",
"benefits": ["무제한 액세스", "광고 없음", "우선 지원"],
"description": "매달 모든 기능에 프리미엄 액세스를 받으세요."
},
"pt-BR": {
"title": "Premium Mensal",
"benefits": ["Acesso ilimitado", "Sem anúncios", "Suporte prioritário"],
"description": "Tenha acesso premium a todos os recursos todos os meses."
},
"zh-CN": {
"title": "高级月度订阅",
"benefits": ["无限访问", "无广告", "优先支持"],
"description": "每月获得所有功能的高级访问权限。"
}
}
}subscription-listings.json{
"listings": {
"en-US": {
"title": "Premium Monthly",
"benefits": ["Unlimited access", "No ads", "Priority support"],
"description": "Get premium access to all features every month."
},
"de-DE": {
"title": "Premium Monatlich",
"benefits": ["Unbegrenzter Zugang", "Keine Werbung", "Prioritäts-Support"],
"description": "Erhalten Sie jeden Monat Premium-Zugang zu allen Funktionen."
},
"fr-FR": {
"title": "Premium Mensuel",
"benefits": ["Accès illimité", "Sans publicité", "Support prioritaire"],
"description": "Accédez à toutes les fonctionnalités premium chaque mois."
},
"es-ES": {
"title": "Premium Mensual",
"benefits": ["Acceso ilimitado", "Sin anuncios", "Soporte prioritario"],
"description": "Obtén acceso premium a todas las funciones cada mes."
},
"ja-JP": {
"title": "プレミアム月額",
"benefits": ["無制限アクセス", "広告なし", "優先サポート"],
"description": "毎月すべての機能にプレミアムアクセスできます。"
},
"ko-KR": {
"title": "프리미엄 월간",
"benefits": ["무제한 액세스", "광고 없음", "우선 지원"],
"description": "매달 모든 기능에 프리미엄 액세스를 받으세요."
},
"pt-BR": {
"title": "Premium Mensal",
"benefits": ["Acesso ilimitado", "Sem anúncios", "Suporte prioritário"],
"description": "Tenha acesso premium a todos os recursos todos os meses."
},
"zh-CN": {
"title": "高级月度订阅",
"benefits": ["无限访问", "无广告", "优先支持"],
"description": "每月获得所有功能的高级访问权限。"
}
}
}gplay subscriptions update \
--package com.example.app \
--product-id premium_monthly \
--json @subscription-listings.json \
--update-mask listings--update-mask listingsgplay subscriptions update \
--package com.example.app \
--product-id premium_monthly \
--json @subscription-listings.json \
--update-mask listings--update-mask listingsgplay subscriptions get \
--package com.example.app \
--product-id premium_monthly \
--output json --prettylistingsgplay subscriptions get \
--package com.example.app \
--product-id premium_monthly \
--output json --prettylistingsgplay subscriptions get \
--package com.example.app \
--product-id premium_monthly \
--output json --pretty > subscription-export.jsongplay subscriptions get \
--package com.example.app \
--product-id premium_monthly \
--output json --pretty > subscription-export.jsonjqjq '.listings' subscription-export.json > listings-to-translate.jsonjqjq '.listings' subscription-export.json > listings-to-translate.jsonlistings-to-translate.jsonlistings-to-translate.jsonjq -n --slurpfile translations translated-listings.json \
'{ listings: $translations[0] }' > subscription-update.jsonjq -n --slurpfile translations translated-listings.json \
'{ listings: $translations[0] }' > subscription-update.jsongplay subscriptions update \
--package com.example.app \
--product-id premium_monthly \
--json @subscription-update.json \
--update-mask listingsgplay subscriptions update \
--package com.example.app \
--product-id premium_monthly \
--json @subscription-update.json \
--update-mask listings#!/bin/bash#!/bin/bash
For subscriptions with different display names, use per-product JSON files:
```bash
for PRODUCT_ID in $PRODUCT_IDS; do
LISTINGS_FILE="listings/${PRODUCT_ID}.json"
if [ -f "$LISTINGS_FILE" ]; then
gplay subscriptions update \
--package "$PACKAGE" \
--product-id "$PRODUCT_ID" \
--json "@$LISTINGS_FILE" \
--update-mask listings
else
echo "Warning: No listings file for $PRODUCT_ID, skipping."
fi
done
对于显示名称不同的订阅,可使用按产品划分的JSON文件:
```bash
for PRODUCT_ID in $PRODUCT_IDS; do
LISTINGS_FILE="listings/${PRODUCT_ID}.json"
if [ -f "$LISTINGS_FILE" ]; then
gplay subscriptions update \
--package "$PACKAGE" \
--product-id "$PRODUCT_ID" \
--json "@$LISTINGS_FILE" \
--update-mask listings
else
echo "警告:$PRODUCT_ID 无对应列表文件,跳过。"
fi
donegplay subscriptions create \
--package com.example.app \
--product-id premium_yearly \
--json @full-subscription.jsonfull-subscription.json{
"productId": "premium_yearly",
"listings": {
"en-US": {
"title": "Premium Yearly",
"benefits": ["Unlimited access", "No ads", "2 months free"],
"description": "Save with annual premium access."
},
"de-DE": {
"title": "Premium Jährlich",
"benefits": ["Unbegrenzter Zugang", "Keine Werbung", "2 Monate gratis"],
"description": "Sparen Sie mit jährlichem Premium-Zugang."
},
"fr-FR": {
"title": "Premium Annuel",
"benefits": ["Accès illimité", "Sans publicité", "2 mois offerts"],
"description": "Économisez avec l'accès premium annuel."
},
"ja-JP": {
"title": "プレミアム年間",
"benefits": ["無制限アクセス", "広告なし", "2ヶ月無料"],
"description": "年間プレミアムアクセスでお得に。"
}
},
"basePlans": [
{
"basePlanId": "yearly",
"state": "ACTIVE",
"autoRenewingBasePlanType": {
"billingPeriodDuration": "P1Y",
"gracePeriodDuration": "P7D",
"resubscribeState": "RESUBSCRIBE_STATE_ACTIVE",
"prorationMode": "CHARGE_ON_NEXT_BILLING_DATE"
},
"regionalConfigs": [
{
"regionCode": "US",
"price": {
"currencyCode": "USD",
"units": "49",
"nanos": 990000000
}
}
]
}
]
}gplay subscriptions create \
--package com.example.app \
--product-id premium_yearly \
--json @full-subscription.jsonfull-subscription.json{
"productId": "premium_yearly",
"listings": {
"en-US": {
"title": "Premium Yearly",
"benefits": ["Unlimited access", "No ads", "2 months free"],
"description": "Save with annual premium access."
},
"de-DE": {
"title": "Premium Jährlich",
"benefits": ["Unbegrenzter Zugang", "Keine Werbung", "2 Monate gratis"],
"description": "Sparen Sie mit jährlichem Premium-Zugang."
},
"fr-FR": {
"title": "Premium Annuel",
"benefits": ["Accès illimité", "Sans publicité", "2 mois offerts"],
"description": "Économisez avec l'accès premium annuel."
},
"ja-JP": {
"title": "プレミアム年間",
"benefits": ["無制限アクセス", "広告なし", "2ヶ月無料"],
"description": "年間プレミアムアクセスでお得に。"
}
},
"basePlans": [
{
"basePlanId": "yearly",
"state": "ACTIVE",
"autoRenewingBasePlanType": {
"billingPeriodDuration": "P1Y",
"gracePeriodDuration": "P7D",
"resubscribeState": "RESUBSCRIBE_STATE_ACTIVE",
"prorationMode": "CHARGE_ON_NEXT_BILLING_DATE"
},
"regionalConfigs": [
{
"regionCode": "US",
"price": {
"currencyCode": "USD",
"units": "49",
"nanos": 990000000
}
}
]
}
]
}offerTagsgplay offers update \
--package com.example.app \
--product-id premium_monthly \
--base-plan-id monthly \
--offer-id free_trial_7d \
--json @offer-update.jsonoffer-update.json{
"offerTags": [
{"tag": "free-trial"},
{"tag": "7-days"}
]
}offerTagsgplay offers update \
--package com.example.app \
--product-id premium_monthly \
--base-plan-id monthly \
--offer-id free_trial_7d \
--json @offer-update.jsonoffer-update.json{
"offerTags": [
{"tag": "free-trial"},
{"tag": "7-days"}
]
}EDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output tablegplay listings list --package com.example.app --edit $EDIT_ID \
| jq -r '.[].language'EDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output tablegplay listings list --package com.example.app --edit $EDIT_ID \
| jq -r '.[].language'{
"listings": {
"en-US": { "title": "TITLE_EN", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_EN" },
"de-DE": { "title": "TITLE_DE", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_DE" },
"fr-FR": { "title": "TITLE_FR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_FR" },
"es-ES": { "title": "TITLE_ES", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_ES" },
"it-IT": { "title": "TITLE_IT", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_IT" },
"ja-JP": { "title": "TITLE_JA", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_JA" },
"ko-KR": { "title": "TITLE_KO", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_KO" },
"pt-BR": { "title": "TITLE_PT_BR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_PT_BR" },
"ru-RU": { "title": "TITLE_RU", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_RU" },
"zh-CN": { "title": "TITLE_ZH_CN", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_ZH_CN" },
"zh-TW": { "title": "TITLE_ZH_TW", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_ZH_TW" },
"ar": { "title": "TITLE_AR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_AR" },
"hi-IN": { "title": "TITLE_HI", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_HI" },
"tr-TR": { "title": "TITLE_TR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_TR" },
"pl-PL": { "title": "TITLE_PL", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_PL" },
"nl-NL": { "title": "TITLE_NL", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_NL" },
"sv-SE": { "title": "TITLE_SV", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_SV" },
"th": { "title": "TITLE_TH", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_TH" },
"vi": { "title": "TITLE_VI", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_VI" }
}
}{
"listings": {
"en-US": { "title": "TITLE_EN", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_EN" },
"de-DE": { "title": "TITLE_DE", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_DE" },
"fr-FR": { "title": "TITLE_FR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_FR" },
"es-ES": { "title": "TITLE_ES", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_ES" },
"it-IT": { "title": "TITLE_IT", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_IT" },
"ja-JP": { "title": "TITLE_JA", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_JA" },
"ko-KR": { "title": "TITLE_KO", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_KO" },
"pt-BR": { "title": "TITLE_PT_BR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_PT_BR" },
"ru-RU": { "title": "TITLE_RU", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_RU" },
"zh-CN": { "title": "TITLE_ZH_CN", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_ZH_CN" },
"zh-TW": { "title": "TITLE_ZH_TW", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_ZH_TW" },
"ar": { "title": "TITLE_AR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_AR" },
"hi-IN": { "title": "TITLE_HI", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_HI" },
"tr-TR": { "title": "TITLE_TR", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_TR" },
"pl-PL": { "title": "TITLE_PL", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_PL" },
"nl-NL": { "title": "TITLE_NL", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_NL" },
"sv-SE": { "title": "TITLE_SV", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_SV" },
"th": { "title": "TITLE_TH", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_TH" },
"vi": { "title": "TITLE_VI", "benefits": ["BENEFIT_1", "BENEFIT_2"], "description": "DESC_VI" }
}
}--update-mask listings--output table--help--update-mask listings--output table--helpupdate--update-mask--paginate--pretty--helpupdate--update-mask--paginate--pretty--help