yonaskolb / yonaskolb/XcodeGen

Localized `strings` resources are not detected correctly

Open
#763 10 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

Description

I seem to be hitting the exact same issue as #80, namely that my Localizable.strings(dict) files (and InfoPlist.strings files) are not detected correctly and seen as loose files:

Screenshot 2020-01-29 at 02 19 00

As you can see, strings files for storyboards are seen correctly, whereas normal strings files are not seen as language variations of the same file.

The directory structure is correct though:

Application
  - Resources
    - Base.lproj
      - Authentication.storyboard
      - ... (only .storyboard files)
    - en.lproj
      - Authentication.strings
      - ... (other .strings files for storyboards)
      - InfoPlist.strings
      - Localizable.strings
      - Localizable.stringsdict
    - fr.lproj
      - Authentication.strings
      - ... (other .strings files for storyboards)
      - InfoPlist.strings
      - Localizable.strings
      - Localizable.stringsdict

My project file (mostly, the relevant bits):

name: MultiSelector
targets:
  MultiSelector:
    type: application
    platform: iOS
    sources:
      - Application
    settings:
      base:
        INFOPLIST_FILE: Application/Resources/Info.plist
        PRODUCT_NAME: $(TARGET_NAME)
        SWIFT_VERSION: 5.0

Also tried using XcodeGen in another project, same issue, which is worse there 'cause that project has +-10 languages.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the sources entry in the shown project YAML and compare how storyboard .strings files are detected with InfoPlist.strings, Localizable.strings, and Localizable.stringsdict under the en.lproj and fr.lproj directories. Done means these files are grouped as language variations rather than reported as loose files, including when the project is generated from XcodeGen.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.