|
1 | 1 | // ----------------------------------------------------------------------
|
2 | 2 | // File generated by NStack Translations Generator.
|
3 | 3 | //
|
4 |
| -// Copyright (c) 2018 Nodes ApS |
| 4 | +// Copyright (c) 2019 Nodes ApS |
5 | 5 | //
|
6 | 6 | // Permission is hereby granted, free of charge, to any person obtaining
|
7 | 7 | // a copy of this software and associated documentation files (the
|
|
24 | 24 | // ----------------------------------------------------------------------
|
25 | 25 |
|
26 | 26 | import Foundation
|
27 |
| -import TranslationManager |
28 |
| - |
29 |
| -public final class SKTranslations: LocalizableModel { |
30 |
| - public var oneMoreSection = OneMoreSection() |
31 |
| - public var defaultSection = DefaultSection() |
32 |
| - public var otherSection = OtherSection() |
33 |
| - |
34 |
| - enum CodingKeys: String, CodingKey { |
35 |
| - case oneMoreSection |
36 |
| - case defaultSection = "default" |
37 |
| - case otherSection |
38 |
| - } |
39 |
| - |
40 |
| - public override init() { super.init() } |
41 |
| - |
42 |
| - public required init(from decoder: Decoder) throws { |
43 |
| - super.init() |
44 |
| - let container = try decoder.container(keyedBy: CodingKeys.self) |
45 |
| - oneMoreSection = try container.decodeIfPresent(OneMoreSection.self, forKey: .oneMoreSection) ?? oneMoreSection |
46 |
| - defaultSection = try container.decodeIfPresent(DefaultSection.self, forKey: .defaultSection) ?? defaultSection |
47 |
| - otherSection = try container.decodeIfPresent(OtherSection.self, forKey: .otherSection) ?? otherSection |
48 |
| - } |
49 |
| - |
50 |
| - public override subscript(key: String) -> LocalizableSection? { |
51 |
| - switch key { |
52 |
| - case CodingKeys.oneMoreSection.stringValue: return oneMoreSection |
53 |
| - case CodingKeys.defaultSection.stringValue: return defaultSection |
54 |
| - case CodingKeys.otherSection.stringValue: return otherSection |
55 |
| - default: return nil |
56 |
| - } |
57 |
| - } |
58 |
| - |
59 |
| - public final class OneMoreSection: LocalizableSection { |
60 |
| - public var soManyKeys = "" |
61 |
| - public var test1 = "" |
62 |
| - public var test2 = "" |
63 |
| - |
64 |
| - enum CodingKeys: String, CodingKey { |
65 |
| - case soManyKeys |
66 |
| - case test1 |
67 |
| - case test2 |
68 |
| - } |
69 |
| - |
70 |
| - public override init() { |
71 |
| - super.init() |
72 |
| - soManyKeys = "\(classNameLowerCased()).soManyKeys" |
73 |
| - test1 = "\(classNameLowerCased()).test1" |
74 |
| - test2 = "\(classNameLowerCased()).test2" |
75 |
| - } |
76 |
| - |
77 |
| - public required init(from decoder: Decoder) throws { |
78 |
| - super.init() |
79 |
| - let container = try decoder.container(keyedBy: CodingKeys.self) |
80 |
| - soManyKeys = try container.decodeIfPresent(String.self, forKey: .soManyKeys) ?? "__soManyKeys" |
81 |
| - test1 = try container.decodeIfPresent(String.self, forKey: .test1) ?? "__test1" |
82 |
| - test2 = try container.decodeIfPresent(String.self, forKey: .test2) ?? "__test2" |
83 |
| - } |
84 |
| - |
85 |
| - public override subscript(key: String) -> String? { |
86 |
| - return "" |
87 |
| - } |
88 |
| - } |
89 |
| - |
90 |
| - public final class DefaultSection: LocalizableSection { |
91 |
| - public var emptyKey = "" |
92 |
| - public var keyys = "" |
93 |
| - public var successKey = "" |
94 |
| - |
95 |
| - enum CodingKeys: String, CodingKey { |
96 |
| - case emptyKey |
97 |
| - case keyys |
98 |
| - case successKey |
99 |
| - } |
100 |
| - |
101 |
| - public override init() { |
102 |
| - super.init() |
103 |
| - emptyKey = "\(classNameLowerCased()).emptyKey" |
104 |
| - keyys = "\(classNameLowerCased()).keyys" |
105 |
| - successKey = "\(classNameLowerCased()).successKey" |
106 |
| - } |
107 |
| - |
108 |
| - public required init(from decoder: Decoder) throws { |
109 |
| - super.init() |
110 |
| - let container = try decoder.container(keyedBy: CodingKeys.self) |
111 |
| - emptyKey = try container.decodeIfPresent(String.self, forKey: .emptyKey) ?? "__emptyKey" |
112 |
| - keyys = try container.decodeIfPresent(String.self, forKey: .keyys) ?? "__keyys" |
113 |
| - successKey = try container.decodeIfPresent(String.self, forKey: .successKey) ?? "__successKey" |
114 |
| - } |
115 |
| - |
116 |
| - public override subscript(key: String) -> String? { |
117 |
| - return "" |
118 |
| - } |
119 |
| - } |
120 |
| - |
121 |
| - public final class OtherSection: LocalizableSection { |
122 |
| - public var otherString = "" |
123 |
| - |
124 |
| - enum CodingKeys: String, CodingKey { |
125 |
| - case otherString |
126 |
| - } |
127 |
| - |
128 |
| - public override init() { |
129 |
| - super.init() |
130 |
| - otherString = "\(classNameLowerCased()).otherString" |
131 |
| - } |
132 |
| - |
133 |
| - public required init(from decoder: Decoder) throws { |
134 |
| - super.init() |
135 |
| - let container = try decoder.container(keyedBy: CodingKeys.self) |
136 |
| - otherString = try container.decodeIfPresent(String.self, forKey: .otherString) ?? "__otherString" |
137 |
| - } |
138 |
| - |
139 |
| - public override subscript(key: String) -> String? { |
140 |
| - return "" |
141 |
| - } |
142 |
| - } |
143 |
| -} |
144 |
| - |
0 commit comments