gplay-metadata-sync

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Metadata Sync for Google Play

Google Play 元数据同步

Use this skill when you need to update or sync Play Store metadata and localizations.
当你需要更新或同步Play商店的元数据与本地化内容时,可以使用该技能。

Fastlane Directory Structure

Fastlane 目录结构

fastlane/metadata/android/
├── en-US/
│   ├── title.txt
│   ├── short_description.txt
│   ├── full_description.txt
│   ├── video.txt
│   └── images/
│       ├── phoneScreenshots/
│       │   ├── 1.png
│       │   └── 2.png
│       ├── sevenInchScreenshots/
│       ├── tenInchScreenshots/
│       ├── tvScreenshots/
│       ├── wearScreenshots/
│       ├── icon.png
│       └── featureGraphic.png
├── es-ES/
│   ├── title.txt
│   └── ...
└── fr-FR/
    └── ...
fastlane/metadata/android/
├── en-US/
│   ├── title.txt
│   ├── short_description.txt
│   ├── full_description.txt
│   ├── video.txt
│   └── images/
│       ├── phoneScreenshots/
│       │   ├── 1.png
│       │   └── 2.png
│       ├── sevenInchScreenshots/
│       ├── tenInchScreenshots/
│       ├── tvScreenshots/
│       ├── wearScreenshots/
│       ├── icon.png
│       └── featureGraphic.png
├── es-ES/
│   ├── title.txt
│   └── ...
└── fr-FR/
    └── ...

Export Metadata from Play Store

从Play商店导出元数据

bash
undefined
bash
undefined

Export all listings to Fastlane format

Export all listings to Fastlane format

gplay sync export-listings
--package com.example.app
--dir ./fastlane/metadata/android
gplay sync export-listings
--package com.example.app
--dir ./fastlane/metadata/android

Export images

Export images

gplay sync export-images
--package com.example.app
--dir ./fastlane/metadata/android
undefined
gplay sync export-images
--package com.example.app
--dir ./fastlane/metadata/android
undefined

Import Metadata to Play Store

向Play商店导入元数据

bash
undefined
bash
undefined

Validate before importing (offline check)

Validate before importing (offline check)

gplay validate listing
--dir ./fastlane/metadata/android
--locale en-US
gplay validate listing
--dir ./fastlane/metadata/android
--locale en-US

Import all listings

Import all listings

gplay sync import-listings
--package com.example.app
--dir ./fastlane/metadata/android
gplay sync import-listings
--package com.example.app
--dir ./fastlane/metadata/android

Import images

Import images

gplay sync import-images
--package com.example.app
--dir ./fastlane/metadata/android
undefined
gplay sync import-images
--package com.example.app
--dir ./fastlane/metadata/android
undefined

Compare Local vs Remote

对比本地与远程内容

bash
undefined
bash
undefined

See what would change

See what would change

gplay sync diff-listings
--package com.example.app
--dir ./fastlane/metadata/android
undefined
gplay sync diff-listings
--package com.example.app
--dir ./fastlane/metadata/android
undefined

Manual Metadata Management

手动元数据管理

List all listings

列出所有列表内容

bash
gplay listings list \
  --package com.example.app \
  --edit $EDIT_ID
bash
gplay listings list \
  --package com.example.app \
  --edit $EDIT_ID

Get specific locale

获取特定区域内容

bash
gplay listings get \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US
bash
gplay listings get \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US

Update listing

更新列表内容

bash
gplay listings update \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --json @listing.json
bash
gplay listings update \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --json @listing.json

listing.json format

listing.json 格式

json
{
  "title": "My Awesome App",
  "shortDescription": "A short description under 80 characters",
  "fullDescription": "A full description under 4000 characters...",
  "video": "https://www.youtube.com/watch?v=VIDEO_ID"
}
json
{
  "title": "My Awesome App",
  "shortDescription": "A short description under 80 characters",
  "fullDescription": "A full description under 4000 characters...",
  "video": "https://www.youtube.com/watch?v=VIDEO_ID"
}

Image Management

图片管理

Upload screenshots

上传截图

bash
gplay images upload \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --file screenshot1.png

gplay images upload \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --file screenshot2.png
bash
gplay images upload \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --file screenshot1.png

gplay images upload \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --file screenshot2.png

Image types

图片类型

  • phoneScreenshots
    - Phone screenshots (required)
  • sevenInchScreenshots
    - 7" tablet screenshots
  • tenInchScreenshots
    - 10" tablet screenshots
  • tvScreenshots
    - TV screenshots
  • wearScreenshots
    - Wear OS screenshots
  • icon
    - App icon
  • featureGraphic
    - Feature graphic (1024x500)
  • phoneScreenshots
    - 手机截图(必填)
  • sevenInchScreenshots
    - 7英寸平板截图
  • tenInchScreenshots
    - 10英寸平板截图
  • tvScreenshots
    - TV截图
  • wearScreenshots
    - Wear OS截图
  • icon
    - 应用图标
  • featureGraphic
    - 特色宣传图(1024x500)

List images

列出图片

bash
gplay images list \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots
bash
gplay images list \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots

Delete image

删除图片

bash
gplay images delete \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --image-id IMAGE_ID \
  --confirm
bash
gplay images delete \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --image-id IMAGE_ID \
  --confirm

App Details

应用详情

Get app details

获取应用详情

bash
gplay details get \
  --package com.example.app \
  --edit $EDIT_ID
bash
gplay details get \
  --package com.example.app \
  --edit $EDIT_ID

Update contact info

更新联系信息

bash
gplay details update \
  --package com.example.app \
  --edit $EDIT_ID \
  --contact-email support@example.com \
  --contact-phone "+1234567890" \
  --contact-website "https://example.com"
bash
gplay details update \
  --package com.example.app \
  --edit $EDIT_ID \
  --contact-email support@example.com \
  --contact-phone "+1234567890" \
  --contact-website "https://example.com"

Character Limits

字符限制

Validate against Google Play limits:
FieldLimit
Title50 characters
Short Description80 characters
Full Description4000 characters
bash
undefined
对照Google Play的限制进行验证:
字段限制
标题50个字符
简短描述80个字符
完整描述4000个字符
bash
undefined

Validate before upload

Validate before upload

gplay validate listing
--dir ./fastlane/metadata/android
--locale en-US
undefined
gplay validate listing
--dir ./fastlane/metadata/android
--locale en-US
undefined

Workflow Example

工作流示例

Complete metadata update workflow:
bash
undefined
完整的元数据更新工作流:
bash
undefined

1. Export current metadata

1. 导出当前元数据

gplay sync export-listings
--package com.example.app
--dir ./metadata
gplay sync export-listings
--package com.example.app
--dir ./metadata

2. Edit files locally

2. 本地编辑文件

vi ./metadata/en-US/full_description.txt
vi ./metadata/en-US/full_description.txt

3. Validate changes

3. 验证更改

gplay validate listing
--dir ./metadata
--locale en-US
gplay validate listing
--dir ./metadata
--locale en-US

4. See what will change

4. 查看即将发生的更改

gplay sync diff-listings
--package com.example.app
--dir ./metadata
gplay sync diff-listings
--package com.example.app
--dir ./metadata

5. Import changes

5. 导入更改

gplay sync import-listings
--package com.example.app
--dir ./metadata
undefined
gplay sync import-listings
--package com.example.app
--dir ./metadata
undefined

Multi-Locale Management

多区域管理

Create new locale

创建新区域

  1. Copy existing locale directory:
    bash
    cp -r fastlane/metadata/android/en-US fastlane/metadata/android/es-ES
  2. Translate all text files
  3. Import:
    bash
    gplay sync import-listings \
      --package com.example.app \
      --dir ./fastlane/metadata/android
  1. 复制现有区域目录:
    bash
    cp -r fastlane/metadata/android/en-US fastlane/metadata/android/es-ES
  2. 翻译所有文本文件
  3. 导入:
    bash
    gplay sync import-listings \
      --package com.example.app \
      --dir ./fastlane/metadata/android

Supported Locales

支持的区域代码

Use Play Console locale codes:
  • en-US
    - English (United States)
  • es-ES
    - Spanish (Spain)
  • fr-FR
    - French (France)
  • de-DE
    - German (Germany)
  • ja-JP
    - Japanese (Japan)
  • etc.
使用Play控制台的区域代码:
  • en-US
    - 英语(美国)
  • es-ES
    - 西班牙语(西班牙)
  • fr-FR
    - 法语(法国)
  • de-DE
    - 德语(德国)
  • ja-JP
    - 日语(日本)
  • 等等

Best Practices

最佳实践

  1. Keep metadata in version control - Track changes over time
  2. Validate before importing - Catch character limit errors
  3. Use consistent formatting - Follow style guide
  4. Test on different devices - Screenshots should represent actual app
  5. Update regularly - Keep descriptions current with features
  6. Localize properly - Don't use machine translation without review
  1. 将元数据纳入版本控制 - 跟踪随时间的变更
  2. 导入前先验证 - 捕获字符限制错误
  3. 使用统一格式 - 遵循风格指南
  4. 在不同设备上测试 - 截图应真实反映应用情况
  5. 定期更新 - 保持描述与功能同步
  6. 正确本地化 - 不要未经审核就使用机器翻译