#Screenshot Tools
Tools for translating and resizing app screenshots for App Store localization.
#Overview
The screenshot workflow consists of two separate tools:
- translate-screenshots: Translates text in screenshots using Gemini API
- resize-screenshots: Resizes translated screenshots to App Store dimensions
This separation allows for:
- Reviewing raw translated images before final processing
- Re-running resize without re-translating (saves API costs)
- Using different resize settings for different locales
#Workflow
1. translate-screenshots β saves to raw/ folder
2. resize-screenshots β reads from raw/, saves to final location
#Directory Structure
public/products/{app-slug}/screenshots/
βββ en-US/ # Source (primary locale)
β βββ phone/
β βββ 1.png
β βββ 2.png
βββ ko-KR/
β βββ phone/
β βββ raw/ # Translated (not resized)
β β βββ 1.png
β β βββ 2.png
β βββ 1.png # Final (resized)
β βββ 2.png
βββ ja-JP/
βββ phone/
βββ raw/
βββ ...
#translate-screenshots
Translates text in app screenshots to multiple languages using Gemini API.
#Requirements
GEMINI_API_KEYorGOOGLE_API_KEYenvironment variable- Source screenshots in:
public/products/{slug}/screenshots/{locale}/phone/and/tablet/ - Locale files in:
public/products/{slug}/locales/
#Model Selection
imageModel: "flash"(default) usesgemini-3.1-flash-image-previewfor speed/cost efficiencyimageModel: "pro"usesgemini-3-pro-image-previewfor higher instruction fidelity
#Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appName | string | Yes | - | App name, slug, bundleId, or packageName |
| targetLocales | string[] | No | All locales | Specific locales to translate to |
| deviceTypes | ("phone" | "tablet")[] | No | ["phone", "tablet"] | Device types to process |
| dryRun | boolean | No | false | Preview mode without actual translation |
| skipExisting | boolean | No | true | Skip if raw file already exists |
| screenshotNumbers | number[] | No | All | Specific screenshots to process |
| preserveWords | string[] | No | - | Words to keep untranslated (brand names) |
| imageModel | ("flash" | "pro") | No | "flash" | Gemini image model preference |
#Example Usage
{
"appName": "my-app",
"targetLocales": ["ko-KR", "ja-JP"],
"deviceTypes": ["phone"],
"preserveWords": ["MyApp", "Pro"],
"imageModel": "pro"
}
#Supported Languages
Gemini API supports: English, Arabic, German, Spanish, French, Hindi, Indonesian, Italian, Japanese, Korean, Portuguese, Russian, Ukrainian, Vietnamese, Chinese.
#resize-screenshots
Resizes translated screenshots to App Store dimensions.
#Target Dimensions
| Device | Width | Height | Ratio |
|---|---|---|---|
| Phone | 1242 | 2688 | 6.5" iPhone |
| Tablet | 2048 | 2732 | 12.9" iPad Pro |
#Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appName | string | Yes | - | App name, slug, bundleId, or packageName |
| sourceLocale | string | No | Primary locale | Locale for dimension reference |
| targetLocales | string[] | No | All with raw/ | Locales to resize |
| deviceTypes | ("phone" | "tablet")[] | No | ["phone", "tablet"] | Device types to process |
| screenshotNumbers | number[] | No | All | Specific screenshots to process |
| skipExisting | boolean | No | false | Skip if final file exists |
| dryRun | boolean | No | false | Preview mode |
#Background Color
The resize tool fills empty space with a background color. You can configure this in config.json:
{
"metadata": {
"screenshotBgColor": "#FFFFFF"
}
}
If not specified, the tool auto-detects the dominant color from image corners.
#Example Usage
{
"appName": "my-app",
"targetLocales": ["ko-KR"],
"deviceTypes": ["phone"]
}
#Configuration
#config.json
Add screenshot settings to your product's config.json:
{
"slug": "my-app",
"metadata": {
"screenshotBgColor": "#000000"
}
}