gplay-subscription-localization

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Play Subscription Localization

Google Play 订阅本地化

Use this skill to bulk-create or bulk-update localized display names, descriptions, and benefits for subscriptions across all Google Play supported locales. This eliminates the tedious manual process of editing each language in Play Console.
使用此方法可批量创建或批量更新所有Google Play支持地区的订阅本地化显示名称、描述和权益。这省去了在Play Console中手动编辑每种语言的繁琐流程。

Preconditions

前置条件

  • Auth configured (
    gplay auth login
    or
    GPLAY_SERVICE_ACCOUNT
    env var).
  • Package name known (
    --package
    or
    GPLAY_PACKAGE
    ).
  • Subscription products already created (use
    gplay subscriptions create
    first).
  • Service account has "Edit and manage your app" permission.
  • 已配置认证(
    gplay auth login
    GPLAY_SERVICE_ACCOUNT
    环境变量)。
  • 已知应用包名(
    --package
    参数或
    GPLAY_PACKAGE
    环境变量)。
  • 已创建订阅产品(请先使用
    gplay subscriptions create
    命令)。
  • 服务账号拥有“编辑和管理您的应用”权限。

Supported Google Play Locales

Google Play 支持的地区

These are the locales supported by Google Play for subscription listings:
af, 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, zu
Verify which locales your app already supports:
bash
EDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output table
以下是Google Play订阅列表支持的地区:
af, 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, zu
验证您的应用已支持哪些地区:
bash
EDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output table

Subscription Structure in Google Play

Google Play 中的订阅结构

Google Play subscriptions have a hierarchical structure:
  • Subscription: The product itself (e.g., "Premium")
    • Listings: Localized display name, description, benefits per locale
    • Base Plan: A pricing tier (e.g., "Monthly", "Yearly")
    • Offer: Promotional pricing on a base plan (trials, intro prices)
Listings are set at the subscription level and apply to all base plans under it.
Google Play订阅具有层级结构:
  • 订阅:产品本身(例如“高级版”)
    • 列表:各地区的本地化显示名称、描述和权益
    • 基础方案:定价层级(例如“月度”、“年度”)
    • 优惠:基础方案的促销定价(试用、入门价格)
列表设置在订阅层级,适用于其下的所有基础方案。

Workflow: Bulk-Localize a Subscription

工作流:批量本地化单个订阅

1. List Existing Subscriptions

1. 列出所有现有订阅

bash
gplay subscriptions list --package com.example.app --paginate --output table
bash
gplay subscriptions list --package com.example.app --paginate --output table

2. Get Current Subscription Details

2. 获取当前订阅详情

bash
gplay subscriptions get \
  --package com.example.app \
  --product-id premium_monthly \
  --output json --pretty
The response includes a
listings
object keyed by locale:
json
{
  "productId": "premium_monthly",
  "listings": {
    "en-US": {
      "title": "Premium Monthly",
      "benefits": ["Unlimited access", "No ads"],
      "description": "Get premium access to all features"
    }
  }
}
bash
gplay subscriptions get \
  --package com.example.app \
  --product-id premium_monthly \
  --output json --pretty
响应结果包含一个以地区为键的
listings
对象:
json
{
  "productId": "premium_monthly",
  "listings": {
    "en-US": {
      "title": "Premium Monthly",
      "benefits": ["Unlimited access", "No ads"],
      "description": "Get premium access to all features"
    }
  }
}

3. Prepare Multi-locale Listings JSON

3. 准备多地区列表JSON文件

Create a JSON file with listings for all target locales:
subscription-listings.json
:
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": "每月获得所有功能的高级访问权限。"
    }
  }
}
创建包含所有目标地区列表的JSON文件:
subscription-listings.json
:
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": "每月获得所有功能的高级访问权限。"
    }
  }
}

4. Update Subscription with All Listings

4. 更新订阅的所有地区列表

bash
gplay subscriptions update \
  --package com.example.app \
  --product-id premium_monthly \
  --json @subscription-listings.json \
  --update-mask listings
The
--update-mask listings
ensures only the listings field is modified, leaving base plans and other configuration untouched.
bash
gplay subscriptions update \
  --package com.example.app \
  --product-id premium_monthly \
  --json @subscription-listings.json \
  --update-mask listings
--update-mask listings
参数确保仅修改列表字段,不会改动基础方案和其他配置。

5. Verify

5. 验证

bash
gplay subscriptions get \
  --package com.example.app \
  --product-id premium_monthly \
  --output json --pretty
Check that all locales appear in the
listings
object.
bash
gplay subscriptions get \
  --package com.example.app \
  --product-id premium_monthly \
  --output json --pretty
检查
listings
对象中是否包含所有目标地区。

Workflow: Export, Translate, Import

工作流:导出、翻译、导入

1. Export current subscription data

1. 导出当前订阅数据

bash
gplay subscriptions get \
  --package com.example.app \
  --product-id premium_monthly \
  --output json --pretty > subscription-export.json
bash
gplay subscriptions get \
  --package com.example.app \
  --product-id premium_monthly \
  --output json --pretty > subscription-export.json

2. Extract listings for translation

2. 提取待翻译的列表内容

Use
jq
to isolate the listings:
bash
jq '.listings' subscription-export.json > listings-to-translate.json
使用
jq
工具分离列表内容:
bash
jq '.listings' subscription-export.json > listings-to-translate.json

3. Send for translation

3. 提交翻译

Send
listings-to-translate.json
to your translation service or team. The structure is simple key-value pairs per locale.
listings-to-translate.json
发送给翻译服务或团队,其结构为简单的地区键值对。

4. Merge translated listings back

4. 合并翻译后的列表

After receiving translations, build the update JSON:
bash
jq -n --slurpfile translations translated-listings.json \
  '{ listings: $translations[0] }' > subscription-update.json
收到翻译内容后,构建更新用的JSON文件:
bash
jq -n --slurpfile translations translated-listings.json \
  '{ listings: $translations[0] }' > subscription-update.json

5. Import translated listings

5. 导入翻译后的列表

bash
gplay subscriptions update \
  --package com.example.app \
  --product-id premium_monthly \
  --json @subscription-update.json \
  --update-mask listings
bash
gplay subscriptions update \
  --package com.example.app \
  --product-id premium_monthly \
  --json @subscription-update.json \
  --update-mask listings

Workflow: Bulk-Localize All Subscriptions in an App

工作流:批量本地化应用中的所有订阅

bash
#!/bin/bash
bash
#!/bin/bash

bulk-localize-subscriptions.sh

bulk-localize-subscriptions.sh

PACKAGE="com.example.app" LISTINGS_FILE="subscription-listings.json"
PACKAGE="com.example.app" LISTINGS_FILE="subscription-listings.json"

Get all subscription product IDs

获取所有订阅产品ID

PRODUCT_IDS=$(gplay subscriptions list
--package "$PACKAGE"
--paginate | jq -r '.[].productId')
for PRODUCT_ID in $PRODUCT_IDS; do echo "Updating listings for: $PRODUCT_ID"
gplay subscriptions update
--package "$PACKAGE"
--product-id "$PRODUCT_ID"
--json "@$LISTINGS_FILE"
--update-mask listings
echo "Done: $PRODUCT_ID" done
echo "All subscriptions updated."

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
PRODUCT_IDS=$(gplay subscriptions list
--package "$PACKAGE"
--paginate | jq -r '.[].productId')
for PRODUCT_ID in $PRODUCT_IDS; do echo "正在更新列表:$PRODUCT_ID"
gplay subscriptions update
--package "$PACKAGE"
--product-id "$PRODUCT_ID"
--json "@$LISTINGS_FILE"
--update-mask listings
echo "完成:$PRODUCT_ID" done
echo "所有订阅已更新。"

对于显示名称不同的订阅,可使用按产品划分的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
done

Workflow: Localize Subscription with Base Plans and Offers

工作流:本地化包含基础方案和优惠的订阅

When creating a new subscription with localized listings and base plans in one call:
bash
gplay subscriptions create \
  --package com.example.app \
  --product-id premium_yearly \
  --json @full-subscription.json
full-subscription.json
:
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
          }
        }
      ]
    }
  ]
}
创建新订阅时,可在一次调用中同时设置本地化列表和基础方案:
bash
gplay subscriptions create \
  --package com.example.app \
  --product-id premium_yearly \
  --json @full-subscription.json
full-subscription.json
:
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
          }
        }
      ]
    }
  ]
}

Workflow: Localize Offer Tags

工作流:本地化优惠标签

Offers support localized
offerTags
which can be used for display in your app:
bash
gplay offers update \
  --package com.example.app \
  --product-id premium_monthly \
  --base-plan-id monthly \
  --offer-id free_trial_7d \
  --json @offer-update.json
offer-update.json
:
json
{
  "offerTags": [
    {"tag": "free-trial"},
    {"tag": "7-days"}
  ]
}
Note: Offer tags are not locale-specific in the Google Play API. They are developer-defined identifiers used for filtering in your app. Localize the user-facing text for offer tags in your app code, not in Play Console.
优惠支持本地化的
offerTags
,可用于在您的应用中展示:
bash
gplay offers update \
  --package com.example.app \
  --product-id premium_monthly \
  --base-plan-id monthly \
  --offer-id free_trial_7d \
  --json @offer-update.json
offer-update.json
:
json
{
  "offerTags": [
    {"tag": "free-trial"},
    {"tag": "7-days"}
  ]
}
注意:在Google Play API中,优惠标签不区分地区。它们是开发者定义的标识符,用于在应用中过滤。优惠标签的用户展示文本需在应用代码中本地化,而非在Play Console中设置。

Validate Locale Codes

验证地区代码

Check which locales your app already has store listings for:
bash
EDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output table
This lists all locales with store listings. Your subscription listings should cover at least these same locales.
To see the full list of locales a specific listing supports:
bash
gplay listings list --package com.example.app --edit $EDIT_ID \
  | jq -r '.[].language'
检查您的应用已支持哪些地区的商店列表:
bash
EDIT_ID=$(gplay edits create --package com.example.app | jq -r '.id')
gplay listings list --package com.example.app --edit $EDIT_ID --output table
此命令会列出所有已配置商店列表的地区。您的订阅列表至少应覆盖这些地区。
查看特定列表支持的完整地区列表:
bash
gplay listings list --package com.example.app --edit $EDIT_ID \
  | jq -r '.[].language'

JSON Template: Minimal Multi-locale Subscription

JSON模板:极简多地区订阅

Copy and customize this template for quick localization:
json
{
  "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" }
  }
}
复制并自定义此模板以快速完成本地化:
json
{
  "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" }
  }
}

Agent Behavior

操作规范

  • Always list existing subscriptions and their current listings before making changes.
  • Use
    --update-mask listings
    when updating only localized metadata to avoid overwriting base plans or pricing.
  • When the user provides a single display name, use it for all locales (same name everywhere).
  • When the user provides translated names per locale, use the locale-specific name for each.
  • If benefits or description are provided, include them. Otherwise omit them from the JSON.
  • Use
    --output table
    for verification steps so the user can visually confirm.
  • Use default JSON output for intermediate automation steps.
  • After bulk updates, always get the subscription to verify completeness.
  • If an update fails, log the product ID and error, then continue with remaining subscriptions. Report all failures together at the end.
  • Always confirm exact flags with
    --help
    before running commands.
  • 在进行修改前,始终先列出现有订阅及其当前列表。
  • 仅更新本地化元数据时,使用
    --update-mask listings
    参数,避免覆盖基础方案或定价。
  • 当用户提供单个显示名称时,将其应用于所有地区(全球统一名称)。
  • 当用户提供各地区的翻译名称时,为每个地区使用对应的本地化名称。
  • 若提供了权益或描述,则将其包含在内;否则从JSON中省略。
  • 验证步骤使用
    --output table
    参数,方便用户直观确认。
  • 中间自动化步骤使用默认JSON输出。
  • 批量更新后,始终获取订阅详情以验证完整性。
  • 若更新失败,记录产品ID和错误信息,继续处理剩余订阅,最后统一报告所有失败情况。
  • 运行命令前,始终使用
    --help
    参数确认具体命令的参数。

Notes

注意事项

  • Subscription listings are updated atomically per subscription: one
    update
    call sets all locales at once.
  • Unlike App Store Connect, Google Play does not require separate create calls per locale. The listings object is a single JSON field.
  • The
    --update-mask
    flag is critical: without it, an update call may overwrite base plans and pricing.
  • Title max length: 55 characters. Benefits max: 4 items. Description max: 80 characters.
  • Use
    --paginate
    on list commands to ensure all subscriptions are returned.
  • Use
    --pretty
    when inspecting JSON output for human readability.
  • Always use
    --help
    to verify flags for the exact command.
  • 订阅列表按单个订阅原子更新:一次
    update
    调用可同时设置所有地区的列表。
  • 与App Store Connect不同,Google Play无需为每个地区单独调用创建接口,列表是单个JSON字段。
  • --update-mask
    参数至关重要:若无此参数,更新调用可能会覆盖基础方案和定价。
  • 标题最大长度:55个字符。权益最多:4项。描述最大长度:80个字符。
  • 列表命令使用
    --paginate
    参数以确保返回所有订阅。
  • 查看JSON输出时使用
    --pretty
    参数以提升可读性。
  • 始终使用
    --help
    参数验证具体命令的参数。