diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj index 2874a263..35f11ada 100644 --- a/Mastodon.xcodeproj/project.pbxproj +++ b/Mastodon.xcodeproj/project.pbxproj @@ -8,7 +8,7 @@ /* Begin PBXBuildFile section */ 0FAA0FDF25E0B57E0017CCDE /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FAA0FDE25E0B57E0017CCDE /* WelcomeViewController.swift */; }; - 0FAA101225E105390017CCDE /* MasActionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FAA101125E105390017CCDE /* MasActionButton.swift */; }; + 0FAA101225E105390017CCDE /* PrimaryActionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FAA101125E105390017CCDE /* PrimaryActionButton.swift */; }; 0FAA101C25E10E760017CCDE /* UIFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FAA101B25E10E760017CCDE /* UIFont.swift */; }; 0FAA102725E1126A0017CCDE /* PickServerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FAA102625E1126A0017CCDE /* PickServerViewController.swift */; }; 18BC7629F65E6DB12CB8416D /* Pods_Mastodon_MastodonUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C030226D3C73DCC23D67452 /* Pods_Mastodon_MastodonUITests.framework */; }; @@ -186,7 +186,7 @@ /* Begin PBXFileReference section */ 0FAA0FDE25E0B57E0017CCDE /* WelcomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = ""; }; - 0FAA101125E105390017CCDE /* MasActionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasActionButton.swift; sourceTree = ""; }; + 0FAA101125E105390017CCDE /* PrimaryActionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimaryActionButton.swift; sourceTree = ""; }; 0FAA101B25E10E760017CCDE /* UIFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIFont.swift; sourceTree = ""; }; 0FAA102625E1126A0017CCDE /* PickServerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickServerViewController.swift; sourceTree = ""; }; 2D04F42425C255B9003F936F /* APIService+PublicTimeline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "APIService+PublicTimeline.swift"; sourceTree = ""; }; @@ -449,7 +449,7 @@ DB5086A425CC0B7000C2C187 /* AvatarBarButtonItem.swift */, 2D42FF8425C8224F004A627A /* HitTestExpandedButton.swift */, 2D5A3D1025CF87AA002347D6 /* AvatarBarButtonItem.swift */, - 0FAA101125E105390017CCDE /* MasActionButton.swift */, + 0FAA101125E105390017CCDE /* PrimaryActionButton.swift */, ); path = Button; sourceTree = ""; @@ -1244,7 +1244,7 @@ 2D61335E25C1894B00CAE157 /* APIService.swift in Sources */, 2D38F1F725CD47AC00561493 /* HomeTimelineViewModel+LoadOldestState.swift in Sources */, 2D5A3D3825CF8D9F002347D6 /* ScrollViewContainer.swift in Sources */, - 0FAA101225E105390017CCDE /* MasActionButton.swift in Sources */, + 0FAA101225E105390017CCDE /* PrimaryActionButton.swift in Sources */, DB8AF53025C13561002E6C99 /* AppContext.swift in Sources */, 2D38F1F125CD477D00561493 /* HomeTimelineViewModel+LoadMiddleState.swift in Sources */, DB45FAD725CA6C76005A8AC7 /* UIBarButtonItem.swift in Sources */, diff --git a/Mastodon/Extension/UIView.swift b/Mastodon/Extension/UIView.swift index 41d4edc5..7e1ba379 100644 --- a/Mastodon/Extension/UIView.swift +++ b/Mastodon/Extension/UIView.swift @@ -7,7 +7,7 @@ import UIKit -// MARK: -Convinience view creation method +// MARK: - Convinience view creation method extension UIView { static var separatorLine: UIView { @@ -26,7 +26,7 @@ extension UIView { } -// MARK: -Convinience view appearance modification method +// MARK: - Convinience view appearance modification method extension UIView { @discardableResult func applyCornerRadius(radius: CGFloat) -> Self { diff --git a/Mastodon/Generated/Strings.swift b/Mastodon/Generated/Strings.swift index 557e4c77..57eb6b5d 100644 --- a/Mastodon/Generated/Strings.swift +++ b/Mastodon/Generated/Strings.swift @@ -26,8 +26,10 @@ internal enum L10n { } } internal enum Label { + /// Pick a server,\nany server. + internal static let pickAServer = L10n.tr("Localizable", "Common.Label.PickAServer") /// Social networking\nback in your hands. - internal static let slogon = L10n.tr("Localizable", "Common.Label.Slogon") + internal static let slogan = L10n.tr("Localizable", "Common.Label.Slogan") } } } diff --git a/Mastodon/Resources/en.lproj/Localizable.strings b/Mastodon/Resources/en.lproj/Localizable.strings index f12ca95d..75f94b5a 100644 --- a/Mastodon/Resources/en.lproj/Localizable.strings +++ b/Mastodon/Resources/en.lproj/Localizable.strings @@ -6,7 +6,7 @@ */ "Common.Controls.Timeline.LoadMore" = "Load More"; -"Common.Label.Slogon" = "Social networking\nback in your hands."; +"Common.Label.Slogan" = "Social networking\nback in your hands."; "Common.Label.PickAServer" = "Pick a server,\nany server."; "Button.SignUp" = "Sign Up"; diff --git a/Mastodon/Scene/PickServer/PickServerViewController.swift b/Mastodon/Scene/PickServer/PickServerViewController.swift index 8bff4edb..10027fdc 100644 --- a/Mastodon/Scene/PickServer/PickServerViewController.swift +++ b/Mastodon/Scene/PickServer/PickServerViewController.swift @@ -12,7 +12,7 @@ class PickServerViewController: UIViewController { let label = UILabel() label.font = .boldSystemFont(ofSize: 34) label.textColor = Asset.Colors.Label.black.color - label.text = L10n.Common.Label.slogon + label.text = L10n.Common.Label.slogan label.adjustsFontForContentSizeCategory = true label.translatesAutoresizingMaskIntoConstraints = false label.numberOfLines = 0 diff --git a/Mastodon/Scene/Share/View/Button/MasActionButton.swift b/Mastodon/Scene/Share/View/Button/PrimaryActionButton.swift similarity index 86% rename from Mastodon/Scene/Share/View/Button/MasActionButton.swift rename to Mastodon/Scene/Share/View/Button/PrimaryActionButton.swift index 3808a9dc..5a68a800 100644 --- a/Mastodon/Scene/Share/View/Button/MasActionButton.swift +++ b/Mastodon/Scene/Share/View/Button/PrimaryActionButton.swift @@ -1,5 +1,5 @@ // -// MasActionButton.swift +// PrimaryActionButton.swift // Mastodon // // Created by 高原 on 2021/2/20. @@ -7,7 +7,7 @@ import UIKit -class MasActionButton: UIButton { +class PrimaryActionButton: UIButton { override init(frame: CGRect) { super.init(frame: frame) _init() @@ -19,7 +19,7 @@ class MasActionButton: UIButton { } } -extension MasActionButton { +extension PrimaryActionButton { private func _init() { titleLabel?.font = .preferredFont(forTextStyle: .headline) setTitleColor(Asset.Colors.lightWhite.color, for: .normal) diff --git a/Mastodon/Scene/Welcome/WelcomeViewController.swift b/Mastodon/Scene/Welcome/WelcomeViewController.swift index fa27d5a0..898dc1ce 100644 --- a/Mastodon/Scene/Welcome/WelcomeViewController.swift +++ b/Mastodon/Scene/Welcome/WelcomeViewController.swift @@ -18,15 +18,15 @@ final class WelcomeViewController: UIViewController { let label = UILabel() label.font = UIFontMetrics(forTextStyle: .largeTitle).scaledFont(for: UIFont.boldSystemFont(ofSize: 34)) label.textColor = Asset.Colors.Label.black.color - label.text = L10n.Common.Label.slogon + label.text = L10n.Common.Label.slogan label.adjustsFontForContentSizeCategory = true label.translatesAutoresizingMaskIntoConstraints = false label.numberOfLines = 0 return label }() - let signUpButton: MasActionButton = { - let button = MasActionButton(type: .system) + let signUpButton: PrimaryActionButton = { + let button = PrimaryActionButton(type: .system) button.setTitle(L10n.Button.signUp, for: .normal) button.translatesAutoresizingMaskIntoConstraints = false return button