Skip to content

Does not pick Localized Assets images #33

Description

@jrmgx

Hello, it seems there is a bug, or something I don't understand.

~/Projets/wikireveal-mobile/apple/AppStore % tree
.
├── Localizable.xcstrings
├── screenshots
│   ├── en
│   │   ├── ipad
│   │   │   ├── 01.png
│   │   │   ├── 01W.png
│   │   │   ├── 02.png
│   │   │   ├── 03.png
│   │   │   ├── 04.png
│   │   │   └── 04H.png
│   │   └── iphone
│   │       ├── 01.png
│   │       ├── 01W.png
│   │       ├── 02.png
│   │       ├── 03.png
│   │       ├── 04.png
│   │       └── 04H.png
│   ├── es
│   │   ├── ipad
│   │   │   ├── 01.png
│   │   │   ├── 01W.png
│   │   │   ├── 02.png
│   │   │   ├── 03.png
│   │   │   ├── 04.png
│   │   │   └── 04H.png
│   │   └── iphone
│   │       ├── 01.png
│   │       ├── 01W.png
│   │       ├── 02.png
│   │       ├── 03.png
│   │       ├── 04.png
│   │       └── 04H.png
│   ├── fr
│   │   ├── ipad
│   │   │   ├── 01.png
│   │   │   ├── 01W.png
│   │   │   ├── 02.png
│   │   │   ├── 03.png
│   │   │   └── 04.png
│   │   └── iphone
│   │       ├── 01.png
│   │       ├── 01W.png
│   │       ├── 02.png
│   │       ├── 03.png
│   │       ├── 03C.png
│   │       ├── 04.png
│   │       └── 04H.png
│   ├── ipad
│   │   ├── 01.png
│   │   ├── 01W.png
│   │   ├── 02.png
│   │   ├── 03.png
│   │   ├── 04.png
│   │   └── 04H.png
│   └── iphone
│       ├── 01.png
│       ├── 01W.png
│       ├── 02.png
│       ├── 03.png
│       ├── 04.png
│       └── 04H.png
├── screenshots_ipad.yaml
└── screenshots.yaml
~/Projets/wikireveal-mobile/apple/AppStore % cat screenshots.yaml
project:
  name: WikiReveal
  device: iPhone 17 - Black - Portrait
  output_dir: generated
  output_size: iPhone6_5

defaults:
  background:
    colors:
      - "#E8F0FE"
      - "#F8FBFF"
    direction: 180
    type: linear

localization:
  base_language: "en-US"
  languages: ["en-US", "es-ES", "fr-FR"]

screenshots:
  text_top_01:
    content:
      - type: image
        asset:
          en: "screenshots/en/iphone/01W.png"
          es: "screenshots/es/iphone/01W.png"
          fr: "screenshots/fr/iphone/01W.png"
          # default: "screenshots/iphone/01W.png"
        frame: true
        scale: 1
        position:
          - 50%
          - 50%

  text_top_02:
    content:
      - type: text
        content: Find the Redacted Words
        size: 100
        color: "#000000"
        weight: bold
        alignment: center
        position:
          - 50%
          - 10%
      - type: image
        asset:
          en: "screenshots/en/iphone/02.png"
          es: "screenshots/es/iphone/02.png"
          fr: "screenshots/fr/iphone/02.png"
          # default: "screenshots/iphone/02.png"
        frame: true
        scale: 1
        position:
          - 50%
          - 65%

  text_top_03:
    content:
      - type: text
        content: Step by Step
        size: 100
        color: "#000000"
        weight: bold
        alignment: center
        position:
          - 50%
          - 10%
      - type: image
        asset:
          en: "screenshots/en/iphone/03.png"
          es: "screenshots/es/iphone/03.png"
          fr: "screenshots/fr/iphone/03.png"
          # default: "screenshots/iphone/03.png"
        frame: true
        scale: 1
        position:
          - 50%
          - 65%

  text_top_04:
    content:
      - type: text
        content: Until the Big Reveal
        size: 100
        color: "#000000"
        weight: bold
        alignment: center
        position:
          - 50%
          - 10%
      - type: image
        asset:
          en: "screenshots/en/iphone/04.png"
          es: "screenshots/es/iphone/04.png"
          fr: "screenshots/fr/iphone/04.png"
          # default: "screenshots/iphone/04.png"
        frame: true
        scale: 1
        position:
          - 50%
          - 65%
~/Projets/wikireveal-mobile/apple/AppStore % kou generate screenshots.yaml
Using flexible content-based API
Using YAML output directory: generated
[09:50:17] INFO     Loaded metadata for 6 device frames
Starting generation...
           INFO     🚀 Starting project: WikiReveal
           INFO     📁 Output directory: generated
           INFO     🎯 Screenshots to generate: 4
           INFO     🌍 Multi-language mode: 3 languages
           INFO     📝 Languages: en-US, es-ES, fr-FR
           INFO     🔤 Found 3 unique text keys
           INFO     📝 Updating XCStrings file with new keys
           INFO     Loaded XCStrings file: Localizable.xcstrings
           INFO     No new keys to add to XCStrings file
           INFO     📱 Processing device: iPhone 17 - Black - Portrait
           INFO     📐 Output size: (1242, 2688)
           INFO     🌐 Generating screenshots for device: iPhone 17 - Black - Portrait, language: en-US
           INFO     [iPhone 17 - Black - Portrait] [en-US] [1/4] text_top_01
           INFO     📏 Image: scale=100%, position=('50%', '50%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_01 for iPhone 17 - Black - Portrait/en-US: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [en-US] [2/4] text_top_02
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_02 for iPhone 17 - Black - Portrait/en-US: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [en-US] [3/4] text_top_03
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_03 for iPhone 17 - Black - Portrait/en-US: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [en-US] [4/4] text_top_04
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_04 for iPhone 17 - Black - Portrait/en-US: Image asset path is empty or missing
           INFO     🌐 Generating screenshots for device: iPhone 17 - Black - Portrait, language: es-ES
           INFO     [iPhone 17 - Black - Portrait] [es-ES] [1/4] text_top_01
           INFO     📏 Image: scale=100%, position=('50%', '50%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_01 for iPhone 17 - Black - Portrait/es-ES: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [es-ES] [2/4] text_top_02
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_02 for iPhone 17 - Black - Portrait/es-ES: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [es-ES] [3/4] text_top_03
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_03 for iPhone 17 - Black - Portrait/es-ES: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [es-ES] [4/4] text_top_04
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_04 for iPhone 17 - Black - Portrait/es-ES: Image asset path is empty or missing
           INFO     🌐 Generating screenshots for device: iPhone 17 - Black - Portrait, language: fr-FR
           INFO     [iPhone 17 - Black - Portrait] [fr-FR] [1/4] text_top_01
           INFO     📏 Image: scale=100%, position=('50%', '50%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_01 for iPhone 17 - Black - Portrait/fr-FR: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [fr-FR] [2/4] text_top_02
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_02 for iPhone 17 - Black - Portrait/fr-FR: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [fr-FR] [3/4] text_top_03
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_03 for iPhone 17 - Black - Portrait/fr-FR: Image asset path is empty or missing
           INFO     [iPhone 17 - Black - Portrait] [fr-FR] [4/4] text_top_04
           INFO     📏 Image: scale=100%, position=('50%', '65%'), alignment=center, frame=True, rotation=0°
           ERROR    Source image not found:
           ERROR    Failed to generate text_top_04 for iPhone 17 - Black - Portrait/fr-FR: Image asset path is empty or missing
           INFO     🎉 Project complete! Generated 0 screenshots for iPhone 17 - Black - Portrait across 3 language(s)
             Generation Results
┏━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Screenshot  ┃ Status ┃ Output Path       ┃
┡━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ text_top_01 │ Failed │ Generation failed │
│ text_top_02 │ Failed │ Generation failed │
│ text_top_03 │ Failed │ Generation failed │
│ text_top_04 │ Failed │ Generation failed │
└─────────────┴────────┴───────────────────┘

Output directory: /Users/jerome/Projets/wikireveal-mobile/apple/AppStore/generated

4 screenshot(s) failed to generate
Unexpected error: 1

So, it does not work in this state, if I do add default on asset it works but will only pick the default version.
Before I was using the automatic Localized Assets directory structure, but same problem it was only going for the default, that's why i moved to asset with specified lang in the yaml.

Anything I missed?
Koubou v0.19.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions