Skip to content

Commit ef99081

Browse files
authored
Merge branch 'master' into viewcontroller-scene
2 parents ac46bfd + ec27247 commit ef99081

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

R.swift.Library

R.swift/Generators/StoryboardGenerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ struct StoryboardGenerator: Generator {
148148
// Validation
149149
let validateImagesLines = Set(storyboard.usedImageIdentifiers)
150150
.map {
151-
"if UIImage(named: \"\($0)\") == nil { throw ValidationError(description: \"[R.swift] Image named '\($0)' is used in storyboard '\(storyboard.name)', but couldn't be loaded.\") }"
151+
"if UIImage(named: \"\($0)\") == nil { throw Rswift.ValidationError(description: \"[R.swift] Image named '\($0)' is used in storyboard '\(storyboard.name)', but couldn't be loaded.\") }"
152152
}
153153
let validateViewControllersLines = storyboard.viewControllers
154154
.flatMap { vc in
155155
vc.storyboardIdentifier.map {
156-
"if _R.storyboard.\(sanitizedSwiftName(storyboard.name))().\(sanitizedSwiftName($0))() == nil { throw ValidationError(description:\"[R.swift] ViewController with identifier '\(sanitizedSwiftName($0))' could not be loaded from storyboard '\(storyboard.name)' as '\(vc.type)'.\") }"
156+
"if _R.storyboard.\(sanitizedSwiftName(storyboard.name))().\(sanitizedSwiftName($0))() == nil { throw Rswift.ValidationError(description:\"[R.swift] ViewController with identifier '\(sanitizedSwiftName($0))' could not be loaded from storyboard '\(storyboard.name)' as '\(vc.type)'.\") }"
157157
}
158158
}
159159
let validateLines = validateImagesLines + validateViewControllersLines

R.swift/Generators/StringsGenerator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ struct StringsGenerator: Generator {
188188
isStatic: true,
189189
name: values.key,
190190
typeDefinition: .Inferred(Type.StringResource),
191-
value: "StringResource(key: \"\(escapedKey)\", tableName: \"\(values.tableName)\", locales: [\(locales)])"
191+
value: "StringResource(key: \"\(escapedKey)\", tableName: \"\(values.tableName)\", bundle: _R.hostingBundle, locales: [\(locales)])"
192192
)
193193
}
194194

@@ -274,10 +274,10 @@ private struct StringValues {
274274
let escapedKey = key.escapedStringLiteral
275275

276276
if tableName == "Localizable" {
277-
return "NSLocalizedString(\"\(escapedKey)\", comment: \"\")"
277+
return "NSLocalizedString(\"\(escapedKey)\", bundle: _R.hostingBundle, comment: \"\")"
278278
}
279279
else {
280-
return "NSLocalizedString(\"\(escapedKey)\", tableName: \"\(tableName)\", comment: \"\")"
280+
return "NSLocalizedString(\"\(escapedKey)\", bundle: _R.hostingBundle, tableName: \"\(tableName)\", comment: \"\")"
281281
}
282282
}
283283

0 commit comments

Comments
 (0)