Sources/OrgCore/Commands/CommandTitle.swift
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}