CocoaPods / CocoaPods/Xcodeproj

Provide support for localised resources

Open
#85 14 comments 0 reactions 0 assignees View on GitHub
d2:moderate s2:confirmed t1:enhancement
Dominant language
Ruby
Stars
2.4k
Forks
488
PR merge metrics
No merged PRs in 30d

Description

An example project, created with regular Xcode, contains two localized `Localizable.strings` files:

![xcode](https://f.cloud.github.com/assets/218289/1050681/bc9f3908-10bd-11e3-90bb-13f370d6e3c1.png)

When inspecting the project with `xcodeproj show ...`, it will list localized files like this:

```
- Resources:
- Localizable.strings:
- en
- nl
```

The underlying `Localizable.strings`-files are actually in two folders called en.lproj and nl.lproj:

![finder](https://f.cloud.github.com/assets/218289/1050708/26f45b9e-10be-11e3-91af-5cce729c5635.png)

When trying to mimic this setup, with the same underlying paths I add them like this:

```
project.new_file('Resources/en.lproj/Localizable.strings', 'Resources/Localizable.strings/en')
```

But the result is different from the way Xcode treats these special cases:

![xcodeproj](https://f.cloud.github.com/assets/218289/1050680/bca1477a-10bd-11e3-8e11-6f2efaee416c.png)

Would you know how to add these files, so Xcode treats them the same way, as when you add them the old-fashioned way?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the `project.new_file` entry point for paths such as `Resources/en.lproj/Localizable.strings` and the `Resources/Localizable.strings/en` group. Compare its project representation with the localized resources shown by `xcodeproj show`; done means both localized files are represented the way Xcode creates them.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.