diff --git a/Resources/Localizable.xcstrings b/Resources/Localizable.xcstrings index dd1a936a..d568c9b3 100644 --- a/Resources/Localizable.xcstrings +++ b/Resources/Localizable.xcstrings @@ -72685,6 +72685,40 @@ } } } + }, + "markdown.fileUnavailable.message": { + "extractionState": "manual", + "localizations": { + "en": { + "stringUnit": { + "state": "translated", + "value": "The file may have been moved or deleted." + } + }, + "ja": { + "stringUnit": { + "state": "translated", + "value": "ファイルが移動または削除された可能性があります。" + } + } + } + }, + "markdown.fileUnavailable.title": { + "extractionState": "manual", + "localizations": { + "en": { + "stringUnit": { + "state": "translated", + "value": "File unavailable" + } + }, + "ja": { + "stringUnit": { + "state": "translated", + "value": "ファイルを利用できません" + } + } + } } } } diff --git a/Sources/Panels/MarkdownPanelView.swift b/Sources/Panels/MarkdownPanelView.swift index b96325db..dc8d7c6c 100644 --- a/Sources/Panels/MarkdownPanelView.swift +++ b/Sources/Panels/MarkdownPanelView.swift @@ -86,15 +86,17 @@ struct MarkdownPanelView: View { Image(systemName: "doc.questionmark") .font(.system(size: 40)) .foregroundColor(.secondary) - Text("File unavailable") + Text(String(localized: "markdown.fileUnavailable.title", defaultValue: "File unavailable")) .font(.headline) .foregroundColor(.primary) Text(panel.filePath) .font(.system(size: 12, design: .monospaced)) .foregroundColor(.secondary) - .lineLimit(2) .multilineTextAlignment(.center) - Text("The file may have been moved or deleted.") + .textSelection(.enabled) + .fixedSize(horizontal: false, vertical: true) + .padding(.horizontal, 24) + Text(String(localized: "markdown.fileUnavailable.message", defaultValue: "The file may have been moved or deleted.")) .font(.caption) .foregroundColor(.secondary) }