diff --git a/Contexts/Colors/customname.plist b/Contexts/Colors/customname.plist
index b281ad6..f260321 100644
--- a/Contexts/Colors/customname.plist
+++ b/Contexts/Colors/customname.plist
@@ -60,7 +60,7 @@
green
ff
name
- Translucent
+ private
red
ff
rgb
diff --git a/Contexts/Colors/defaults.plist b/Contexts/Colors/defaults.plist
index 9af9772..e117f81 100644
--- a/Contexts/Colors/defaults.plist
+++ b/Contexts/Colors/defaults.plist
@@ -60,7 +60,7 @@
green
ff
name
- Translucent
+ private
red
ff
rgb
diff --git a/Contexts/Colors/text-customname.plist b/Contexts/Colors/text-customname.plist
index b87083f..dca8ef5 100644
--- a/Contexts/Colors/text-customname.plist
+++ b/Contexts/Colors/text-customname.plist
@@ -108,7 +108,7 @@
green
ff
name
- Translucent
+ private
red
ff
rgb
diff --git a/Contexts/Colors/text-defaults.plist b/Contexts/Colors/text-defaults.plist
index 8f99543..8b39d45 100644
--- a/Contexts/Colors/text-defaults.plist
+++ b/Contexts/Colors/text-defaults.plist
@@ -108,7 +108,7 @@
green
ff
name
- Translucent
+ private
red
ff
rgb
diff --git a/Contexts/Fonts/customname.plist b/Contexts/Fonts/customname.plist
index 44d041e..cc79b30 100644
--- a/Contexts/Fonts/customname.plist
+++ b/Contexts/Fonts/customname.plist
@@ -154,6 +154,19 @@
name
Zapf Dingbats
+
+ fonts
+
+
+ fontName
+ private
+ style
+ internal
+
+
+ name
+ public
+
diff --git a/Contexts/Fonts/defaults.plist b/Contexts/Fonts/defaults.plist
index b1678c4..4630363 100644
--- a/Contexts/Fonts/defaults.plist
+++ b/Contexts/Fonts/defaults.plist
@@ -154,6 +154,19 @@
name
Zapf Dingbats
+
+ fonts
+
+
+ fontName
+ private
+ style
+ internal
+
+
+ name
+ public
+
diff --git a/Contexts/Images/customname.plist b/Contexts/Images/customname.plist
index 2ece1be..d674098 100644
--- a/Contexts/Images/customname.plist
+++ b/Contexts/Images/customname.plist
@@ -28,9 +28,9 @@
name
- Lemon
+ private
value
- Lemon
+ private
items
@@ -94,12 +94,12 @@
Exotic/Banana
Exotic/Mango
- Lemon
Round/Apple
Round/Apricot
Round/Double/Cherry
Round/Orange
Round/Tomato
+ private
diff --git a/Contexts/Images/defaults.plist b/Contexts/Images/defaults.plist
index e7e144b..ea083dd 100644
--- a/Contexts/Images/defaults.plist
+++ b/Contexts/Images/defaults.plist
@@ -28,9 +28,9 @@
name
- Lemon
+ private
value
- Lemon
+ private
items
@@ -94,12 +94,12 @@
Exotic/Banana
Exotic/Mango
- Lemon
Round/Apple
Round/Apricot
Round/Double/Cherry
Round/Orange
Round/Tomato
+ private
diff --git a/Contexts/Storyboards-iOS/all.plist b/Contexts/Storyboards-iOS/all.plist
index d90cdcb..ec57b65 100644
--- a/Contexts/Storyboards-iOS/all.plist
+++ b/Contexts/Storyboards-iOS/all.plist
@@ -38,7 +38,7 @@
customModule
SlackTextViewController
identifier
- SomeSlackViewControllerInstance
+ public
segues
@@ -47,7 +47,7 @@
customClass
SlideDownSegue
identifier
- test
+ private
diff --git a/Contexts/Storyboards-iOS/customname.plist b/Contexts/Storyboards-iOS/customname.plist
index 615602b..6033aac 100644
--- a/Contexts/Storyboards-iOS/customname.plist
+++ b/Contexts/Storyboards-iOS/customname.plist
@@ -38,7 +38,7 @@
customModule
SlackTextViewController
identifier
- SomeSlackViewControllerInstance
+ public
segues
@@ -47,7 +47,7 @@
customClass
SlideDownSegue
identifier
- test
+ private
diff --git a/Contexts/Storyboards-macOS/all.plist b/Contexts/Storyboards-macOS/all.plist
index b8cf877..8ab2794 100644
--- a/Contexts/Storyboards-macOS/all.plist
+++ b/Contexts/Storyboards-macOS/all.plist
@@ -27,7 +27,7 @@
customModule
PrefsWindowController
identifier
- Preferences
+ private
segues
@@ -110,12 +110,6 @@
segues
-
- customClass
-
- identifier
- Custom
-
customClass
@@ -146,6 +140,12 @@
identifier
Show
+
+ customClass
+
+ identifier
+ public
+
diff --git a/Contexts/Storyboards-macOS/customname.plist b/Contexts/Storyboards-macOS/customname.plist
index 11f350a..79f9ebb 100644
--- a/Contexts/Storyboards-macOS/customname.plist
+++ b/Contexts/Storyboards-macOS/customname.plist
@@ -27,7 +27,7 @@
customModule
PrefsWindowController
identifier
- Preferences
+ private
segues
@@ -110,12 +110,6 @@
segues
-
- customClass
-
- identifier
- Custom
-
customClass
@@ -146,6 +140,12 @@
identifier
Show
+
+ customClass
+
+ identifier
+ public
+
diff --git a/Contexts/Storyboards-macOS/messages.plist b/Contexts/Storyboards-macOS/messages.plist
index 958c6c8..a5174ea 100644
--- a/Contexts/Storyboards-macOS/messages.plist
+++ b/Contexts/Storyboards-macOS/messages.plist
@@ -64,12 +64,6 @@
segues
-
- customClass
-
- identifier
- Custom
-
customClass
@@ -100,6 +94,12 @@
identifier
Show
+
+ customClass
+
+ identifier
+ public
+
diff --git a/Contexts/Strings/customname.plist b/Contexts/Strings/customname.plist
index 436f4e0..67c7752 100644
--- a/Contexts/Strings/customname.plist
+++ b/Contexts/Strings/customname.plist
@@ -86,73 +86,73 @@
key
- greetings
+ ObjectOwnership
keytail
- greetings
+ ObjectOwnership
params
count
- 2
+ 3
declarations
let p0
let p1
+ let p2
names
p0
p1
+ p2
typednames
- p0: String
- p1: Int
+ p0: Int
+ p1: String
+ p2: String
types
- String
Int
+ String
+ String
translation
- Hello, my name is %@ and I'm %d
+ These are %3$@'s %1$d %2$@.
key
- ObjectOwnership
+ private
keytail
- ObjectOwnership
+ private
params
count
- 3
+ 2
declarations
let p0
let p1
- let p2
names
p0
p1
- p2
typednames
- p0: Int
- p1: String
- p2: String
+ p0: String
+ p1: Int
types
- Int
- String
String
+ Int
translation
- These are %3$@'s %1$d %2$@.
+ Hello, my name is %@ and I'm %d
key
@@ -164,19 +164,19 @@
key
- settings.navigation-bar.title.even.deeper
+ settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep
keytail
- settings.navigation-bar.title.even.deeper
+ settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep
translation
- Settings
+ DeepSettings
key
- settings.navigation-bar.title.even.deeper.than.we.can.handle
+ settings.navigation-bar.title.even.deeper
keytail
- settings.navigation-bar.title.even.deeper.than.we.can.handle
+ settings.navigation-bar.title.even.deeper
translation
- DeepSettings
+ Settings
key
@@ -217,73 +217,73 @@
key
- greetings
+ ObjectOwnership
keytail
- greetings
+ ObjectOwnership
params
count
- 2
+ 3
declarations
let p0
let p1
+ let p2
names
p0
p1
+ p2
typednames
- p0: String
- p1: Int
+ p0: Int
+ p1: String
+ p2: String
types
- String
Int
+ String
+ String
translation
- Hello, my name is %@ and I'm %d
+ These are %3$@'s %1$d %2$@.
key
- ObjectOwnership
+ private
keytail
- ObjectOwnership
+ private
params
count
- 3
+ 2
declarations
let p0
let p1
- let p2
names
p0
p1
- p2
typednames
- p0: Int
- p1: String
- p2: String
+ p0: String
+ p1: Int
types
- Int
- String
String
+ Int
translation
- These are %3$@'s %1$d %2$@.
+ Hello, my name is %@ and I'm %d
subenums
@@ -392,47 +392,64 @@
name
- Even
- strings
-
-
- key
- settings.navigation-bar.title.even.deeper
- keytail
- deeper
- translation
- Settings
-
-
+ Deeper
subenums
name
- Deeper
+ Than
subenums
name
- Than
+ We
subenums
name
- We
+ Can
subenums
name
- Can
- strings
+ Handle
+ subenums
- key
- settings.navigation-bar.title.even.deeper.than.we.can.handle
- keytail
- handle
- translation
- DeepSettings
+ name
+ No
+ subenums
+
+
+ name
+ Really
+ subenums
+
+
+ name
+ This
+ subenums
+
+
+ name
+ Is
+ strings
+
+
+ key
+ settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep
+ keytail
+ deep
+ translation
+ DeepSettings
+
+
+
+
+
+
+
+
@@ -444,6 +461,21 @@
+
+ name
+ Even
+ strings
+
+
+ key
+ settings.navigation-bar.title.even.deeper
+ keytail
+ deeper
+ translation
+ Settings
+
+
+
diff --git a/Contexts/Strings/defaults.plist b/Contexts/Strings/defaults.plist
index aeaa244..fb97cf6 100644
--- a/Contexts/Strings/defaults.plist
+++ b/Contexts/Strings/defaults.plist
@@ -86,73 +86,73 @@
key
- greetings
+ ObjectOwnership
keytail
- greetings
+ ObjectOwnership
params
count
- 2
+ 3
declarations
let p0
let p1
+ let p2
names
p0
p1
+ p2
typednames
- p0: String
- p1: Int
+ p0: Int
+ p1: String
+ p2: String
types
- String
Int
+ String
+ String
translation
- Hello, my name is %@ and I'm %d
+ These are %3$@'s %1$d %2$@.
key
- ObjectOwnership
+ private
keytail
- ObjectOwnership
+ private
params
count
- 3
+ 2
declarations
let p0
let p1
- let p2
names
p0
p1
- p2
typednames
- p0: Int
- p1: String
- p2: String
+ p0: String
+ p1: Int
types
- Int
- String
String
+ Int
translation
- These are %3$@'s %1$d %2$@.
+ Hello, my name is %@ and I'm %d
key
@@ -164,19 +164,19 @@
key
- settings.navigation-bar.title.even.deeper
+ settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep
keytail
- settings.navigation-bar.title.even.deeper
+ settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep
translation
- Settings
+ DeepSettings
key
- settings.navigation-bar.title.even.deeper.than.we.can.handle
+ settings.navigation-bar.title.even.deeper
keytail
- settings.navigation-bar.title.even.deeper.than.we.can.handle
+ settings.navigation-bar.title.even.deeper
translation
- DeepSettings
+ Settings
key
@@ -217,73 +217,73 @@
key
- greetings
+ ObjectOwnership
keytail
- greetings
+ ObjectOwnership
params
count
- 2
+ 3
declarations
let p0
let p1
+ let p2
names
p0
p1
+ p2
typednames
- p0: String
- p1: Int
+ p0: Int
+ p1: String
+ p2: String
types
- String
Int
+ String
+ String
translation
- Hello, my name is %@ and I'm %d
+ These are %3$@'s %1$d %2$@.
key
- ObjectOwnership
+ private
keytail
- ObjectOwnership
+ private
params
count
- 3
+ 2
declarations
let p0
let p1
- let p2
names
p0
p1
- p2
typednames
- p0: Int
- p1: String
- p2: String
+ p0: String
+ p1: Int
types
- Int
- String
String
+ Int
translation
- These are %3$@'s %1$d %2$@.
+ Hello, my name is %@ and I'm %d
subenums
@@ -392,47 +392,64 @@
name
- Even
- strings
-
-
- key
- settings.navigation-bar.title.even.deeper
- keytail
- deeper
- translation
- Settings
-
-
+ Deeper
subenums
name
- Deeper
+ Than
subenums
name
- Than
+ We
subenums
name
- We
+ Can
subenums
name
- Can
- strings
+ Handle
+ subenums
- key
- settings.navigation-bar.title.even.deeper.than.we.can.handle
- keytail
- handle
- translation
- DeepSettings
+ name
+ No
+ subenums
+
+
+ name
+ Really
+ subenums
+
+
+ name
+ This
+ subenums
+
+
+ name
+ Is
+ strings
+
+
+ key
+ settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep
+ keytail
+ deep
+ translation
+ DeepSettings
+
+
+
+
+
+
+
+
@@ -444,6 +461,21 @@
+
+ name
+ Even
+ strings
+
+
+ key
+ settings.navigation-bar.title.even.deeper
+ keytail
+ deeper
+ translation
+ Settings
+
+
+
diff --git a/Fixtures/Colors/colors.clr b/Fixtures/Colors/colors.clr
index 09bdd42..a63e1a8 100644
Binary files a/Fixtures/Colors/colors.clr and b/Fixtures/Colors/colors.clr differ
diff --git a/Fixtures/Colors/colors.json b/Fixtures/Colors/colors.json
index 473c9d8..1e478a0 100644
--- a/Fixtures/Colors/colors.json
+++ b/Fixtures/Colors/colors.json
@@ -2,5 +2,5 @@
"ArticleTitle" : "#33fe66",
"ArticleBody" : "339666",
"ArticleFootnote" : "ff66ccff",
- "Translucent" : "ffffffcc"
+ "private" : "ffffffcc"
}
diff --git a/Fixtures/Colors/colors.txt b/Fixtures/Colors/colors.txt
index aa5b3bb..21e4f91 100644
--- a/Fixtures/Colors/colors.txt
+++ b/Fixtures/Colors/colors.txt
@@ -10,6 +10,6 @@ ArticleBody : 339666
# Footnote
ArticleFootnote : ff66ccff
-Translucent : ffffffcc
-NamedValue : Translucent
-NestedNamedValue : NamedValue
\ No newline at end of file
+private : ffffffcc
+NamedValue : private
+NestedNamedValue : NamedValue
diff --git a/Fixtures/Colors/colors.xml b/Fixtures/Colors/colors.xml
index f4fc3d6..0369ac4 100644
--- a/Fixtures/Colors/colors.xml
+++ b/Fixtures/Colors/colors.xml
@@ -3,5 +3,5 @@
#33fe66
#339666
#ff66ccff
- #ffffffcc
+ #ffffffcc
diff --git a/Fixtures/Fonts/class.ttf b/Fixtures/Fonts/class.ttf
new file mode 100644
index 0000000..966869d
Binary files /dev/null and b/Fixtures/Fonts/class.ttf differ
diff --git a/Fixtures/Images/Images.xcassets/Lemon.imageset/Contents.json b/Fixtures/Images/Images.xcassets/private.imageset/Contents.json
similarity index 100%
rename from Fixtures/Images/Images.xcassets/Lemon.imageset/Contents.json
rename to Fixtures/Images/Images.xcassets/private.imageset/Contents.json
diff --git a/Fixtures/Images/Images.xcassets/Lemon.imageset/Lemon.png b/Fixtures/Images/Images.xcassets/private.imageset/Lemon.png
similarity index 100%
rename from Fixtures/Images/Images.xcassets/Lemon.imageset/Lemon.png
rename to Fixtures/Images/Images.xcassets/private.imageset/Lemon.png
diff --git a/Fixtures/Storyboards-iOS/AdditionalImport.storyboard b/Fixtures/Storyboards-iOS/AdditionalImport.storyboard
index c4dc3cd..9f99147 100644
--- a/Fixtures/Storyboards-iOS/AdditionalImport.storyboard
+++ b/Fixtures/Storyboards-iOS/AdditionalImport.storyboard
@@ -1,5 +1,5 @@
-
+
@@ -24,7 +24,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
diff --git a/Fixtures/Storyboards-macOS/AdditionalImport.storyboard b/Fixtures/Storyboards-macOS/AdditionalImport.storyboard
index aa5ab9b..9a3cddb 100644
--- a/Fixtures/Storyboards-macOS/AdditionalImport.storyboard
+++ b/Fixtures/Storyboards-macOS/AdditionalImport.storyboard
@@ -7,7 +7,7 @@
-
+
diff --git a/Fixtures/Storyboards-macOS/Message.storyboard b/Fixtures/Storyboards-macOS/Message.storyboard
index faf792e..eff504b 100644
--- a/Fixtures/Storyboards-macOS/Message.storyboard
+++ b/Fixtures/Storyboards-macOS/Message.storyboard
@@ -1,8 +1,8 @@
-
-
+
+
-
-
+
+
@@ -82,7 +82,7 @@
-
+
@@ -196,6 +196,7 @@
+
@@ -228,6 +229,7 @@
+
@@ -244,7 +246,6 @@
-
@@ -299,7 +300,7 @@
-
-
+
+
diff --git a/Fixtures/Strings/Localizable.strings b/Fixtures/Strings/Localizable.strings
index 4642917..6749326 100644
Binary files a/Fixtures/Strings/Localizable.strings and b/Fixtures/Strings/Localizable.strings differ
diff --git a/Tests/Expected/Colors/default-context-customname.swift b/Tests/Expected/Colors/default-context-customname.swift
index 62329d6..9106071 100644
--- a/Tests/Expected/Colors/default-context-customname.swift
+++ b/Tests/Expected/Colors/default-context-customname.swift
@@ -35,7 +35,7 @@ enum XCTColors {
case ArticleTitle
///
/// Alpha: 80%
(0xffffffcc)
- case Translucent
+ case Private
var rgbaValue: UInt32 {
switch self {
@@ -45,7 +45,7 @@ enum XCTColors {
return 0xff66ccff
case .ArticleTitle:
return 0x33fe66ff
- case .Translucent:
+ case .Private:
return 0xffffffcc
}
}
diff --git a/Tests/Expected/Colors/default-context-defaults.swift b/Tests/Expected/Colors/default-context-defaults.swift
index 342d114..4089cfb 100644
--- a/Tests/Expected/Colors/default-context-defaults.swift
+++ b/Tests/Expected/Colors/default-context-defaults.swift
@@ -35,7 +35,7 @@ enum ColorName {
case ArticleTitle
///
/// Alpha: 80%
(0xffffffcc)
- case Translucent
+ case Private
var rgbaValue: UInt32 {
switch self {
@@ -45,7 +45,7 @@ enum ColorName {
return 0xff66ccff
case .ArticleTitle:
return 0x33fe66ff
- case .Translucent:
+ case .Private:
return 0xffffffcc
}
}
diff --git a/Tests/Expected/Colors/default-context-text-defaults.swift b/Tests/Expected/Colors/default-context-text-defaults.swift
index cdea5c7..9570ed3 100644
--- a/Tests/Expected/Colors/default-context-text-defaults.swift
+++ b/Tests/Expected/Colors/default-context-text-defaults.swift
@@ -44,7 +44,7 @@ enum ColorName {
case NestedNamedValue
///
/// Alpha: 80%
(0xffffffcc)
- case Translucent
+ case Private
var rgbaValue: UInt32 {
switch self {
@@ -60,7 +60,7 @@ enum ColorName {
return 0xffffffcc
case .NestedNamedValue:
return 0xffffffcc
- case .Translucent:
+ case .Private:
return 0xffffffcc
}
}
diff --git a/Tests/Expected/Colors/rawValue-context-customname.swift b/Tests/Expected/Colors/rawValue-context-customname.swift
index f1161b9..331db4a 100644
--- a/Tests/Expected/Colors/rawValue-context-customname.swift
+++ b/Tests/Expected/Colors/rawValue-context-customname.swift
@@ -35,7 +35,7 @@ enum XCTColors: UInt32 {
case ArticleTitle = 0x33fe66ff
///
/// Alpha: 80%
(0xffffffcc)
- case Translucent = 0xffffffcc
+ case Private = 0xffffffcc
var color: Color {
return Color(named: self)
diff --git a/Tests/Expected/Colors/rawValue-context-defaults.swift b/Tests/Expected/Colors/rawValue-context-defaults.swift
index e61223b..8ccded2 100644
--- a/Tests/Expected/Colors/rawValue-context-defaults.swift
+++ b/Tests/Expected/Colors/rawValue-context-defaults.swift
@@ -35,7 +35,7 @@ enum ColorName: UInt32 {
case ArticleTitle = 0x33fe66ff
///
/// Alpha: 80%
(0xffffffcc)
- case Translucent = 0xffffffcc
+ case Private = 0xffffffcc
var color: Color {
return Color(named: self)
diff --git a/Tests/Expected/Colors/swift3-context-customname.swift b/Tests/Expected/Colors/swift3-context-customname.swift
index da78bd1..a42f5f5 100644
--- a/Tests/Expected/Colors/swift3-context-customname.swift
+++ b/Tests/Expected/Colors/swift3-context-customname.swift
@@ -35,7 +35,7 @@ enum XCTColors {
case articleTitle
///
/// Alpha: 80%
(0xffffffcc)
- case translucent
+ case `private`
var rgbaValue: UInt32 {
switch self {
@@ -45,7 +45,7 @@ enum XCTColors {
return 0xff66ccff
case .articleTitle:
return 0x33fe66ff
- case .translucent:
+ case .`private`:
return 0xffffffcc
}
}
diff --git a/Tests/Expected/Colors/swift3-context-defaults.swift b/Tests/Expected/Colors/swift3-context-defaults.swift
index 97c22fe..24a5ac3 100644
--- a/Tests/Expected/Colors/swift3-context-defaults.swift
+++ b/Tests/Expected/Colors/swift3-context-defaults.swift
@@ -35,7 +35,7 @@ enum ColorName {
case articleTitle
///
/// Alpha: 80%
(0xffffffcc)
- case translucent
+ case `private`
var rgbaValue: UInt32 {
switch self {
@@ -45,7 +45,7 @@ enum ColorName {
return 0xff66ccff
case .articleTitle:
return 0x33fe66ff
- case .translucent:
+ case .`private`:
return 0xffffffcc
}
}
diff --git a/Tests/Expected/Colors/swift3-context-text-defaults.swift b/Tests/Expected/Colors/swift3-context-text-defaults.swift
index 53dbee1..ca8d6c3 100644
--- a/Tests/Expected/Colors/swift3-context-text-defaults.swift
+++ b/Tests/Expected/Colors/swift3-context-text-defaults.swift
@@ -44,7 +44,7 @@ enum ColorName {
case nestedNamedValue
///
/// Alpha: 80%
(0xffffffcc)
- case translucent
+ case `private`
var rgbaValue: UInt32 {
switch self {
@@ -60,7 +60,7 @@ enum ColorName {
return 0xffffffcc
case .nestedNamedValue:
return 0xffffffcc
- case .translucent:
+ case .`private`:
return 0xffffffcc
}
}
diff --git a/Tests/Expected/Fonts/default-context-customname.swift b/Tests/Expected/Fonts/default-context-customname.swift
index e93c287..521b5bd 100644
--- a/Tests/Expected/Fonts/default-context-customname.swift
+++ b/Tests/Expected/Fonts/default-context-customname.swift
@@ -58,4 +58,7 @@ enum CustomFamily {
enum ZapfDingbats: String, FontConvertible {
case Regular = "ZapfDingbatsITC"
}
+ enum Public: String, FontConvertible {
+ case Internal = "private"
+ }
}
diff --git a/Tests/Expected/Fonts/default-context-defaults.swift b/Tests/Expected/Fonts/default-context-defaults.swift
index b685a7a..fbcb51d 100644
--- a/Tests/Expected/Fonts/default-context-defaults.swift
+++ b/Tests/Expected/Fonts/default-context-defaults.swift
@@ -58,4 +58,7 @@ enum FontFamily {
enum ZapfDingbats: String, FontConvertible {
case Regular = "ZapfDingbatsITC"
}
+ enum Public: String, FontConvertible {
+ case Internal = "private"
+ }
}
diff --git a/Tests/Expected/Fonts/swift3-context-customname.swift b/Tests/Expected/Fonts/swift3-context-customname.swift
index 3401268..1fac93a 100644
--- a/Tests/Expected/Fonts/swift3-context-customname.swift
+++ b/Tests/Expected/Fonts/swift3-context-customname.swift
@@ -58,4 +58,7 @@ enum CustomFamily {
enum ZapfDingbats: String, FontConvertible {
case regular = "ZapfDingbatsITC"
}
+ enum Public: String, FontConvertible {
+ case `internal` = "private"
+ }
}
diff --git a/Tests/Expected/Fonts/swift3-context-defaults.swift b/Tests/Expected/Fonts/swift3-context-defaults.swift
index d84eed2..16a0424 100644
--- a/Tests/Expected/Fonts/swift3-context-defaults.swift
+++ b/Tests/Expected/Fonts/swift3-context-defaults.swift
@@ -58,4 +58,7 @@ enum FontFamily {
enum ZapfDingbats: String, FontConvertible {
case regular = "ZapfDingbatsITC"
}
+ enum Public: String, FontConvertible {
+ case `internal` = "private"
+ }
}
diff --git a/Tests/Expected/Images/allvalues-context-customname.swift b/Tests/Expected/Images/allvalues-context-customname.swift
index 8c9d670..046992a 100644
--- a/Tests/Expected/Images/allvalues-context-customname.swift
+++ b/Tests/Expected/Images/allvalues-context-customname.swift
@@ -15,7 +15,7 @@
enum XCTImages: String {
case Exotic_Banana = "Exotic/Banana"
case Exotic_Mango = "Exotic/Mango"
- case Lemon = "Lemon"
+ case Private = "private"
case Round_Apricot = "Round/Apricot"
case Round_Orange = "Round/Orange"
case Round_Apple = "Round/Apple"
@@ -25,7 +25,7 @@ enum XCTImages: String {
static let allValues = [
Exotic_Banana,
Exotic_Mango,
- Lemon,
+ Private,
Round_Apricot,
Round_Orange,
Round_Apple,
diff --git a/Tests/Expected/Images/allvalues-context-defaults.swift b/Tests/Expected/Images/allvalues-context-defaults.swift
index cf3bf83..5924f1e 100644
--- a/Tests/Expected/Images/allvalues-context-defaults.swift
+++ b/Tests/Expected/Images/allvalues-context-defaults.swift
@@ -15,7 +15,7 @@
enum Asset: String {
case Exotic_Banana = "Exotic/Banana"
case Exotic_Mango = "Exotic/Mango"
- case Lemon = "Lemon"
+ case Private = "private"
case Round_Apricot = "Round/Apricot"
case Round_Orange = "Round/Orange"
case Round_Apple = "Round/Apple"
@@ -25,7 +25,7 @@ enum Asset: String {
static let allValues = [
Exotic_Banana,
Exotic_Mango,
- Lemon,
+ Private,
Round_Apricot,
Round_Orange,
Round_Apple,
diff --git a/Tests/Expected/Images/default-context-customname.swift b/Tests/Expected/Images/default-context-customname.swift
index e0794c1..95aca69 100644
--- a/Tests/Expected/Images/default-context-customname.swift
+++ b/Tests/Expected/Images/default-context-customname.swift
@@ -15,7 +15,7 @@
enum XCTImages: String {
case Exotic_Banana = "Exotic/Banana"
case Exotic_Mango = "Exotic/Mango"
- case Lemon = "Lemon"
+ case Private = "private"
case Round_Apricot = "Round/Apricot"
case Round_Orange = "Round/Orange"
case Round_Apple = "Round/Apple"
diff --git a/Tests/Expected/Images/default-context-defaults.swift b/Tests/Expected/Images/default-context-defaults.swift
index d985153..3a15300 100644
--- a/Tests/Expected/Images/default-context-defaults.swift
+++ b/Tests/Expected/Images/default-context-defaults.swift
@@ -15,7 +15,7 @@
enum Asset: String {
case Exotic_Banana = "Exotic/Banana"
case Exotic_Mango = "Exotic/Mango"
- case Lemon = "Lemon"
+ case Private = "private"
case Round_Apricot = "Round/Apricot"
case Round_Orange = "Round/Orange"
case Round_Apple = "Round/Apple"
diff --git a/Tests/Expected/Images/dot-syntax-context-customname.swift b/Tests/Expected/Images/dot-syntax-context-customname.swift
index 2be0223..f5876e8 100644
--- a/Tests/Expected/Images/dot-syntax-context-customname.swift
+++ b/Tests/Expected/Images/dot-syntax-context-customname.swift
@@ -38,7 +38,7 @@ enum XCTImages {
static let Banana: XCTImagesType = "Exotic/Banana"
static let Mango: XCTImagesType = "Exotic/Mango"
}
- static let Lemon: XCTImagesType = "Lemon"
+ static let Private: XCTImagesType = "private"
enum Round {
static let Apricot: XCTImagesType = "Round/Apricot"
static let Orange: XCTImagesType = "Round/Orange"
diff --git a/Tests/Expected/Images/dot-syntax-context-defaults.swift b/Tests/Expected/Images/dot-syntax-context-defaults.swift
index fa3a51a..efe0bcd 100644
--- a/Tests/Expected/Images/dot-syntax-context-defaults.swift
+++ b/Tests/Expected/Images/dot-syntax-context-defaults.swift
@@ -38,7 +38,7 @@ enum Asset {
static let Banana: AssetType = "Exotic/Banana"
static let Mango: AssetType = "Exotic/Mango"
}
- static let Lemon: AssetType = "Lemon"
+ static let Private: AssetType = "private"
enum Round {
static let Apricot: AssetType = "Round/Apricot"
static let Orange: AssetType = "Round/Orange"
diff --git a/Tests/Expected/Images/dot-syntax-swift3-context-customname.swift b/Tests/Expected/Images/dot-syntax-swift3-context-customname.swift
index 11f4398..1aec836 100644
--- a/Tests/Expected/Images/dot-syntax-swift3-context-customname.swift
+++ b/Tests/Expected/Images/dot-syntax-swift3-context-customname.swift
@@ -38,7 +38,7 @@ enum XCTImages {
static let banana: XCTImagesType = "Exotic/Banana"
static let mango: XCTImagesType = "Exotic/Mango"
}
- static let lemon: XCTImagesType = "Lemon"
+ static let `private`: XCTImagesType = "private"
enum Round {
static let apricot: XCTImagesType = "Round/Apricot"
static let orange: XCTImagesType = "Round/Orange"
diff --git a/Tests/Expected/Images/dot-syntax-swift3-context-defaults.swift b/Tests/Expected/Images/dot-syntax-swift3-context-defaults.swift
index 2f7923d..0e6e191 100644
--- a/Tests/Expected/Images/dot-syntax-swift3-context-defaults.swift
+++ b/Tests/Expected/Images/dot-syntax-swift3-context-defaults.swift
@@ -38,7 +38,7 @@ enum Asset {
static let banana: AssetType = "Exotic/Banana"
static let mango: AssetType = "Exotic/Mango"
}
- static let lemon: AssetType = "Lemon"
+ static let `private`: AssetType = "private"
enum Round {
static let apricot: AssetType = "Round/Apricot"
static let orange: AssetType = "Round/Orange"
diff --git a/Tests/Expected/Images/swift3-context-customname.swift b/Tests/Expected/Images/swift3-context-customname.swift
index d936955..0054126 100644
--- a/Tests/Expected/Images/swift3-context-customname.swift
+++ b/Tests/Expected/Images/swift3-context-customname.swift
@@ -15,7 +15,7 @@
enum XCTImages: String {
case exoticBanana = "Exotic/Banana"
case exoticMango = "Exotic/Mango"
- case lemon = "Lemon"
+ case `private` = "private"
case roundApricot = "Round/Apricot"
case roundOrange = "Round/Orange"
case roundApple = "Round/Apple"
diff --git a/Tests/Expected/Images/swift3-context-defaults.swift b/Tests/Expected/Images/swift3-context-defaults.swift
index 9133d31..20d0abf 100644
--- a/Tests/Expected/Images/swift3-context-defaults.swift
+++ b/Tests/Expected/Images/swift3-context-defaults.swift
@@ -15,7 +15,7 @@
enum Asset: String {
case exoticBanana = "Exotic/Banana"
case exoticMango = "Exotic/Mango"
- case lemon = "Lemon"
+ case `private` = "private"
case roundApricot = "Round/Apricot"
case roundOrange = "Round/Orange"
case roundApple = "Round/Apple"
diff --git a/Tests/Expected/Storyboards-iOS/default-context-all.swift b/Tests/Expected/Storyboards-iOS/default-context-all.swift
index 5fc8d6c..7ee7753 100644
--- a/Tests/Expected/Storyboards-iOS/default-context-all.swift
+++ b/Tests/Expected/Storyboards-iOS/default-context-all.swift
@@ -55,11 +55,11 @@ enum StoryboardScene {
return vc
}
- case SomeSlackViewControllerInstanceScene = "SomeSlackViewControllerInstance"
- static func instantiateSomeSlackViewControllerInstance() -> SlackTextViewController.SLKTextViewController {
- guard let vc = StoryboardScene.AdditionalImport.SomeSlackViewControllerInstanceScene.viewController() as? SlackTextViewController.SLKTextViewController
+ case PublicScene = "public"
+ static func instantiatePublic() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = StoryboardScene.AdditionalImport.PublicScene.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum StoryboardScene {
enum StoryboardSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case Test = "test"
+ case Private = "private"
}
enum Message: String, StoryboardSegueType {
case CustomBack
diff --git a/Tests/Expected/Storyboards-iOS/default-context-customname.swift b/Tests/Expected/Storyboards-iOS/default-context-customname.swift
index 1d534ae..8829b71 100644
--- a/Tests/Expected/Storyboards-iOS/default-context-customname.swift
+++ b/Tests/Expected/Storyboards-iOS/default-context-customname.swift
@@ -55,11 +55,11 @@ enum XCTStoryboardsScene {
return vc
}
- case SomeSlackViewControllerInstanceScene = "SomeSlackViewControllerInstance"
- static func instantiateSomeSlackViewControllerInstance() -> SlackTextViewController.SLKTextViewController {
- guard let vc = XCTStoryboardsScene.AdditionalImport.SomeSlackViewControllerInstanceScene.viewController() as? SlackTextViewController.SLKTextViewController
+ case PublicScene = "public"
+ static func instantiatePublic() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = XCTStoryboardsScene.AdditionalImport.PublicScene.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum XCTStoryboardsScene {
enum XCTStoryboardsSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case Test = "test"
+ case Private = "private"
}
enum Message: String, StoryboardSegueType {
case CustomBack
diff --git a/Tests/Expected/Storyboards-iOS/lowercase-context-all.swift b/Tests/Expected/Storyboards-iOS/lowercase-context-all.swift
index b65ac21..5ab701f 100644
--- a/Tests/Expected/Storyboards-iOS/lowercase-context-all.swift
+++ b/Tests/Expected/Storyboards-iOS/lowercase-context-all.swift
@@ -55,11 +55,11 @@ enum StoryboardScene {
return vc
}
- case someSlackViewControllerInstance = "SomeSlackViewControllerInstance"
- static func someSlackViewControllerInstanceViewController() -> SlackTextViewController.SLKTextViewController {
- guard let vc = StoryboardScene.AdditionalImport.someSlackViewControllerInstance.viewController() as? SlackTextViewController.SLKTextViewController
+ case `public`
+ static func publicViewController() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = StoryboardScene.AdditionalImport.`public`.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum StoryboardScene {
enum StoryboardSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case Test = "test"
+ case Private = "private"
}
enum Message: String, StoryboardSegueType {
case CustomBack
diff --git a/Tests/Expected/Storyboards-iOS/lowercase-context-customname.swift b/Tests/Expected/Storyboards-iOS/lowercase-context-customname.swift
index 8ddb2aa..e334970 100644
--- a/Tests/Expected/Storyboards-iOS/lowercase-context-customname.swift
+++ b/Tests/Expected/Storyboards-iOS/lowercase-context-customname.swift
@@ -55,11 +55,11 @@ enum XCTStoryboardsScene {
return vc
}
- case someSlackViewControllerInstance = "SomeSlackViewControllerInstance"
- static func someSlackViewControllerInstanceViewController() -> SlackTextViewController.SLKTextViewController {
- guard let vc = XCTStoryboardsScene.AdditionalImport.someSlackViewControllerInstance.viewController() as? SlackTextViewController.SLKTextViewController
+ case `public`
+ static func publicViewController() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = XCTStoryboardsScene.AdditionalImport.`public`.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum XCTStoryboardsScene {
enum XCTStoryboardsSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case Test = "test"
+ case Private = "private"
}
enum Message: String, StoryboardSegueType {
case CustomBack
diff --git a/Tests/Expected/Storyboards-iOS/swift3-context-all.swift b/Tests/Expected/Storyboards-iOS/swift3-context-all.swift
index 675ef7a..7e6b228 100644
--- a/Tests/Expected/Storyboards-iOS/swift3-context-all.swift
+++ b/Tests/Expected/Storyboards-iOS/swift3-context-all.swift
@@ -55,11 +55,11 @@ enum StoryboardScene {
return vc
}
- case someSlackViewControllerInstanceScene = "SomeSlackViewControllerInstance"
- static func instantiateSomeSlackViewControllerInstance() -> SlackTextViewController.SLKTextViewController {
- guard let vc = StoryboardScene.AdditionalImport.someSlackViewControllerInstanceScene.viewController() as? SlackTextViewController.SLKTextViewController
+ case publicScene = "public"
+ static func instantiatePublic() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = StoryboardScene.AdditionalImport.publicScene.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum StoryboardScene {
enum StoryboardSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case test
+ case `private`
}
enum Message: String, StoryboardSegueType {
case customBack = "CustomBack"
diff --git a/Tests/Expected/Storyboards-iOS/swift3-context-customname.swift b/Tests/Expected/Storyboards-iOS/swift3-context-customname.swift
index f025e34..a3c921d 100644
--- a/Tests/Expected/Storyboards-iOS/swift3-context-customname.swift
+++ b/Tests/Expected/Storyboards-iOS/swift3-context-customname.swift
@@ -55,11 +55,11 @@ enum XCTStoryboardsScene {
return vc
}
- case someSlackViewControllerInstanceScene = "SomeSlackViewControllerInstance"
- static func instantiateSomeSlackViewControllerInstance() -> SlackTextViewController.SLKTextViewController {
- guard let vc = XCTStoryboardsScene.AdditionalImport.someSlackViewControllerInstanceScene.viewController() as? SlackTextViewController.SLKTextViewController
+ case publicScene = "public"
+ static func instantiatePublic() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = XCTStoryboardsScene.AdditionalImport.publicScene.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum XCTStoryboardsScene {
enum XCTStoryboardsSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case test
+ case `private`
}
enum Message: String, StoryboardSegueType {
case customBack = "CustomBack"
diff --git a/Tests/Expected/Storyboards-iOS/uppercase-context-all.swift b/Tests/Expected/Storyboards-iOS/uppercase-context-all.swift
index 6f547f0..8b247db 100644
--- a/Tests/Expected/Storyboards-iOS/uppercase-context-all.swift
+++ b/Tests/Expected/Storyboards-iOS/uppercase-context-all.swift
@@ -55,11 +55,11 @@ enum StoryboardScene {
return vc
}
- case SomeSlackViewControllerInstance
- static func someSlackViewControllerInstanceViewController() -> SlackTextViewController.SLKTextViewController {
- guard let vc = StoryboardScene.AdditionalImport.SomeSlackViewControllerInstance.viewController() as? SlackTextViewController.SLKTextViewController
+ case Public = "public"
+ static func publicViewController() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = StoryboardScene.AdditionalImport.Public.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum StoryboardScene {
enum StoryboardSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case Test = "test"
+ case Private = "private"
}
enum Message: String, StoryboardSegueType {
case CustomBack
diff --git a/Tests/Expected/Storyboards-iOS/uppercase-context-customname.swift b/Tests/Expected/Storyboards-iOS/uppercase-context-customname.swift
index 552fa78..2a27dbb 100644
--- a/Tests/Expected/Storyboards-iOS/uppercase-context-customname.swift
+++ b/Tests/Expected/Storyboards-iOS/uppercase-context-customname.swift
@@ -55,11 +55,11 @@ enum XCTStoryboardsScene {
return vc
}
- case SomeSlackViewControllerInstance
- static func someSlackViewControllerInstanceViewController() -> SlackTextViewController.SLKTextViewController {
- guard let vc = XCTStoryboardsScene.AdditionalImport.SomeSlackViewControllerInstance.viewController() as? SlackTextViewController.SLKTextViewController
+ case Public = "public"
+ static func publicViewController() -> SlackTextViewController.SLKTextViewController {
+ guard let vc = XCTStoryboardsScene.AdditionalImport.Public.viewController() as? SlackTextViewController.SLKTextViewController
else {
- fatalError("ViewController 'SomeSlackViewControllerInstance' is not of the expected class SlackTextViewController.SLKTextViewController.")
+ fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.")
}
return vc
}
@@ -171,7 +171,7 @@ enum XCTStoryboardsScene {
enum XCTStoryboardsSegue {
enum AdditionalImport: String, StoryboardSegueType {
- case Test = "test"
+ case Private = "private"
}
enum Message: String, StoryboardSegueType {
case CustomBack
diff --git a/Tests/Expected/Storyboards-macOS/default-context-all.swift b/Tests/Expected/Storyboards-macOS/default-context-all.swift
index 144be69..fd2b135 100644
--- a/Tests/Expected/Storyboards-macOS/default-context-all.swift
+++ b/Tests/Expected/Storyboards-macOS/default-context-all.swift
@@ -53,11 +53,11 @@ enum StoryboardScene {
enum AdditionalImport: String, StoryboardSceneType {
static let storyboardName = "AdditionalImport"
- case PreferencesScene = "Preferences"
- static func instantiatePreferences() -> PrefsWindowController.DBPrefsWindowController {
- guard let vc = StoryboardScene.AdditionalImport.PreferencesScene.controller() as? PrefsWindowController.DBPrefsWindowController
+ case PrivateScene = "private"
+ static func instantiatePrivate() -> PrefsWindowController.DBPrefsWindowController {
+ guard let vc = StoryboardScene.AdditionalImport.PrivateScene.controller() as? PrefsWindowController.DBPrefsWindowController
else {
- fatalError("ViewController 'Preferences' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
+ fatalError("ViewController 'private' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
}
return vc
}
@@ -159,11 +159,11 @@ enum StoryboardScene {
enum StoryboardSegue {
enum Message: String, StoryboardSegueType {
- case Custom
case Embed
case Modal
case Popover
case Sheet
case Show
+ case Public = "public"
}
}
diff --git a/Tests/Expected/Storyboards-macOS/default-context-customname.swift b/Tests/Expected/Storyboards-macOS/default-context-customname.swift
index 0cf074f..b4c966e 100644
--- a/Tests/Expected/Storyboards-macOS/default-context-customname.swift
+++ b/Tests/Expected/Storyboards-macOS/default-context-customname.swift
@@ -53,11 +53,11 @@ enum XCTStoryboardsScene {
enum AdditionalImport: String, StoryboardSceneType {
static let storyboardName = "AdditionalImport"
- case PreferencesScene = "Preferences"
- static func instantiatePreferences() -> PrefsWindowController.DBPrefsWindowController {
- guard let vc = XCTStoryboardsScene.AdditionalImport.PreferencesScene.controller() as? PrefsWindowController.DBPrefsWindowController
+ case PrivateScene = "private"
+ static func instantiatePrivate() -> PrefsWindowController.DBPrefsWindowController {
+ guard let vc = XCTStoryboardsScene.AdditionalImport.PrivateScene.controller() as? PrefsWindowController.DBPrefsWindowController
else {
- fatalError("ViewController 'Preferences' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
+ fatalError("ViewController 'private' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
}
return vc
}
@@ -159,11 +159,11 @@ enum XCTStoryboardsScene {
enum XCTStoryboardsSegue {
enum Message: String, StoryboardSegueType {
- case Custom
case Embed
case Modal
case Popover
case Sheet
case Show
+ case Public = "public"
}
}
diff --git a/Tests/Expected/Storyboards-macOS/lowercase-context-all.swift b/Tests/Expected/Storyboards-macOS/lowercase-context-all.swift
index 920fa5e..c0f10a9 100644
--- a/Tests/Expected/Storyboards-macOS/lowercase-context-all.swift
+++ b/Tests/Expected/Storyboards-macOS/lowercase-context-all.swift
@@ -53,11 +53,11 @@ enum StoryboardScene {
enum AdditionalImport: String, StoryboardSceneType {
static let storyboardName = "AdditionalImport"
- case preferencesScene = "Preferences"
- static func instantiatePreferences() -> PrefsWindowController.DBPrefsWindowController {
- guard let vc = StoryboardScene.AdditionalImport.preferencesScene.controller() as? PrefsWindowController.DBPrefsWindowController
+ case privateScene = "private"
+ static func instantiatePrivate() -> PrefsWindowController.DBPrefsWindowController {
+ guard let vc = StoryboardScene.AdditionalImport.privateScene.controller() as? PrefsWindowController.DBPrefsWindowController
else {
- fatalError("ViewController 'Preferences' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
+ fatalError("ViewController 'private' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
}
return vc
}
@@ -159,11 +159,11 @@ enum StoryboardScene {
enum StoryboardSegue {
enum Message: String, StoryboardSegueType {
- case Custom
case Embed
case Modal
case Popover
case Sheet
case Show
+ case Public = "public"
}
}
diff --git a/Tests/Expected/Storyboards-macOS/lowercase-context-customname.swift b/Tests/Expected/Storyboards-macOS/lowercase-context-customname.swift
index a91f9a7..2da2d3c 100644
--- a/Tests/Expected/Storyboards-macOS/lowercase-context-customname.swift
+++ b/Tests/Expected/Storyboards-macOS/lowercase-context-customname.swift
@@ -53,11 +53,11 @@ enum XCTStoryboardsScene {
enum AdditionalImport: String, StoryboardSceneType {
static let storyboardName = "AdditionalImport"
- case preferencesScene = "Preferences"
- static func instantiatePreferences() -> PrefsWindowController.DBPrefsWindowController {
- guard let vc = XCTStoryboardsScene.AdditionalImport.preferencesScene.controller() as? PrefsWindowController.DBPrefsWindowController
+ case privateScene = "private"
+ static func instantiatePrivate() -> PrefsWindowController.DBPrefsWindowController {
+ guard let vc = XCTStoryboardsScene.AdditionalImport.privateScene.controller() as? PrefsWindowController.DBPrefsWindowController
else {
- fatalError("ViewController 'Preferences' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
+ fatalError("ViewController 'private' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
}
return vc
}
@@ -159,11 +159,11 @@ enum XCTStoryboardsScene {
enum XCTStoryboardsSegue {
enum Message: String, StoryboardSegueType {
- case Custom
case Embed
case Modal
case Popover
case Sheet
case Show
+ case Public = "public"
}
}
diff --git a/Tests/Expected/Storyboards-macOS/swift3-context-all.swift b/Tests/Expected/Storyboards-macOS/swift3-context-all.swift
index 304e968..ffc9f9f 100644
--- a/Tests/Expected/Storyboards-macOS/swift3-context-all.swift
+++ b/Tests/Expected/Storyboards-macOS/swift3-context-all.swift
@@ -53,11 +53,11 @@ enum StoryboardScene {
enum AdditionalImport: String, StoryboardSceneType {
static let storyboardName = "AdditionalImport"
- case preferencesScene = "Preferences"
- static func instantiatePreferences() -> PrefsWindowController.DBPrefsWindowController {
- guard let vc = StoryboardScene.AdditionalImport.preferencesScene.controller() as? PrefsWindowController.DBPrefsWindowController
+ case privateScene = "private"
+ static func instantiatePrivate() -> PrefsWindowController.DBPrefsWindowController {
+ guard let vc = StoryboardScene.AdditionalImport.privateScene.controller() as? PrefsWindowController.DBPrefsWindowController
else {
- fatalError("ViewController 'Preferences' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
+ fatalError("ViewController 'private' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
}
return vc
}
@@ -159,11 +159,11 @@ enum StoryboardScene {
enum StoryboardSegue {
enum Message: String, StoryboardSegueType {
- case custom = "Custom"
case embed = "Embed"
case modal = "Modal"
case popover = "Popover"
case sheet = "Sheet"
case show = "Show"
+ case `public`
}
}
diff --git a/Tests/Expected/Storyboards-macOS/swift3-context-customname.swift b/Tests/Expected/Storyboards-macOS/swift3-context-customname.swift
index ae70994..2c32f0e 100644
--- a/Tests/Expected/Storyboards-macOS/swift3-context-customname.swift
+++ b/Tests/Expected/Storyboards-macOS/swift3-context-customname.swift
@@ -53,11 +53,11 @@ enum XCTStoryboardsScene {
enum AdditionalImport: String, StoryboardSceneType {
static let storyboardName = "AdditionalImport"
- case preferencesScene = "Preferences"
- static func instantiatePreferences() -> PrefsWindowController.DBPrefsWindowController {
- guard let vc = XCTStoryboardsScene.AdditionalImport.preferencesScene.controller() as? PrefsWindowController.DBPrefsWindowController
+ case privateScene = "private"
+ static func instantiatePrivate() -> PrefsWindowController.DBPrefsWindowController {
+ guard let vc = XCTStoryboardsScene.AdditionalImport.privateScene.controller() as? PrefsWindowController.DBPrefsWindowController
else {
- fatalError("ViewController 'Preferences' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
+ fatalError("ViewController 'private' is not of the expected class PrefsWindowController.DBPrefsWindowController.")
}
return vc
}
@@ -159,11 +159,11 @@ enum XCTStoryboardsScene {
enum XCTStoryboardsSegue {
enum Message: String, StoryboardSegueType {
- case custom = "Custom"
case embed = "Embed"
case modal = "Modal"
case popover = "Popover"
case sheet = "Sheet"
case show = "Show"
+ case `public`
}
}
diff --git a/Tests/Expected/Strings/default-context-customname.swift b/Tests/Expected/Strings/default-context-customname.swift
index 3a53934..f02f36b 100644
--- a/Tests/Expected/Strings/default-context-customname.swift
+++ b/Tests/Expected/Strings/default-context-customname.swift
@@ -11,20 +11,20 @@ enum XCTLoc {
case AlertMessage
/// Title of the alert
case AlertTitle
- /// Hello, my name is %@ and I'm %d
- case Greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case ObjectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case Private(String, Int)
/// You have %d apples
case ApplesCount(Int)
/// Those %d bananas belong to %@.
case BananasOwner(Int, String)
/// Some Reserved Keyword there
case SettingsNavigationBarSelf
+ /// DeepSettings
+ case SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
/// Settings
case SettingsNavigationBarTitleEvenDeeper
- /// DeepSettings
- case SettingsNavigationBarTitleEvenDeeperThanWeCanHandle
/// Here you can change some user profile settings.
case SeTTingsUSerProFileSectioNFooterText
/// User Profile Settings
@@ -41,20 +41,20 @@ extension XCTLoc: CustomStringConvertible {
return XCTLoc.tr("alert_message")
case .AlertTitle:
return XCTLoc.tr("alert_title")
- case .Greetings(let p1, let p2):
- return XCTLoc.tr("greetings", p1, p2)
case .ObjectOwnership(let p1, let p2, let p3):
return XCTLoc.tr("ObjectOwnership", p1, p2, p3)
+ case .Private(let p1, let p2):
+ return XCTLoc.tr("private", p1, p2)
case .ApplesCount(let p1):
return XCTLoc.tr("apples.count", p1)
case .BananasOwner(let p1, let p2):
return XCTLoc.tr("bananas.owner", p1, p2)
case .SettingsNavigationBarSelf:
return XCTLoc.tr("settings.navigation-bar.self")
+ case .SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ return XCTLoc.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
case .SettingsNavigationBarTitleEvenDeeper:
return XCTLoc.tr("settings.navigation-bar.title.even.deeper")
- case .SettingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- return XCTLoc.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
case .SeTTingsUSerProFileSectioNFooterText:
return XCTLoc.tr("seTTings.uSer-proFile-sectioN.footer_text")
case .SettingsUserProfileSectionHeaderTitle:
diff --git a/Tests/Expected/Strings/default-context-defaults.swift b/Tests/Expected/Strings/default-context-defaults.swift
index 04df8c5..2454f4d 100644
--- a/Tests/Expected/Strings/default-context-defaults.swift
+++ b/Tests/Expected/Strings/default-context-defaults.swift
@@ -11,20 +11,20 @@ enum L10n {
case AlertMessage
/// Title of the alert
case AlertTitle
- /// Hello, my name is %@ and I'm %d
- case Greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case ObjectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case Private(String, Int)
/// You have %d apples
case ApplesCount(Int)
/// Those %d bananas belong to %@.
case BananasOwner(Int, String)
/// Some Reserved Keyword there
case SettingsNavigationBarSelf
+ /// DeepSettings
+ case SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
/// Settings
case SettingsNavigationBarTitleEvenDeeper
- /// DeepSettings
- case SettingsNavigationBarTitleEvenDeeperThanWeCanHandle
/// Here you can change some user profile settings.
case SeTTingsUSerProFileSectioNFooterText
/// User Profile Settings
@@ -41,20 +41,20 @@ extension L10n: CustomStringConvertible {
return L10n.tr("alert_message")
case .AlertTitle:
return L10n.tr("alert_title")
- case .Greetings(let p1, let p2):
- return L10n.tr("greetings", p1, p2)
case .ObjectOwnership(let p1, let p2, let p3):
return L10n.tr("ObjectOwnership", p1, p2, p3)
+ case .Private(let p1, let p2):
+ return L10n.tr("private", p1, p2)
case .ApplesCount(let p1):
return L10n.tr("apples.count", p1)
case .BananasOwner(let p1, let p2):
return L10n.tr("bananas.owner", p1, p2)
case .SettingsNavigationBarSelf:
return L10n.tr("settings.navigation-bar.self")
+ case .SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ return L10n.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
case .SettingsNavigationBarTitleEvenDeeper:
return L10n.tr("settings.navigation-bar.title.even.deeper")
- case .SettingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- return L10n.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
case .SeTTingsUSerProFileSectioNFooterText:
return L10n.tr("seTTings.uSer-proFile-sectioN.footer_text")
case .SettingsUserProfileSectionHeaderTitle:
diff --git a/Tests/Expected/Strings/dot-syntax-context-customname.swift b/Tests/Expected/Strings/dot-syntax-context-customname.swift
index eb0e6e2..46ca195 100644
--- a/Tests/Expected/Strings/dot-syntax-context-customname.swift
+++ b/Tests/Expected/Strings/dot-syntax-context-customname.swift
@@ -16,14 +16,14 @@ enum XCTLoc {
static let AlertMessage = XCTLoc.tr("alert_message")
/// Title of the alert
static let AlertTitle = XCTLoc.tr("alert_title")
- /// Hello, my name is %@ and I'm %d
- static func Greetings(p1: String, p2: Int) -> String {
- return XCTLoc.tr("greetings", p1, p2)
- }
/// These are %3$@'s %1$d %2$@.
static func ObjectOwnership(p1: Int, p2: String, p3: String) -> String {
return XCTLoc.tr("ObjectOwnership", p1, p2, p3)
}
+ /// Hello, my name is %@ and I'm %d
+ static func Private(p1: String, p2: Int) -> String {
+ return XCTLoc.tr("private", p1, p2)
+ }
enum Apples {
/// You have %d apples
@@ -47,24 +47,39 @@ enum XCTLoc {
enum Title {
- enum Even {
- /// Settings
- static let Deeper = XCTLoc.tr("settings.navigation-bar.title.even.deeper")
+ enum Deeper {
+
+ enum Than {
- enum Deeper {
+ enum We {
- enum Than {
+ enum Can {
- enum We {
+ enum Handle {
- enum Can {
- /// DeepSettings
- static let Handle = XCTLoc.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
+ enum No {
+
+ enum Really {
+
+ enum This {
+
+ enum Is {
+ /// DeepSettings
+ static let Deep = XCTLoc.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
+ }
+ }
+ }
+ }
}
}
}
}
}
+
+ enum Even {
+ /// Settings
+ static let Deeper = XCTLoc.tr("settings.navigation-bar.title.even.deeper")
+ }
}
}
diff --git a/Tests/Expected/Strings/dot-syntax-context-defaults.swift b/Tests/Expected/Strings/dot-syntax-context-defaults.swift
index acd8a28..a7c2d83 100644
--- a/Tests/Expected/Strings/dot-syntax-context-defaults.swift
+++ b/Tests/Expected/Strings/dot-syntax-context-defaults.swift
@@ -16,14 +16,14 @@ enum L10n {
static let AlertMessage = L10n.tr("alert_message")
/// Title of the alert
static let AlertTitle = L10n.tr("alert_title")
- /// Hello, my name is %@ and I'm %d
- static func Greetings(p1: String, p2: Int) -> String {
- return L10n.tr("greetings", p1, p2)
- }
/// These are %3$@'s %1$d %2$@.
static func ObjectOwnership(p1: Int, p2: String, p3: String) -> String {
return L10n.tr("ObjectOwnership", p1, p2, p3)
}
+ /// Hello, my name is %@ and I'm %d
+ static func Private(p1: String, p2: Int) -> String {
+ return L10n.tr("private", p1, p2)
+ }
enum Apples {
/// You have %d apples
@@ -47,24 +47,39 @@ enum L10n {
enum Title {
- enum Even {
- /// Settings
- static let Deeper = L10n.tr("settings.navigation-bar.title.even.deeper")
+ enum Deeper {
+
+ enum Than {
- enum Deeper {
+ enum We {
- enum Than {
+ enum Can {
- enum We {
+ enum Handle {
- enum Can {
- /// DeepSettings
- static let Handle = L10n.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
+ enum No {
+
+ enum Really {
+
+ enum This {
+
+ enum Is {
+ /// DeepSettings
+ static let Deep = L10n.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
+ }
+ }
+ }
+ }
}
}
}
}
}
+
+ enum Even {
+ /// Settings
+ static let Deeper = L10n.tr("settings.navigation-bar.title.even.deeper")
+ }
}
}
diff --git a/Tests/Expected/Strings/dot-syntax-swift3-context-customname.swift b/Tests/Expected/Strings/dot-syntax-swift3-context-customname.swift
index ca7fcf0..9ab1bdb 100644
--- a/Tests/Expected/Strings/dot-syntax-swift3-context-customname.swift
+++ b/Tests/Expected/Strings/dot-syntax-swift3-context-customname.swift
@@ -16,14 +16,14 @@ enum XCTLoc {
static let alertMessage = XCTLoc.tr("alert_message")
/// Title of the alert
static let alertTitle = XCTLoc.tr("alert_title")
- /// Hello, my name is %@ and I'm %d
- static func greetings(_ p1: String, _ p2: Int) -> String {
- return XCTLoc.tr("greetings", p1, p2)
- }
/// These are %3$@'s %1$d %2$@.
static func objectOwnership(_ p1: Int, _ p2: String, _ p3: String) -> String {
return XCTLoc.tr("ObjectOwnership", p1, p2, p3)
}
+ /// Hello, my name is %@ and I'm %d
+ static func `private`(_ p1: String, _ p2: Int) -> String {
+ return XCTLoc.tr("private", p1, p2)
+ }
enum Apples {
/// You have %d apples
@@ -47,24 +47,39 @@ enum XCTLoc {
enum Title {
- enum Even {
- /// Settings
- static let deeper = XCTLoc.tr("settings.navigation-bar.title.even.deeper")
+ enum Deeper {
+
+ enum Than {
- enum Deeper {
+ enum We {
- enum Than {
+ enum Can {
- enum We {
+ enum Handle {
- enum Can {
- /// DeepSettings
- static let handle = XCTLoc.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
+ enum No {
+
+ enum Really {
+
+ enum This {
+
+ enum Is {
+ /// DeepSettings
+ static let deep = XCTLoc.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
+ }
+ }
+ }
+ }
}
}
}
}
}
+
+ enum Even {
+ /// Settings
+ static let deeper = XCTLoc.tr("settings.navigation-bar.title.even.deeper")
+ }
}
}
diff --git a/Tests/Expected/Strings/dot-syntax-swift3-context-defaults.swift b/Tests/Expected/Strings/dot-syntax-swift3-context-defaults.swift
index d4a7904..5f2032b 100644
--- a/Tests/Expected/Strings/dot-syntax-swift3-context-defaults.swift
+++ b/Tests/Expected/Strings/dot-syntax-swift3-context-defaults.swift
@@ -16,14 +16,14 @@ enum L10n {
static let alertMessage = L10n.tr("alert_message")
/// Title of the alert
static let alertTitle = L10n.tr("alert_title")
- /// Hello, my name is %@ and I'm %d
- static func greetings(_ p1: String, _ p2: Int) -> String {
- return L10n.tr("greetings", p1, p2)
- }
/// These are %3$@'s %1$d %2$@.
static func objectOwnership(_ p1: Int, _ p2: String, _ p3: String) -> String {
return L10n.tr("ObjectOwnership", p1, p2, p3)
}
+ /// Hello, my name is %@ and I'm %d
+ static func `private`(_ p1: String, _ p2: Int) -> String {
+ return L10n.tr("private", p1, p2)
+ }
enum Apples {
/// You have %d apples
@@ -47,24 +47,39 @@ enum L10n {
enum Title {
- enum Even {
- /// Settings
- static let deeper = L10n.tr("settings.navigation-bar.title.even.deeper")
+ enum Deeper {
+
+ enum Than {
- enum Deeper {
+ enum We {
- enum Than {
+ enum Can {
- enum We {
+ enum Handle {
- enum Can {
- /// DeepSettings
- static let handle = L10n.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
+ enum No {
+
+ enum Really {
+
+ enum This {
+
+ enum Is {
+ /// DeepSettings
+ static let deep = L10n.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
+ }
+ }
+ }
+ }
}
}
}
}
}
+
+ enum Even {
+ /// Settings
+ static let deeper = L10n.tr("settings.navigation-bar.title.even.deeper")
+ }
}
}
diff --git a/Tests/Expected/Strings/genstrings-context-customname.swift b/Tests/Expected/Strings/genstrings-context-customname.swift
index b51edf8..07e29f0 100644
--- a/Tests/Expected/Strings/genstrings-context-customname.swift
+++ b/Tests/Expected/Strings/genstrings-context-customname.swift
@@ -9,20 +9,20 @@ enum XCTLoc {
case AlertMessage
/// Title of the alert
case AlertTitle
- /// Hello, my name is %@ and I'm %d
- case Greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case ObjectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case Private(String, Int)
/// You have %d apples
case ApplesCount(Int)
/// Those %d bananas belong to %@.
case BananasOwner(Int, String)
/// Some Reserved Keyword there
case SettingsNavigationBarSelf
+ /// DeepSettings
+ case SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
/// Settings
case SettingsNavigationBarTitleEvenDeeper
- /// DeepSettings
- case SettingsNavigationBarTitleEvenDeeperThanWeCanHandle
/// Here you can change some user profile settings.
case SeTTingsUSerProFileSectioNFooterText
/// User Profile Settings
@@ -40,12 +40,12 @@ extension XCTLoc: CustomStringConvertible {
case .AlertTitle:
let format = NSLocalizedString("alert_title", comment: "")
return XCTLoc.tr(format)
- case .Greetings(let p1, let p2):
- let format = NSLocalizedString("greetings", comment: "")
- return XCTLoc.tr(format, p1, p2)
case .ObjectOwnership(let p1, let p2, let p3):
let format = NSLocalizedString("ObjectOwnership", comment: "")
return XCTLoc.tr(format, p1, p2, p3)
+ case .Private(let p1, let p2):
+ let format = NSLocalizedString("private", comment: "")
+ return XCTLoc.tr(format, p1, p2)
case .ApplesCount(let p1):
let format = NSLocalizedString("apples.count", comment: "")
return XCTLoc.tr(format, p1)
@@ -55,12 +55,12 @@ extension XCTLoc: CustomStringConvertible {
case .SettingsNavigationBarSelf:
let format = NSLocalizedString("settings.navigation-bar.self", comment: "")
return XCTLoc.tr(format)
+ case .SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ let format = NSLocalizedString("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep", comment: "")
+ return XCTLoc.tr(format)
case .SettingsNavigationBarTitleEvenDeeper:
let format = NSLocalizedString("settings.navigation-bar.title.even.deeper", comment: "")
return XCTLoc.tr(format)
- case .SettingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- let format = NSLocalizedString("settings.navigation-bar.title.even.deeper.than.we.can.handle", comment: "")
- return XCTLoc.tr(format)
case .SeTTingsUSerProFileSectioNFooterText:
let format = NSLocalizedString("seTTings.uSer-proFile-sectioN.footer_text", comment: "")
return XCTLoc.tr(format)
diff --git a/Tests/Expected/Strings/genstrings-context-defaults.swift b/Tests/Expected/Strings/genstrings-context-defaults.swift
index 6aa7148..9f0db29 100644
--- a/Tests/Expected/Strings/genstrings-context-defaults.swift
+++ b/Tests/Expected/Strings/genstrings-context-defaults.swift
@@ -9,20 +9,20 @@ enum L10n {
case AlertMessage
/// Title of the alert
case AlertTitle
- /// Hello, my name is %@ and I'm %d
- case Greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case ObjectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case Private(String, Int)
/// You have %d apples
case ApplesCount(Int)
/// Those %d bananas belong to %@.
case BananasOwner(Int, String)
/// Some Reserved Keyword there
case SettingsNavigationBarSelf
+ /// DeepSettings
+ case SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
/// Settings
case SettingsNavigationBarTitleEvenDeeper
- /// DeepSettings
- case SettingsNavigationBarTitleEvenDeeperThanWeCanHandle
/// Here you can change some user profile settings.
case SeTTingsUSerProFileSectioNFooterText
/// User Profile Settings
@@ -40,12 +40,12 @@ extension L10n: CustomStringConvertible {
case .AlertTitle:
let format = NSLocalizedString("alert_title", comment: "")
return L10n.tr(format)
- case .Greetings(let p1, let p2):
- let format = NSLocalizedString("greetings", comment: "")
- return L10n.tr(format, p1, p2)
case .ObjectOwnership(let p1, let p2, let p3):
let format = NSLocalizedString("ObjectOwnership", comment: "")
return L10n.tr(format, p1, p2, p3)
+ case .Private(let p1, let p2):
+ let format = NSLocalizedString("private", comment: "")
+ return L10n.tr(format, p1, p2)
case .ApplesCount(let p1):
let format = NSLocalizedString("apples.count", comment: "")
return L10n.tr(format, p1)
@@ -55,12 +55,12 @@ extension L10n: CustomStringConvertible {
case .SettingsNavigationBarSelf:
let format = NSLocalizedString("settings.navigation-bar.self", comment: "")
return L10n.tr(format)
+ case .SettingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ let format = NSLocalizedString("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep", comment: "")
+ return L10n.tr(format)
case .SettingsNavigationBarTitleEvenDeeper:
let format = NSLocalizedString("settings.navigation-bar.title.even.deeper", comment: "")
return L10n.tr(format)
- case .SettingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- let format = NSLocalizedString("settings.navigation-bar.title.even.deeper.than.we.can.handle", comment: "")
- return L10n.tr(format)
case .SeTTingsUSerProFileSectioNFooterText:
let format = NSLocalizedString("seTTings.uSer-proFile-sectioN.footer_text", comment: "")
return L10n.tr(format)
diff --git a/Tests/Expected/Strings/no-comments-swift3-context-customname.swift b/Tests/Expected/Strings/no-comments-swift3-context-customname.swift
index a9f7731..da248df 100644
--- a/Tests/Expected/Strings/no-comments-swift3-context-customname.swift
+++ b/Tests/Expected/Strings/no-comments-swift3-context-customname.swift
@@ -9,13 +9,13 @@ import Foundation
enum XCTLoc {
case alertMessage
case alertTitle
- case greetings(String, Int)
case objectOwnership(Int, String, String)
+ case `private`(String, Int)
case applesCount(Int)
case bananasOwner(Int, String)
case settingsNavigationBarSelf
+ case settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
case settingsNavigationBarTitleEvenDeeper
- case settingsNavigationBarTitleEvenDeeperThanWeCanHandle
case seTTingsUSerProFileSectioNFooterText
case settingsUserProfileSectionHeaderTitle
}
@@ -30,20 +30,20 @@ extension XCTLoc: CustomStringConvertible {
return XCTLoc.tr(key: "alert_message")
case .alertTitle:
return XCTLoc.tr(key: "alert_title")
- case .greetings(let p1, let p2):
- return XCTLoc.tr(key: "greetings", p1, p2)
case .objectOwnership(let p1, let p2, let p3):
return XCTLoc.tr(key: "ObjectOwnership", p1, p2, p3)
+ case .`private`(let p1, let p2):
+ return XCTLoc.tr(key: "private", p1, p2)
case .applesCount(let p1):
return XCTLoc.tr(key: "apples.count", p1)
case .bananasOwner(let p1, let p2):
return XCTLoc.tr(key: "bananas.owner", p1, p2)
case .settingsNavigationBarSelf:
return XCTLoc.tr(key: "settings.navigation-bar.self")
+ case .settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ return XCTLoc.tr(key: "settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
case .settingsNavigationBarTitleEvenDeeper:
return XCTLoc.tr(key: "settings.navigation-bar.title.even.deeper")
- case .settingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- return XCTLoc.tr(key: "settings.navigation-bar.title.even.deeper.than.we.can.handle")
case .seTTingsUSerProFileSectioNFooterText:
return XCTLoc.tr(key: "seTTings.uSer-proFile-sectioN.footer_text")
case .settingsUserProfileSectionHeaderTitle:
diff --git a/Tests/Expected/Strings/no-comments-swift3-context-defaults.swift b/Tests/Expected/Strings/no-comments-swift3-context-defaults.swift
index 3992f3e..da8aac5 100644
--- a/Tests/Expected/Strings/no-comments-swift3-context-defaults.swift
+++ b/Tests/Expected/Strings/no-comments-swift3-context-defaults.swift
@@ -9,13 +9,13 @@ import Foundation
enum L10n {
case alertMessage
case alertTitle
- case greetings(String, Int)
case objectOwnership(Int, String, String)
+ case `private`(String, Int)
case applesCount(Int)
case bananasOwner(Int, String)
case settingsNavigationBarSelf
+ case settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
case settingsNavigationBarTitleEvenDeeper
- case settingsNavigationBarTitleEvenDeeperThanWeCanHandle
case seTTingsUSerProFileSectioNFooterText
case settingsUserProfileSectionHeaderTitle
}
@@ -30,20 +30,20 @@ extension L10n: CustomStringConvertible {
return L10n.tr(key: "alert_message")
case .alertTitle:
return L10n.tr(key: "alert_title")
- case .greetings(let p1, let p2):
- return L10n.tr(key: "greetings", p1, p2)
case .objectOwnership(let p1, let p2, let p3):
return L10n.tr(key: "ObjectOwnership", p1, p2, p3)
+ case .`private`(let p1, let p2):
+ return L10n.tr(key: "private", p1, p2)
case .applesCount(let p1):
return L10n.tr(key: "apples.count", p1)
case .bananasOwner(let p1, let p2):
return L10n.tr(key: "bananas.owner", p1, p2)
case .settingsNavigationBarSelf:
return L10n.tr(key: "settings.navigation-bar.self")
+ case .settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ return L10n.tr(key: "settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
case .settingsNavigationBarTitleEvenDeeper:
return L10n.tr(key: "settings.navigation-bar.title.even.deeper")
- case .settingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- return L10n.tr(key: "settings.navigation-bar.title.even.deeper.than.we.can.handle")
case .seTTingsUSerProFileSectioNFooterText:
return L10n.tr(key: "seTTings.uSer-proFile-sectioN.footer_text")
case .settingsUserProfileSectionHeaderTitle:
diff --git a/Tests/Expected/Strings/structured-context-customname.swift b/Tests/Expected/Strings/structured-context-customname.swift
index 4e3c157..a561546 100644
--- a/Tests/Expected/Strings/structured-context-customname.swift
+++ b/Tests/Expected/Strings/structured-context-customname.swift
@@ -13,10 +13,10 @@ enum XCTLoc {
case AlertMessage
/// Title of the alert
case AlertTitle
- /// Hello, my name is %@ and I'm %d
- case Greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case ObjectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case Private(String, Int)
case Apples(ApplesXCTLoc)
enum ApplesXCTLoc {
@@ -41,29 +41,49 @@ enum XCTLoc {
case Title(TitleXCTLoc)
enum TitleXCTLoc {
- case Even(EvenXCTLoc)
- enum EvenXCTLoc {
- /// Settings
- case Deeper
+ case Deeper(DeeperXCTLoc)
+ enum DeeperXCTLoc {
+
+ case Than(ThanXCTLoc)
+ enum ThanXCTLoc {
+
+ case We(WeXCTLoc)
+ enum WeXCTLoc {
- case Deeper(DeeperXCTLoc)
- enum DeeperXCTLoc {
+ case Can(CanXCTLoc)
+ enum CanXCTLoc {
- case Than(ThanXCTLoc)
- enum ThanXCTLoc {
+ case Handle(HandleXCTLoc)
+ enum HandleXCTLoc {
- case We(WeXCTLoc)
- enum WeXCTLoc {
+ case No(NoXCTLoc)
+ enum NoXCTLoc {
- case Can(CanXCTLoc)
- enum CanXCTLoc {
- /// DeepSettings
- case Handle
+ case Really(ReallyXCTLoc)
+ enum ReallyXCTLoc {
+
+ case This(ThisXCTLoc)
+ enum ThisXCTLoc {
+
+ case Is(IsXCTLoc)
+ enum IsXCTLoc {
+ /// DeepSettings
+ case Deep
+ }
+ }
+ }
+ }
}
}
}
}
}
+
+ case Even(EvenXCTLoc)
+ enum EvenXCTLoc {
+ /// Settings
+ case Deeper
+ }
}
}
@@ -86,10 +106,10 @@ extension XCTLoc: CustomStringConvertible {
return XCTLoc.tr("alert_message")
case .AlertTitle:
return XCTLoc.tr("alert_title")
- case .Greetings(let p1, let p2):
- return XCTLoc.tr("greetings", p1, p2)
case .ObjectOwnership(let p1, let p2, let p3):
return XCTLoc.tr("ObjectOwnership", p1, p2, p3)
+ case .Private(let p1, let p2):
+ return XCTLoc.tr("private", p1, p2)
case .Apples(let levelSubKeyApples):
switch levelSubKeyApples {
@@ -113,30 +133,50 @@ extension XCTLoc: CustomStringConvertible {
case .Title(let levelSubSubSubKeyTitle):
switch levelSubSubSubKeyTitle {
- case .Even(let levelSubSubSubSubKeyEven):
+ case .Deeper(let levelSubSubSubSubKeyDeeper):
- switch levelSubSubSubSubKeyEven {
- case .Deeper:
- return XCTLoc.tr("settings.navigation-bar.title.even.deeper")
- case .Deeper(let levelSubSubSubSubSubKeyDeeper):
+ switch levelSubSubSubSubKeyDeeper {
+ case .Than(let levelSubSubSubSubSubKeyThan):
+
+ switch levelSubSubSubSubSubKeyThan {
+ case .We(let levelSubSubSubSubSubSubKeyWe):
+
+ switch levelSubSubSubSubSubSubKeyWe {
+ case .Can(let levelSubSubSubSubSubSubSubKeyCan):
- switch levelSubSubSubSubSubKeyDeeper {
- case .Than(let levelSubSubSubSubSubSubKeyThan):
+ switch levelSubSubSubSubSubSubSubKeyCan {
+ case .Handle(let levelSubSubSubSubSubSubSubSubKeyHandle):
- switch levelSubSubSubSubSubSubKeyThan {
- case .We(let levelSubSubSubSubSubSubSubKeyWe):
+ switch levelSubSubSubSubSubSubSubSubKeyHandle {
+ case .No(let levelSubSubSubSubSubSubSubSubSubKeyNo):
- switch levelSubSubSubSubSubSubSubKeyWe {
- case .Can(let levelSubSubSubSubSubSubSubSubKeyCan):
+ switch levelSubSubSubSubSubSubSubSubSubKeyNo {
+ case .Really(let levelSubSubSubSubSubSubSubSubSubSubKeyReally):
- switch levelSubSubSubSubSubSubSubSubKeyCan {
- case .Handle:
- return XCTLoc.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
+ switch levelSubSubSubSubSubSubSubSubSubSubKeyReally {
+ case .This(let levelSubSubSubSubSubSubSubSubSubSubSubKeyThis):
+
+ switch levelSubSubSubSubSubSubSubSubSubSubSubKeyThis {
+ case .Is(let levelSubSubSubSubSubSubSubSubSubSubSubSubKeyIs):
+
+ switch levelSubSubSubSubSubSubSubSubSubSubSubSubKeyIs {
+ case .Deep:
+ return XCTLoc.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
+ }
+ }
+ }
+ }
}
}
}
}
}
+ case .Even(let levelSubSubSubSubKeyEven):
+
+ switch levelSubSubSubSubKeyEven {
+ case .Deeper:
+ return XCTLoc.tr("settings.navigation-bar.title.even.deeper")
+ }
}
}
case .UserProfileSection(let levelSubSubKeyUserProfileSection):
diff --git a/Tests/Expected/Strings/structured-context-defaults.swift b/Tests/Expected/Strings/structured-context-defaults.swift
index b6d6f69..d56a2fa 100644
--- a/Tests/Expected/Strings/structured-context-defaults.swift
+++ b/Tests/Expected/Strings/structured-context-defaults.swift
@@ -13,10 +13,10 @@ enum L10n {
case AlertMessage
/// Title of the alert
case AlertTitle
- /// Hello, my name is %@ and I'm %d
- case Greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case ObjectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case Private(String, Int)
case Apples(ApplesL10n)
enum ApplesL10n {
@@ -41,29 +41,49 @@ enum L10n {
case Title(TitleL10n)
enum TitleL10n {
- case Even(EvenL10n)
- enum EvenL10n {
- /// Settings
- case Deeper
+ case Deeper(DeeperL10n)
+ enum DeeperL10n {
+
+ case Than(ThanL10n)
+ enum ThanL10n {
+
+ case We(WeL10n)
+ enum WeL10n {
- case Deeper(DeeperL10n)
- enum DeeperL10n {
+ case Can(CanL10n)
+ enum CanL10n {
- case Than(ThanL10n)
- enum ThanL10n {
+ case Handle(HandleL10n)
+ enum HandleL10n {
- case We(WeL10n)
- enum WeL10n {
+ case No(NoL10n)
+ enum NoL10n {
- case Can(CanL10n)
- enum CanL10n {
- /// DeepSettings
- case Handle
+ case Really(ReallyL10n)
+ enum ReallyL10n {
+
+ case This(ThisL10n)
+ enum ThisL10n {
+
+ case Is(IsL10n)
+ enum IsL10n {
+ /// DeepSettings
+ case Deep
+ }
+ }
+ }
+ }
}
}
}
}
}
+
+ case Even(EvenL10n)
+ enum EvenL10n {
+ /// Settings
+ case Deeper
+ }
}
}
@@ -86,10 +106,10 @@ extension L10n: CustomStringConvertible {
return L10n.tr("alert_message")
case .AlertTitle:
return L10n.tr("alert_title")
- case .Greetings(let p1, let p2):
- return L10n.tr("greetings", p1, p2)
case .ObjectOwnership(let p1, let p2, let p3):
return L10n.tr("ObjectOwnership", p1, p2, p3)
+ case .Private(let p1, let p2):
+ return L10n.tr("private", p1, p2)
case .Apples(let levelSubKeyApples):
switch levelSubKeyApples {
@@ -113,30 +133,50 @@ extension L10n: CustomStringConvertible {
case .Title(let levelSubSubSubKeyTitle):
switch levelSubSubSubKeyTitle {
- case .Even(let levelSubSubSubSubKeyEven):
+ case .Deeper(let levelSubSubSubSubKeyDeeper):
- switch levelSubSubSubSubKeyEven {
- case .Deeper:
- return L10n.tr("settings.navigation-bar.title.even.deeper")
- case .Deeper(let levelSubSubSubSubSubKeyDeeper):
+ switch levelSubSubSubSubKeyDeeper {
+ case .Than(let levelSubSubSubSubSubKeyThan):
+
+ switch levelSubSubSubSubSubKeyThan {
+ case .We(let levelSubSubSubSubSubSubKeyWe):
+
+ switch levelSubSubSubSubSubSubKeyWe {
+ case .Can(let levelSubSubSubSubSubSubSubKeyCan):
- switch levelSubSubSubSubSubKeyDeeper {
- case .Than(let levelSubSubSubSubSubSubKeyThan):
+ switch levelSubSubSubSubSubSubSubKeyCan {
+ case .Handle(let levelSubSubSubSubSubSubSubSubKeyHandle):
- switch levelSubSubSubSubSubSubKeyThan {
- case .We(let levelSubSubSubSubSubSubSubKeyWe):
+ switch levelSubSubSubSubSubSubSubSubKeyHandle {
+ case .No(let levelSubSubSubSubSubSubSubSubSubKeyNo):
- switch levelSubSubSubSubSubSubSubKeyWe {
- case .Can(let levelSubSubSubSubSubSubSubSubKeyCan):
+ switch levelSubSubSubSubSubSubSubSubSubKeyNo {
+ case .Really(let levelSubSubSubSubSubSubSubSubSubSubKeyReally):
- switch levelSubSubSubSubSubSubSubSubKeyCan {
- case .Handle:
- return L10n.tr("settings.navigation-bar.title.even.deeper.than.we.can.handle")
+ switch levelSubSubSubSubSubSubSubSubSubSubKeyReally {
+ case .This(let levelSubSubSubSubSubSubSubSubSubSubSubKeyThis):
+
+ switch levelSubSubSubSubSubSubSubSubSubSubSubKeyThis {
+ case .Is(let levelSubSubSubSubSubSubSubSubSubSubSubSubKeyIs):
+
+ switch levelSubSubSubSubSubSubSubSubSubSubSubSubKeyIs {
+ case .Deep:
+ return L10n.tr("settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
+ }
+ }
+ }
+ }
}
}
}
}
}
+ case .Even(let levelSubSubSubSubKeyEven):
+
+ switch levelSubSubSubSubKeyEven {
+ case .Deeper:
+ return L10n.tr("settings.navigation-bar.title.even.deeper")
+ }
}
}
case .UserProfileSection(let levelSubSubKeyUserProfileSection):
diff --git a/Tests/Expected/Strings/swift3-context-customname.swift b/Tests/Expected/Strings/swift3-context-customname.swift
index 1520343..bc2cb49 100644
--- a/Tests/Expected/Strings/swift3-context-customname.swift
+++ b/Tests/Expected/Strings/swift3-context-customname.swift
@@ -11,20 +11,20 @@ enum XCTLoc {
case alertMessage
/// Title of the alert
case alertTitle
- /// Hello, my name is %@ and I'm %d
- case greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case objectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case `private`(String, Int)
/// You have %d apples
case applesCount(Int)
/// Those %d bananas belong to %@.
case bananasOwner(Int, String)
/// Some Reserved Keyword there
case settingsNavigationBarSelf
+ /// DeepSettings
+ case settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
/// Settings
case settingsNavigationBarTitleEvenDeeper
- /// DeepSettings
- case settingsNavigationBarTitleEvenDeeperThanWeCanHandle
/// Here you can change some user profile settings.
case seTTingsUSerProFileSectioNFooterText
/// User Profile Settings
@@ -41,20 +41,20 @@ extension XCTLoc: CustomStringConvertible {
return XCTLoc.tr(key: "alert_message")
case .alertTitle:
return XCTLoc.tr(key: "alert_title")
- case .greetings(let p1, let p2):
- return XCTLoc.tr(key: "greetings", p1, p2)
case .objectOwnership(let p1, let p2, let p3):
return XCTLoc.tr(key: "ObjectOwnership", p1, p2, p3)
+ case .`private`(let p1, let p2):
+ return XCTLoc.tr(key: "private", p1, p2)
case .applesCount(let p1):
return XCTLoc.tr(key: "apples.count", p1)
case .bananasOwner(let p1, let p2):
return XCTLoc.tr(key: "bananas.owner", p1, p2)
case .settingsNavigationBarSelf:
return XCTLoc.tr(key: "settings.navigation-bar.self")
+ case .settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ return XCTLoc.tr(key: "settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
case .settingsNavigationBarTitleEvenDeeper:
return XCTLoc.tr(key: "settings.navigation-bar.title.even.deeper")
- case .settingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- return XCTLoc.tr(key: "settings.navigation-bar.title.even.deeper.than.we.can.handle")
case .seTTingsUSerProFileSectioNFooterText:
return XCTLoc.tr(key: "seTTings.uSer-proFile-sectioN.footer_text")
case .settingsUserProfileSectionHeaderTitle:
diff --git a/Tests/Expected/Strings/swift3-context-defaults.swift b/Tests/Expected/Strings/swift3-context-defaults.swift
index a945ede..72f1faf 100644
--- a/Tests/Expected/Strings/swift3-context-defaults.swift
+++ b/Tests/Expected/Strings/swift3-context-defaults.swift
@@ -11,20 +11,20 @@ enum L10n {
case alertMessage
/// Title of the alert
case alertTitle
- /// Hello, my name is %@ and I'm %d
- case greetings(String, Int)
/// These are %3$@'s %1$d %2$@.
case objectOwnership(Int, String, String)
+ /// Hello, my name is %@ and I'm %d
+ case `private`(String, Int)
/// You have %d apples
case applesCount(Int)
/// Those %d bananas belong to %@.
case bananasOwner(Int, String)
/// Some Reserved Keyword there
case settingsNavigationBarSelf
+ /// DeepSettings
+ case settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep
/// Settings
case settingsNavigationBarTitleEvenDeeper
- /// DeepSettings
- case settingsNavigationBarTitleEvenDeeperThanWeCanHandle
/// Here you can change some user profile settings.
case seTTingsUSerProFileSectioNFooterText
/// User Profile Settings
@@ -41,20 +41,20 @@ extension L10n: CustomStringConvertible {
return L10n.tr(key: "alert_message")
case .alertTitle:
return L10n.tr(key: "alert_title")
- case .greetings(let p1, let p2):
- return L10n.tr(key: "greetings", p1, p2)
case .objectOwnership(let p1, let p2, let p3):
return L10n.tr(key: "ObjectOwnership", p1, p2, p3)
+ case .`private`(let p1, let p2):
+ return L10n.tr(key: "private", p1, p2)
case .applesCount(let p1):
return L10n.tr(key: "apples.count", p1)
case .bananasOwner(let p1, let p2):
return L10n.tr(key: "bananas.owner", p1, p2)
case .settingsNavigationBarSelf:
return L10n.tr(key: "settings.navigation-bar.self")
+ case .settingsNavigationBarTitleDeeperThanWeCanHandleNoReallyThisIsDeep:
+ return L10n.tr(key: "settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep")
case .settingsNavigationBarTitleEvenDeeper:
return L10n.tr(key: "settings.navigation-bar.title.even.deeper")
- case .settingsNavigationBarTitleEvenDeeperThanWeCanHandle:
- return L10n.tr(key: "settings.navigation-bar.title.even.deeper.than.we.can.handle")
case .seTTingsUSerProFileSectioNFooterText:
return L10n.tr(key: "seTTings.uSer-proFile-sectioN.footer_text")
case .settingsUserProfileSectionHeaderTitle:
diff --git a/templates/colors-default.stencil b/templates/colors-default.stencil
index 94e780e..3f61875 100644
--- a/templates/colors-default.stencil
+++ b/templates/colors-default.stencil
@@ -29,13 +29,13 @@ enum {{enumName}} {
{% for color in colors %}
///
/// Alpha: {{color.alpha|hexToInt|int255toFloat|percent}}
(0x{{color.rgba}})
- case {{color.name|swiftIdentifier}}
+ case {{color.name|swiftIdentifier|escapeReservedKeywords}}
{% endfor %}
var rgbaValue: UInt32 {
switch self {
{% for color in colors %}
- case .{{color.name|swiftIdentifier}}:
+ case .{{color.name|swiftIdentifier|escapeReservedKeywords}}:
return 0x{{color.rgba}}
{% endfor %}
}
diff --git a/templates/colors-rawValue.stencil b/templates/colors-rawValue.stencil
index aad630e..dcd30bd 100644
--- a/templates/colors-rawValue.stencil
+++ b/templates/colors-rawValue.stencil
@@ -28,7 +28,7 @@ enum {{enumName|swiftIdentifier}}: UInt32 {
{% for color in colors %}
///
/// Alpha: {{color.alpha|hexToInt|int255toFloat|percent}}
(0x{{color.rgba}})
- case {{color.name|swiftIdentifier}} = 0x{{color.rgba}}
+ case {{color.name|swiftIdentifier|escapeReservedKeywords}} = 0x{{color.rgba}}
{% endfor %}
var color: Color {
diff --git a/templates/colors-swift3.stencil b/templates/colors-swift3.stencil
index f4100e7..15b943e 100644
--- a/templates/colors-swift3.stencil
+++ b/templates/colors-swift3.stencil
@@ -29,13 +29,13 @@ enum {{enumName}} {
{% for color in colors %}
///
/// Alpha: {{color.alpha|hexToInt|int255toFloat|percent}}
(0x{{color.rgba}})
- case {{color.name|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}
+ case {{color.name|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}
{% endfor %}
var rgbaValue: UInt32 {
switch self {
{% for color in colors %}
- case .{{color.name|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}:
+ case .{{color.name|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}:
return 0x{{color.rgba}}
{% endfor %}
}
diff --git a/templates/fonts-default.stencil b/templates/fonts-default.stencil
index 2b48033..ddbd0b0 100644
--- a/templates/fonts-default.stencil
+++ b/templates/fonts-default.stencil
@@ -32,9 +32,9 @@ extension Font {
enum {{enumName}} {
{% for family in families %}
- enum {{family.name|swiftIdentifier|snakeToCamelCaseNoPrefix}}: String, FontConvertible {
+ enum {{family.name|swiftIdentifier|snakeToCamelCaseNoPrefix|escapeReservedKeywords}}: String, FontConvertible {
{% for font in family.fonts %}
- case {{font.style|swiftIdentifier|snakeToCamelCaseNoPrefix}} = "{{font.fontName}}"
+ case {{font.style|swiftIdentifier|snakeToCamelCaseNoPrefix|escapeReservedKeywords}} = "{{font.fontName}}"
{% endfor %}
}
{% endfor %}
diff --git a/templates/fonts-swift3.stencil b/templates/fonts-swift3.stencil
index fc08509..20cbc4b 100644
--- a/templates/fonts-swift3.stencil
+++ b/templates/fonts-swift3.stencil
@@ -32,9 +32,9 @@ extension Font {
enum {{enumName}} {
{% for family in families %}
- enum {{family.name|swiftIdentifier|snakeToCamelCaseNoPrefix}}: String, FontConvertible {
+ enum {{family.name|swiftIdentifier|snakeToCamelCaseNoPrefix|escapeReservedKeywords}}: String, FontConvertible {
{% for font in family.fonts %}
- case {{font.style|swiftIdentifier|snakeToCamelCaseNoPrefix|lowerFirstWord}} = "{{font.fontName}}"
+ case {{font.style|swiftIdentifier|snakeToCamelCaseNoPrefix|lowerFirstWord|escapeReservedKeywords}} = "{{font.fontName}}"
{% endfor %}
}
{% endfor %}
diff --git a/templates/images-allvalues.stencil b/templates/images-allvalues.stencil
index 890eb55..009fedd 100644
--- a/templates/images-allvalues.stencil
+++ b/templates/images-allvalues.stencil
@@ -14,7 +14,7 @@
{% macro recursiveCaseBlock images %}
{% for image in images %}
{% if not image.items %}
- case {{image.value|swiftIdentifier}} = "{{image.value}}"
+ case {{image.value|swiftIdentifier|escapeReservedKeywords}} = "{{image.value}}"
{% else %}
{% call recursiveCaseBlock image.items %}
{% endif %}
@@ -23,7 +23,7 @@
{% macro recursiveValueBlock images isLast %}
{% for image in images %}
{% if not image.items %}
- {{image.value|swiftIdentifier}}{% if not forloop.last or not isLast %},{% endif %}
+ {{image.value|swiftIdentifier|escapeReservedKeywords}}{% if not forloop.last or not isLast %},{% endif %}
{% else %}
{% call recursiveValueBlock image.items forloop.last %}
{% endif %}
diff --git a/templates/images-default.stencil b/templates/images-default.stencil
index d88e2cb..5cfe753 100644
--- a/templates/images-default.stencil
+++ b/templates/images-default.stencil
@@ -14,7 +14,7 @@
{% macro recursiveBlock images %}
{% for image in images %}
{% if not image.items %}
- case {{image.value|swiftIdentifier}} = "{{image.value}}"
+ case {{image.value|swiftIdentifier|escapeReservedKeywords}} = "{{image.value}}"
{% else %}
{% call recursiveBlock image.items %}
{% endif %}
diff --git a/templates/images-dot-syntax-swift3.stencil b/templates/images-dot-syntax-swift3.stencil
index 2add6c6..35dcd9a 100644
--- a/templates/images-dot-syntax-swift3.stencil
+++ b/templates/images-dot-syntax-swift3.stencil
@@ -35,9 +35,9 @@ struct {{enumName}}Type: ExpressibleByStringLiteral {
{% macro recursiveBlock images sp %}
{{sp}} {% for image in images %}
{{sp}} {% if not image.items %}
-{{sp}} static let {{image.name|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}: {{enumName}}Type = "{{image.value}}"
+{{sp}} static let {{image.name|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}: {{enumName}}Type = "{{image.value}}"
{{sp}} {% else %}
-{{sp}} enum {{image.name|swiftIdentifier|snakeToCamelCase}} {
+{{sp}} enum {{image.name|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}} {
{{sp}} {% set sp2 %}{{sp}} {% endset %}
{{sp}} {% call recursiveBlock image.items sp2 %}
{{sp}} }
@@ -49,7 +49,7 @@ struct {{enumName}}Type: ExpressibleByStringLiteral {
enum {{enumName}} {
{% if catalogs.count > 1 %}
{% for catalog in catalogs %}
- enum {{catalog.name|swiftIdentifier|snakeToCamelCase}} {
+ enum {{catalog.name|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}} {
{% call recursiveBlock catalog.assets " " %}
}
{% endfor %}
diff --git a/templates/images-dot-syntax.stencil b/templates/images-dot-syntax.stencil
index 025190e..26e1e71 100644
--- a/templates/images-dot-syntax.stencil
+++ b/templates/images-dot-syntax.stencil
@@ -35,9 +35,9 @@ struct {{enumName}}Type: StringLiteralConvertible {
{% macro recursiveBlock images sp %}
{{sp}} {% for image in images %}
{{sp}} {% if not image.items %}
-{{sp}} static let {{image.name|swiftIdentifier|snakeToCamelCase}}: {{enumName}}Type = "{{image.value}}"
+{{sp}} static let {{image.name|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}}: {{enumName}}Type = "{{image.value}}"
{{sp}} {% else %}
-{{sp}} enum {{image.name|swiftIdentifier|snakeToCamelCase}} {
+{{sp}} enum {{image.name|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}} {
{{sp}} {% set sp2 %}{{sp}} {% endset %}
{{sp}} {% call recursiveBlock image.items sp2 %}
{{sp}} }
@@ -49,7 +49,7 @@ struct {{enumName}}Type: StringLiteralConvertible {
enum {{enumName}} {
{% if catalogs.count > 1 %}
{% for catalog in catalogs %}
- enum {{catalog.name|swiftIdentifier|titlecase|snakeToCamelCase}} {
+ enum {{catalog.name|swiftIdentifier|titlecase|snakeToCamelCase|escapeReservedKeywords}} {
{% call recursiveBlock catalog.assets " " %}
}
{% endfor %}
diff --git a/templates/images-swift3.stencil b/templates/images-swift3.stencil
index 6f5430e..5d6ddfc 100644
--- a/templates/images-swift3.stencil
+++ b/templates/images-swift3.stencil
@@ -14,7 +14,7 @@
{% macro recursiveBlock images %}
{% for image in images %}
{% if not image.items %}
- case {{image.value|swiftIdentifier|snakeToCamelCase|lowerFirstWord}} = "{{image.value}}"
+ case {{image.value|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}} = "{{image.value}}"
{% else %}
{% call recursiveBlock image.items %}
{% endif %}
diff --git a/templates/storyboards-default.stencil b/templates/storyboards-default.stencil
index a4bde7e..bbf132f 100644
--- a/templates/storyboards-default.stencil
+++ b/templates/storyboards-default.stencil
@@ -50,7 +50,7 @@ extension UIViewController {
{% if storyboards %}
enum {{sceneEnumName}} {
{% for storyboard in storyboards %}
- {% set storyboardName %}{{storyboard.name|swiftIdentifier}}{% endset %}
+ {% set storyboardName %}{{storyboard.name|swiftIdentifier|escapeReservedKeywords}}{% endset %}
{% if storyboard.scenes %}
enum {{storyboardName}}: String, StoryboardSceneType {
static let storyboardName = "{{storyboard.name}}"
@@ -104,10 +104,10 @@ enum {{sceneEnumName}} {
enum {{segueEnumName}} {
{% for storyboard in storyboards %}{% if storyboard.segues %}
- enum {{storyboard.name|swiftIdentifier}}: String, StoryboardSegueType {
+ enum {{storyboard.name|swiftIdentifier|escapeReservedKeywords}}: String, StoryboardSegueType {
{% for segue in storyboard.segues %}
{% set segueID %}{{segue.identifier|swiftIdentifier}}{% endset %}
- case {{segueID}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
+ case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
{% endfor %}
}
{% endif %}{% endfor %}
diff --git a/templates/storyboards-lowercase.stencil b/templates/storyboards-lowercase.stencil
index f7ffbb5..2bdd0a0 100644
--- a/templates/storyboards-lowercase.stencil
+++ b/templates/storyboards-lowercase.stencil
@@ -50,7 +50,7 @@ extension UIViewController {
{% if storyboards %}
enum {{sceneEnumName}} {
{% for storyboard in storyboards %}
- {% set storyboardName %}{{storyboard.name|swiftIdentifier}}{% endset %}
+ {% set storyboardName %}{{storyboard.name|swiftIdentifier|escapeReservedKeywords}}{% endset %}
{% if storyboard.scenes %}
enum {{storyboardName}}: String, StoryboardSceneType {
static let storyboardName = "{{storyboard.name}}"
@@ -67,11 +67,11 @@ enum {{sceneEnumName}} {
{% for scene in storyboard.scenes %}
{% set sceneID %}{{scene.identifier|swiftIdentifier|lowerFirstWord}}{% endset %}
- case {{sceneID}}{% if sceneID != scene.identifier %} = "{{scene.identifier}}"{% endif %}
+ case {{sceneID|escapeReservedKeywords}}{% if sceneID != scene.identifier %} = "{{scene.identifier}}"{% endif %}
{% if scene.baseType != "ViewController" %}
{% set sceneClass %}{% call className scene %}{% endset %}
static func {{sceneID}}ViewController() -> {{sceneClass}} {
- guard let vc = {{sceneEnumName}}.{{storyboardName}}.{{sceneID}}.viewController() as? {{sceneClass}}
+ guard let vc = {{sceneEnumName}}.{{storyboardName}}.{{sceneID|escapeReservedKeywords}}.viewController() as? {{sceneClass}}
else {
fatalError("ViewController '{{scene.identifier}}' is not of the expected class {{sceneClass}}.")
}
@@ -104,10 +104,10 @@ enum {{sceneEnumName}} {
enum {{segueEnumName}} {
{% for storyboard in storyboards %}{% if storyboard.segues %}
- enum {{storyboard.name|swiftIdentifier}}: String, StoryboardSegueType {
+ enum {{storyboard.name|swiftIdentifier|escapeReservedKeywords}}: String, StoryboardSegueType {
{% for segue in storyboard.segues %}
{% set segueID %}{{segue.identifier|swiftIdentifier}}{% endset %}
- case {{segueID}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
+ case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
{% endfor %}
}
{% endif %}{% endfor %}
diff --git a/templates/storyboards-osx-default.stencil b/templates/storyboards-osx-default.stencil
index a1439e0..c4b12d5 100644
--- a/templates/storyboards-osx-default.stencil
+++ b/templates/storyboards-osx-default.stencil
@@ -57,7 +57,7 @@ extension NSViewController {
{% if storyboards %}
enum {{sceneEnumName}} {
{% for storyboard in storyboards %}
- {% set storyboardName %}{{storyboard.name|swiftIdentifier}}{% endset %}
+ {% set storyboardName %}{{storyboard.name|swiftIdentifier|escapeReservedKeywords}}{% endset %}
{% if storyboard.scenes %}
enum {{storyboardName}}: String, StoryboardSceneType {
static let storyboardName = "{{storyboard.name}}"
@@ -85,10 +85,10 @@ enum {{sceneEnumName}} {
enum {{segueEnumName}} {
{% for storyboard in storyboards %}{% if storyboard.segues %}
- enum {{storyboard.name|swiftIdentifier}}: String, StoryboardSegueType {
+ enum {{storyboard.name|swiftIdentifier|escapeReservedKeywords}}: String, StoryboardSegueType {
{% for segue in storyboard.segues %}
{% set segueID %}{{segue.identifier|swiftIdentifier}}{% endset %}
- case {{segueID}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
+ case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
{% endfor %}
}
{% endif %}{% endfor %}
diff --git a/templates/storyboards-osx-lowercase.stencil b/templates/storyboards-osx-lowercase.stencil
index fef0aaa..b47c920 100644
--- a/templates/storyboards-osx-lowercase.stencil
+++ b/templates/storyboards-osx-lowercase.stencil
@@ -57,7 +57,7 @@ extension NSViewController {
{% if storyboards %}
enum {{sceneEnumName}} {
{% for storyboard in storyboards %}
- {% set storyboardName %}{{storyboard.name|swiftIdentifier}}{% endset %}
+ {% set storyboardName %}{{storyboard.name|swiftIdentifier|escapeReservedKeywords}}{% endset %}
{% if storyboard.scenes %}
enum {{storyboardName}}: String, StoryboardSceneType {
static let storyboardName = "{{storyboard.name}}"
@@ -85,10 +85,10 @@ enum {{sceneEnumName}} {
enum {{segueEnumName}} {
{% for storyboard in storyboards %}{% if storyboard.segues %}
- enum {{storyboard.name|swiftIdentifier}}: String, StoryboardSegueType {
+ enum {{storyboard.name|swiftIdentifier|escapeReservedKeywords}}: String, StoryboardSegueType {
{% for segue in storyboard.segues %}
{% set segueID %}{{segue.identifier|swiftIdentifier}}{% endset %}
- case {{segueID}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
+ case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
{% endfor %}
}
{% endif %}{% endfor %}
diff --git a/templates/storyboards-osx-swift3.stencil b/templates/storyboards-osx-swift3.stencil
index d0fa302..ed46d81 100644
--- a/templates/storyboards-osx-swift3.stencil
+++ b/templates/storyboards-osx-swift3.stencil
@@ -57,7 +57,7 @@ extension NSViewController {
{% if storyboards %}
enum {{sceneEnumName}} {
{% for storyboard in storyboards %}
- {% set storyboardName %}{{storyboard.name|swiftIdentifier}}{% endset %}
+ {% set storyboardName %}{{storyboard.name|swiftIdentifier|escapeReservedKeywords}}{% endset %}
{% if storyboard.scenes %}
enum {{storyboardName}}: String, StoryboardSceneType {
static let storyboardName = "{{storyboard.name}}"
@@ -85,10 +85,10 @@ enum {{sceneEnumName}} {
enum {{segueEnumName}} {
{% for storyboard in storyboards %}{% if storyboard.segues %}
- enum {{storyboard.name|swiftIdentifier}}: String, StoryboardSegueType {
+ enum {{storyboard.name|swiftIdentifier|escapeReservedKeywords}}: String, StoryboardSegueType {
{% for segue in storyboard.segues %}
{% set segueID %}{{segue.identifier|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}{% endset %}
- case {{segueID}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
+ case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
{% endfor %}
}
{% endif %}{% endfor %}
diff --git a/templates/storyboards-swift3.stencil b/templates/storyboards-swift3.stencil
index d80a04c..1a392dc 100644
--- a/templates/storyboards-swift3.stencil
+++ b/templates/storyboards-swift3.stencil
@@ -50,7 +50,7 @@ extension UIViewController {
{% if storyboards %}
enum {{sceneEnumName}} {
{% for storyboard in storyboards %}
- {% set storyboardName %}{{storyboard.name|swiftIdentifier}}{% endset %}
+ {% set storyboardName %}{{storyboard.name|swiftIdentifier|escapeReservedKeywords}}{% endset %}
{% if storyboard.scenes %}
enum {{storyboardName}}: String, StoryboardSceneType {
static let storyboardName = "{{storyboard.name}}"
@@ -104,10 +104,10 @@ enum {{sceneEnumName}} {
enum {{segueEnumName}} {
{% for storyboard in storyboards %}{% if storyboard.segues %}
- enum {{storyboard.name|swiftIdentifier}}: String, StoryboardSegueType {
+ enum {{storyboard.name|swiftIdentifier|escapeReservedKeywords}}: String, StoryboardSegueType {
{% for segue in storyboard.segues %}
{% set segueID %}{{segue.identifier|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}{% endset %}
- case {{segueID}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
+ case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
{% endfor %}
}
{% endif %}{% endfor %}
diff --git a/templates/storyboards-uppercase.stencil b/templates/storyboards-uppercase.stencil
index b6d1077..cd39064 100644
--- a/templates/storyboards-uppercase.stencil
+++ b/templates/storyboards-uppercase.stencil
@@ -50,7 +50,7 @@ extension UIViewController {
{% if storyboards %}
enum {{sceneEnumName}} {
{% for storyboard in storyboards %}
- {% set storyboardName %}{{storyboard.name|swiftIdentifier}}{% endset %}
+ {% set storyboardName %}{{storyboard.name|swiftIdentifier|escapeReservedKeywords}}{% endset %}
{% if storyboard.scenes %}
enum {{storyboardName}}: String, StoryboardSceneType {
static let storyboardName = "{{storyboard.name}}"
@@ -67,11 +67,11 @@ enum {{sceneEnumName}} {
{% for scene in storyboard.scenes %}
{% set sceneID %}{{scene.identifier|swiftIdentifier}}{% endset %}
- case {{sceneID}}{% if sceneID != scene.identifier %} = "{{scene.identifier}}"{% endif %}
+ case {{sceneID|escapeReservedKeywords}}{% if sceneID != scene.identifier %} = "{{scene.identifier}}"{% endif %}
{% if scene.baseType != "ViewController" %}
{% set sceneClass %}{% call className scene %}{% endset %}
static func {{sceneID|snakeToCamelCase|lowerFirstWord}}ViewController() -> {{sceneClass}} {
- guard let vc = {{sceneEnumName}}.{{storyboardName}}.{{sceneID}}.viewController() as? {{sceneClass}}
+ guard let vc = {{sceneEnumName}}.{{storyboardName}}.{{sceneID|escapeReservedKeywords}}.viewController() as? {{sceneClass}}
else {
fatalError("ViewController '{{scene.identifier}}' is not of the expected class {{sceneClass}}.")
}
@@ -104,10 +104,10 @@ enum {{sceneEnumName}} {
enum {{segueEnumName}} {
{% for storyboard in storyboards %}{% if storyboard.segues %}
- enum {{storyboard.name|swiftIdentifier}}: String, StoryboardSegueType {
+ enum {{storyboard.name|swiftIdentifier|escapeReservedKeywords}}: String, StoryboardSegueType {
{% for segue in storyboard.segues %}
{% set segueID %}{{segue.identifier|swiftIdentifier}}{% endset %}
- case {{segueID}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
+ case {{segueID|escapeReservedKeywords}}{% if segueID != segue.identifier %} = "{{segue.identifier}}"{% endif %}
{% endfor %}
}
{% endif %}{% endfor %}
diff --git a/templates/strings-default.stencil b/templates/strings-default.stencil
index 9a5f27a..9ee6cae 100644
--- a/templates/strings-default.stencil
+++ b/templates/strings-default.stencil
@@ -8,7 +8,7 @@ import Foundation
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
/// {{string.translation}}
- case {{string.key|swiftIdentifier|snakeToCamelCase}}{% if string.params %}({{string.params.types|join}}){% endif %}
+ case {{string.key|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}}{% if string.params %}({{string.params.types|join}}){% endif %}
{% endfor %}
{% for subenum in strings.subenums %}
{% call recursiveBlock subenum %}
@@ -26,10 +26,10 @@ enum {{enumName}} {
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
{% if string.params %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase}}({% call parametersBlock string.params %}):
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}}({% call parametersBlock string.params %}):
return {{enumName}}.tr("{{string.key}}", {% call argumentsBlock string.params %})
{% else %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase}}:
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}}:
return {{enumName}}.tr("{{string.key}}")
{% endif %}
{% endfor %}
diff --git a/templates/strings-genstrings.stencil b/templates/strings-genstrings.stencil
index 4b9c411..a602826 100644
--- a/templates/strings-genstrings.stencil
+++ b/templates/strings-genstrings.stencil
@@ -7,7 +7,7 @@ import Foundation
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
/// {{string.translation}}
- case {{string.key|swiftIdentifier|snakeToCamelCase}}{% if string.params %}({{string.params.types|join}}){% endif %}
+ case {{string.key|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}}{% if string.params %}({{string.params.types|join}}){% endif %}
{% endfor %}
{% for subenum in strings.subenums %}
{% call recursiveBlock subenum %}
@@ -23,11 +23,11 @@ enum {{enumName}} {
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
{% if string.params %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase}}({% call parametersBlock string.params %}):
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}}({% call parametersBlock string.params %}):
let format = NSLocalizedString("{{string.key}}", comment: "")
return {{enumName}}.tr(format, {% call argumentsBlock string.params %})
{% else %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase}}:
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|escapeReservedKeywords}}:
let format = NSLocalizedString("{{string.key}}", comment: "")
return {{enumName}}.tr(format)
{% endif %}
diff --git a/templates/strings-no-comments-swift3.stencil b/templates/strings-no-comments-swift3.stencil
index ca44a3f..d693727 100644
--- a/templates/strings-no-comments-swift3.stencil
+++ b/templates/strings-no-comments-swift3.stencil
@@ -7,7 +7,7 @@ import Foundation
// swiftlint:disable line_length
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
- case {{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}{% if string.params %}({{string.params.types|join}}){% endif %}
+ case {{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}{% if string.params %}({{string.params.types|join}}){% endif %}
{% endfor %}
{% for subenum in strings.subenums %}
{% call recursiveBlock subenum %}
@@ -25,10 +25,10 @@ enum {{enumName}} {
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
{% if string.params %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}({% call parametersBlock string.params %}):
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}({% call parametersBlock string.params %}):
return {{enumName}}.tr(key: "{{string.key}}", {% call argumentsBlock string.params %})
{% else %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}:
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}:
return {{enumName}}.tr(key: "{{string.key}}")
{% endif %}
{% endfor %}
diff --git a/templates/strings-swift3.stencil b/templates/strings-swift3.stencil
index ef7435f..a3196ce 100644
--- a/templates/strings-swift3.stencil
+++ b/templates/strings-swift3.stencil
@@ -8,7 +8,7 @@ import Foundation
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
/// {{string.translation}}
- case {{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}{% if string.params %}({{string.params.types|join}}){% endif %}
+ case {{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}{% if string.params %}({{string.params.types|join}}){% endif %}
{% endfor %}
{% for subenum in strings.subenums %}
{% call recursiveBlock subenum %}
@@ -26,10 +26,10 @@ enum {{enumName}} {
{% macro recursiveBlock strings %}
{% for string in strings.strings %}
{% if string.params %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}({% call parametersBlock string.params %}):
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}({% call parametersBlock string.params %}):
return {{enumName}}.tr(key: "{{string.key}}", {% call argumentsBlock string.params %})
{% else %}
- case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord}}:
+ case .{{string.key|swiftIdentifier|snakeToCamelCase|lowerFirstWord|escapeReservedKeywords}}:
return {{enumName}}.tr(key: "{{string.key}}")
{% endif %}
{% endfor %}