Skip to content

Feature Request: localized files should show development language first #3190

@marcelofabri

Description

@marcelofabri

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

func sortLocalizedFilesByNameAndRegion(
lhs: GroupChild.LocalizedFile,
rhs: GroupChild.LocalizedFile
) -> Bool {
let l = "\(lhs.name)\t\(lhs.region)"
let r = "\(rhs.name)\t\(rhs.region)"
return l.localizedCompare(r) == .orderedAscending
}
.

This should prioritize the development_region so it comes first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions