Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 383130b

Browse files
authored
Merge pull request #223 from wordpress-mobile/fix/220-remove-spaces
Remove whitespace from translation string
2 parents 31a0fa7 + 38cbfda commit 383130b

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressAuthenticator"
3-
s.version = "1.11.0"
3+
s.version = "1.11.2"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC

WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ extension WPStyleGuide {
153153
width: Constants.googleIconButtonSize, height: Constants.googleIconButtonSize)
154154

155155
let buttonString = NSMutableAttributedString(attachment: googleAttachment)
156-
let googleTitle = NSLocalizedString(" Continue with Google", comment: "Button title. Tapping begins log in using Google. There are leading spaces to separate it from the Google logo.")
156+
// Add leading non-breaking spaces to separate the button text from the Google logo.
157+
let googleTitle = "\u{00a0}\u{00a0}" + NSLocalizedString("Continue with Google", comment: "Button title. Tapping begins log in using Google.")
157158
buttonString.append(NSAttributedString(string: googleTitle))
158159

159160
return buttonString
@@ -177,7 +178,8 @@ extension WPStyleGuide {
177178
width: imageSize.width, height: imageSize.height)
178179

179180
let buttonString = NSMutableAttributedString(attachment: appleAttachment)
180-
let appleTitle = NSLocalizedString(" Continue with Apple", comment: "Button title. Tapping begins log in using Apple. There is a leading space to separate it from the Apple logo.")
181+
// Add leading non-breaking space to separate the button text from the Apple logo.
182+
let appleTitle = "\u{00a0}" + NSLocalizedString("Continue with Apple", comment: "Button title. Tapping begins log in using Apple.")
181183
buttonString.append(NSAttributedString(string: appleTitle))
182184

183185
return buttonString

WordPressAuthenticator/NUX/NUXButton.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,18 @@ import WordPressKit
111111
/// Setup: Everything = [Insets, Backgrounds, titleColor(s), titleLabel]
112112
///
113113
private func configureAppearance() {
114+
configureInsets()
114115
configureBackgrounds()
115116
configureTitleColors()
116117
configureTitleLabel()
117118
}
118119

120+
/// Setup: NUXButton's Default Settings
121+
///
122+
private func configureInsets() {
123+
contentEdgeInsets = UIImage.DefaultRenderMetrics.contentInsets
124+
}
125+
119126
/// Setup: BackgroundImage
120127
///
121128
private func configureBackgrounds() {

0 commit comments

Comments
 (0)