Skip to content

Commit

Permalink
CODE: Create group for generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
josefdolezal authored and syky27 committed Nov 26, 2017
1 parent 83b1b5b commit 2446c40
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
10 changes: 9 additions & 1 deletion LunchGuy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@
3525C0CC1CF3BA7F002114A6 /* LunchGuy */ = {
isa = PBXGroup;
children = (
D24D031B1FB612BB0047B028 /* Resources */,
351CFA761CF3D95600D4146A /* ViewControllers */,
3525C1071CF3C6E9002114A6 /* Helpers */,
3525C0FE1CF3BDA1002114A6 /* Model */,
3525C0FB1CF3BC21002114A6 /* Services */,
D24D031B1FB612BB0047B028 /* Resources */,
3525C0CD1CF3BA7F002114A6 /* AppDelegate.swift */,
);
path = LunchGuy;
Expand Down Expand Up @@ -201,6 +201,7 @@
D24D031B1FB612BB0047B028 /* Resources */ = {
isa = PBXGroup;
children = (
D2FC04F61FB63F3E00A4E326 /* Generated */,
3525C0D41CF3BA7F002114A6 /* Assets.xcassets */,
3520D8A71F89AEF40025610B /* LaunchScreen.storyboard */,
3525C0D91CF3BA7F002114A6 /* Info.plist */,
Expand All @@ -220,6 +221,13 @@
path = ExternalApps;
sourceTree = "<group>";
};
D2FC04F61FB63F3E00A4E326 /* Generated */ = {
isa = PBXGroup;
children = (
);
path = Generated;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down
65 changes: 65 additions & 0 deletions LunchGuy/Resources/Generated/LocalizableStrings.Generated.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen

import Foundation

// swiftlint:disable superfluous_disable_command
// swiftlint:disable file_length

// swiftlint:disable explicit_type_interface identifier_name line_length nesting type_body_length type_name
enum L10n {

enum Error {
/// Neočekávaná chyba serveru.
static let invalidResponse = L10n.tr("Localizable", "error.invalid_response")
/// Chyba
static let title = L10n.tr("Localizable", "error.title")
/// Neznámá chyba, zkuste to znovu.
static let unknown = L10n.tr("Localizable", "error.unknown")
}

enum ExternalApp {
/// Apple Maps
static let appleMaps = L10n.tr("Localizable", "external_app.apple_maps")
/// Google Maps
static let googleMaps = L10n.tr("Localizable", "external_app.google_maps")
/// Yelp
static let yelp = L10n.tr("Localizable", "external_app.yelp")
}

enum General {
/// Zrušit
static let cancel = L10n.tr("Localizable", "general.cancel")
/// Ok
static let ok = L10n.tr("Localizable", "general.ok")
}

enum Meal {
/// Vyberte aplikaci, ve které chcete restauraci otevřít.
static let openInApp = L10n.tr("Localizable", "meal.open_in_app")
/// %d Kč
static func price(_ p1: Int) -> String {
return L10n.tr("Localizable", "meal.price", p1)
}
/// Cena není známa
static let priceUnknown = L10n.tr("Localizable", "meal.price_unknown")
}

enum Restaurants {
/// Seznam
static let list = L10n.tr("Localizable", "restaurants.list")
/// Mapa
static let map = L10n.tr("Localizable", "restaurants.map")
/// Restaurace
static let title = L10n.tr("Localizable", "restaurants.title")
}
}
// swiftlint:enable explicit_type_interface identifier_name line_length nesting type_body_length type_name

extension L10n {
private static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
let format = NSLocalizedString(key, tableName: table, bundle: Bundle(for: BundleToken.self), comment: "")
return String(format: format, locale: Locale.current, arguments: args)
}
}

private final class BundleToken {}

0 comments on commit 2446c40

Please sign in to comment.