Sources/OrgCore/Commands/CommandTitle.swift

58f3b73e8ff337e5a15111fbb32c0d57cf2346da
orgstar/Sources/OrgCore/Commands/CommandTitle.swift history · blame · raw

9 lines · 365 bytes

2 symbols in this file
1import Foundation
2
3/// A command's title in the app's language: its entry in the string catalog, keyed by the
4/// English title (see Sources/OrgApp/CommandTitles.swift), or the title itself.
5public enum CommandTitle {
6    public static func localized(_ title: String) -> String {
7        Bundle.main.localizedString(forKey: title, value: title, table: nil)
8    }
9}