MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj

Feature Request: localized files should show development language first

Open
#3,190 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Swift
Stars
626
Forks
124
PR merge metrics
No merged PRs in 30d

Description

When selecting a localizable resource in Xcode, it'll open the first child in the editor. For example, in this case, German would be selected, even though English is the development_region

FE8B8034E620558750E6FA6E /* Localizable.strings */ = {
	isa = PBXVariantGroup;
	children = (
		FE2D9597E277009F181546EF /* de_DE */,
		FE25341A421B0B0E41DAB09F /* en */,
		FE590DC612E9434C2903CD02 /* es_ES */
	);
	name = "Localizable.strings";
	sourceTree = "<group>";
};

As far as I can tell, rules_xcodeproj sorts the languages alphabetically in https://github.com/MobileNativeFoundation/rules_xcodeproj/blob/637a94211aa7528ef92335b51825bf596b93bcf5/tools/generators/files_and_groups/src/ElementCreator/CreateGroupChildElements.swift#L75-L82.

This should prioritize the development_region so it comes first.

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 in tools/generators/files_and_groups/src/ElementCreator/CreateGroupChildElements.swift around lines 75-82, where localized child languages are sorted. Check how the development_region from the project options is available, then verify that it is placed first in the generated PBXVariantGroup while other languages retain their ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.