diff --git a/Example.swiftpm/.swiftpm/xcode/xcshareddata/xcschemes/SwiftUIExample.xcscheme b/Example.swiftpm/.swiftpm/xcode/xcshareddata/xcschemes/SwiftUIExample.xcscheme index b90b0e9..fa7c306 100644 --- a/Example.swiftpm/.swiftpm/xcode/xcshareddata/xcschemes/SwiftUIExample.xcscheme +++ b/Example.swiftpm/.swiftpm/xcode/xcshareddata/xcschemes/SwiftUIExample.xcscheme @@ -50,6 +50,12 @@ ReferencedContainer = "container:"> + + + + + + + + String { + NSLocalizedString(key, bundle: .module, comment: "") + } +} diff --git a/Sources/DebugMenu/Resource/en.lproj/Localizable.strings b/Sources/DebugMenu/Resource/en.lproj/Localizable.strings new file mode 100644 index 0000000..c1016ea --- /dev/null +++ b/Sources/DebugMenu/Resource/en.lproj/Localizable.strings @@ -0,0 +1,4 @@ +"Cancel" = "Cancel"; +"Hide widget" = "Hide widget"; +"Show widget" = "Show widget"; +"Hide until next launch" = "Hide until next launch"; diff --git a/Sources/DebugMenu/Resource/ja.lproj/Localizable.strings b/Sources/DebugMenu/Resource/ja.lproj/Localizable.strings new file mode 100644 index 0000000..d844a1f --- /dev/null +++ b/Sources/DebugMenu/Resource/ja.lproj/Localizable.strings @@ -0,0 +1,4 @@ +"Cancel" = "キャンセル"; +"Hide widget" = "ウィジェットを非表示"; +"Show widget" = "ウィジェットを表示"; +"Hide until next launch" = "次回起動までランチャーを非表示"; diff --git a/Sources/DebugMenu/View/FloatingViewController.swift b/Sources/DebugMenu/View/FloatingViewController.swift index ce31d40..560e012 100644 --- a/Sources/DebugMenu/View/FloatingViewController.swift +++ b/Sources/DebugMenu/View/FloatingViewController.swift @@ -113,7 +113,7 @@ internal class FloatingViewController: UIViewController { let sheet = UIAlertController(title: "DebugMenu", message: nil, preferredStyle: .alert) sheet.addAction( .init( - title: "Hide until next launch", + title: .hideUntilNextLaunch, style: .destructive, handler: { [weak self] _ in self?.launchView.isHidden = true @@ -124,7 +124,7 @@ internal class FloatingViewController: UIViewController { if widgetView.isHidden { sheet.addAction( .init( - title: "Show widget", + title: .showWidget, style: .default, handler: { [weak self] _ in self?.widgetView.show() @@ -134,7 +134,7 @@ internal class FloatingViewController: UIViewController { } else { sheet.addAction( .init( - title: "Hide widget", + title: .hideWidget, style: .destructive, handler: { [weak self] _ in self?.widgetView.hide() @@ -142,7 +142,7 @@ internal class FloatingViewController: UIViewController { ) ) } - sheet.addAction(.init(title: "Cancel", style: .cancel, handler: nil)) + sheet.addAction(.init(title: .cancel, style: .cancel, handler: nil)) present(sheet, animated: true, completion: nil) } }