From 30c1d369742862ef4f2ebe885de47c91a72d8ebc Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Tue, 16 Jan 2024 19:49:14 -0800 Subject: [PATCH] Mark newlines as verbatim (#517) * Merge * Add missing key --- Sources/Secretive/Localizable.xcstrings | 12 ++++++------ Sources/Secretive/Views/UpdateView.swift | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Sources/Secretive/Localizable.xcstrings b/Sources/Secretive/Localizable.xcstrings index 94c1a7a..12de281 100644 --- a/Sources/Secretive/Localizable.xcstrings +++ b/Sources/Secretive/Localizable.xcstrings @@ -1,12 +1,6 @@ { "sourceLanguage" : "en", "strings" : { - "\n" : { - - }, - "\n\n" : { - - }, "agent_not_running_notice_title" : { "localizations" : { "de" : { @@ -3368,6 +3362,12 @@ "value" : "Secretive %1$@" } }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Secretive %1$@" + } + }, "zh-Hans" : { "stringUnit" : { "state" : "translated", diff --git a/Sources/Secretive/Views/UpdateView.swift b/Sources/Secretive/Views/UpdateView.swift index 17fe641..a997d3a 100644 --- a/Sources/Secretive/Views/UpdateView.swift +++ b/Sources/Secretive/Views/UpdateView.swift @@ -42,16 +42,16 @@ struct UpdateDetailView: View { if let prefix = split.first { switch prefix { case "#": - attributed = Text(unprefixed).font(.title) + Text("\n") + attributed = Text(unprefixed).font(.title) + Text(verbatim: "\n") case "##": - attributed = Text(unprefixed).font(.title2) + Text("\n") + attributed = Text(unprefixed).font(.title2) + Text(verbatim: "\n") case "###": - attributed = Text(unprefixed).font(.title3) + Text("\n") + attributed = Text(unprefixed).font(.title3) + Text(verbatim: "\n") default: - attributed = Text(line) + Text("\n\n") + attributed = Text(line) + Text(verbatim: "\n\n") } } else { - attributed = Text(line) + Text("\n\n") + attributed = Text(line) + Text(verbatim: "\n\n") } text = text + attributed }