Skip to content

auto translation of hero image added#136

Merged
floriangeigl merged 2 commits into
mainfrom
dev
Mar 21, 2026
Merged

auto translation of hero image added#136
floriangeigl merged 2 commits into
mainfrom
dev

Conversation

@floriangeigl

@floriangeigl floriangeigl commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • App name now translates naturally per language while preserving brand separator.
    • User guides include per-language hero images and updated localized image references.
  • Chores

    • Translation and image-generation workflows improved with per-language processing, error handling, cleanup, and image sizing.
    • Image compression workflow trigger and run labeling simplified to manual dispatch.

@coderabbitai

coderabbitai Bot commented Mar 21, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0dc4b8ab-55a1-4d10-bbd1-e68e1a4d3c47

📥 Commits

Reviewing files that changed from the base of the PR and between e24aa1f and 5cd3b5f.

📒 Files selected for processing (3)
  • .github/codex/prompts/translate-content.md
  • .github/workflows/image_compression.yml
  • .github/workflows/translate-content.yml

📝 Walkthrough

Walkthrough

Localized hero-image generation and referencing were added: translation guidance for the app name was relaxed, the translate workflow now generates per-language hero images via the OpenAI image-edit API and ImageMagick, and the hosting workflow copies those images and rewrites translated markdown to reference language-specific hero files.

Changes

Cohort / File(s) Summary
Translation prompt
\.github/codex/prompts/translate-content.md
Removed hard "Do Not Translate" rule for the app name; now marks Meditation & Breathwork as an app-name term to be translated naturally per target language while preserving the & separator and includes German/French examples.
Image generation workflow
\.github/workflows/translate-content.yml
Added userGuideScreenshots/hero_meditate.png to push triggers; installs ImageMagick; pads source image, loops over a language map calling OpenAI Images Edits (gpt-image-1); decodes/crops/resizes outputs to generated/HeroImages/hero_meditate-${lang}.png; per-language error handling and cleanup.
Hosting / docs integration
\.github/workflows/host-user-guide.yml
Copies generated per-language hero images into meditate_app_user_guide/userGuideScreenshots/; updates translated markdown pages to reference hero_meditate-${lang}.png instead of hero_meditate.png where per-language pages exist.
Image compression trigger
\.github/workflows/image_compression.yml
Changed trigger from pull_request -> workflow_dispatch; removed explicit ref: ${{ github.head_ref }} in checkout; display name/run-name updated. No changes to compression logic.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions (translate-content)
  participant IM as ImageMagick
  participant API as OpenAI Images Edit (gpt-image-1)
  participant Repo as Repository (generated/HeroImages)
  participant Host as GitHub Actions (host-user-guide)

  GH->>IM: pad source hero_meditate.png to 1536x1024
  loop per language
    GH->>API: POST edit request with prompt + padded image
    API-->>GH: response (base64 image or .error.message)
    alt success
      GH->>GH: decode, crop center to 1536x768, resize to 1440x720
      GH->>Repo: write generated/HeroImages/hero_meditate-${lang}.png
    else error
      GH-->>GH: emit warning, skip language
    end
  end
  Host->>Repo: copy hero_meditate-${lang}.png -> userGuideScreenshots/
  Host->>Repo: update translated markdown image refs to hero_meditate-${lang}.png
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through workflows, nibbling code and light,

I shaped each hero image for languages bright,
From pad to API to cropped, shiny art,
Now every guide has its own world to start,
Hop, translate, breathe — a tiny rabbit's delight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'auto translation of hero image added' directly and clearly describes the main change: automation of hero image translation across languages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@floriangeigl floriangeigl merged commit ada4739 into main Mar 21, 2026
This was referenced Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant