Skip to content
This repository was archived by the owner on Sep 6, 2019. It is now read-only.

Generate ids for localizable strings and images #50

@Shulepov

Description

@Shulepov

I'm not sure that this functionality should be placed directly inside Natalie, may be should be created a different tool.

Generating identifiers for storyboards stuff definitely is a good step :) But there are also quite a lot of magic strings in the project - for localizable strings (NSLocalizedString("Hello", ...)) or for images UIImage(named: "Logo"), and other files in the bundle.

So, may be also can be generated analogue of R file on android. So, for strings and images can be generated something like:

struct Strings {
     static let Hello = "Hello"
}
struct Images {
    static let Logo = "Logo"
}

And for convenience:

struct LocalizedString {
     static var Hello = { return NSLocalizedString(Strings.hello, ...) }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions