#Screenshot Tools

Tools for translating and resizing app screenshots for App Store localization.

#Overview

The screenshot workflow consists of two separate tools:

  1. translate-screenshots: Translates text in screenshots using Gemini API
  2. 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_KEY or GOOGLE_API_KEY environment variable
  • Source screenshots in: public/products/{slug}/screenshots/{locale}/phone/ and /tablet/
  • Locale files in: public/products/{slug}/locales/

#Model Selection

  • imageModel: "flash" (default) uses gemini-3.1-flash-image-preview for speed/cost efficiency
  • imageModel: "pro" uses gemini-3-pro-image-preview for higher instruction fidelity

#Input Parameters

ParameterTypeRequiredDefaultDescription
appNamestringYes-App name, slug, bundleId, or packageName
targetLocalesstring[]NoAll localesSpecific locales to translate to
deviceTypes("phone" | "tablet")[]No["phone", "tablet"]Device types to process
dryRunbooleanNofalsePreview mode without actual translation
skipExistingbooleanNotrueSkip if raw file already exists
screenshotNumbersnumber[]NoAllSpecific screenshots to process
preserveWordsstring[]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

DeviceWidthHeightRatio
Phone124226886.5" iPhone
Tablet2048273212.9" iPad Pro

#Input Parameters

ParameterTypeRequiredDefaultDescription
appNamestringYes-App name, slug, bundleId, or packageName
sourceLocalestringNoPrimary localeLocale for dimension reference
targetLocalesstring[]NoAll with raw/Locales to resize
deviceTypes("phone" | "tablet")[]No["phone", "tablet"]Device types to process
screenshotNumbersnumber[]NoAllSpecific screenshots to process
skipExistingbooleanNofalseSkip if final file exists
dryRunbooleanNofalsePreview 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"
  }
}