Skip to content

Comments in localisable string entries #4

@ctxppc

Description

@ctxppc

Silica should insert documentation comments next to the localisable string entries.

The following example:

/// A title used on an item in the tab bar.
enum TabItemTitle : LocalisableString {
    
    /// The tab title for popular videos in the user's vicinity.
    case nearby
    
    /// The tab title for videos popular with the user's friends.
    case friends
    
    /// The tab title for all-time popular videos.
    case allTime
    
}

/// A title used in a screen mentioning the user.
enum UserTitle : LocalisableString {
    
    /// The user isn't logged in.
    case notLoggedIn
    
    /// The user is logged in as `nickname`.
    case loggedIn(nickname: String)
    
}

should emit the following localisable string entries file:

/** TabItemTitle — A title used on an item in the tab bar. **/

/** The tab title for popular videos in the user's vicinity. **/
"TabItemTitle.nearby" = ""

/** The tab title for videos popular with the user's friends. **/
"TabItemTitle.friends" = ""

/** The tab title for all-time popular videos. **/
"TabItemTitle.allTime" = ""

/** UserTitle — A title used in a screen mentioning the user. **/

/** The user isn't logged in. **/
"UserTitle.notLoggedIn" = ""

/** The user is logged in as `nickname`. **/
"UserTitle.loggedIn(nickname: %@)" = ""

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions