diff --git a/Pocket Poster/Localizable.xcstrings b/Pocket Poster/Localizable.xcstrings index 86e3626..026fb97 100644 --- a/Pocket Poster/Localizable.xcstrings +++ b/Pocket Poster/Localizable.xcstrings @@ -839,6 +839,12 @@ }, "Community Translators" : { "localizations" : { + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fordítók" + } + }, "ru" : { "stringUnit" : { "state" : "translated", @@ -1929,6 +1935,12 @@ "value" : "Jouir!" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Élvezd!" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -2694,6 +2706,12 @@ }, "Failed to Import Video" : { "localizations" : { + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Videó importálása sikertelen" + } + }, "ru" : { "stringUnit" : { "state" : "translated", @@ -2958,6 +2976,12 @@ "value" : "Trouver des fonds d'écran" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Háttérképek találása" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3240,6 +3264,12 @@ "value" : "Obtenir un raccourci" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Shortcut letöltése" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3304,6 +3334,12 @@ "value" : "Voici un tutoriel pour vous aider à démarrer avec l'application." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Íme egy oktatóanyag, amely segít az alkalmazás használatának megkezdésében." + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3441,9 +3477,6 @@ } } } - }, - "How to Reset Collections" : { - }, "Install Nugget" : { "localizations" : { @@ -3483,6 +3516,12 @@ "value" : "Installer Nugget" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Nugget telepítése" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3553,6 +3592,12 @@ "value" : "Installer le raccourci de repli (optionnel)" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Tartalék parancs telepítése" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -4360,6 +4405,12 @@ "value" : "Sur votre ordinateur, téléchargez Nugget depuis GitHub." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "A számítógépeden, töltsd le a Nuggetet a GitHubról." + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -4536,6 +4587,12 @@ "value" : "Ouvrir GitHub" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "GitHub megnyitésa" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -4567,9 +4624,6 @@ } } } - }, - "Open the Language Settings" : { - }, "Please wait" : { "localizations" : { @@ -5370,9 +5424,6 @@ } } } - }, - "Set the Primary Language" : { - }, "Skip" : { "localizations" : { @@ -5918,6 +5969,12 @@ "value" : "Le dossier est mal configuré. Appuyez sur \"Réinitialiser les Collections\" et réessayez." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "A mappa nincs megfelelően beállítva. Koppintson a \"Gyűjtemények visszaállítása\" gombra, és próbálja újra." + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -6064,6 +6121,12 @@ }, "The video you imported is too long! Your video must be %@ seconds or less." : { "localizations" : { + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Az importált videó túl hosszú! A videó hossza legfeljebb %@ másodperc lehet." + } + }, "ru" : { "stringUnit" : { "state" : "translated", @@ -6116,6 +6179,12 @@ "value" : "Pour l'appliquer, PosterBoard doit être ouvert." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Az alkalmazáshoz a PosterBoardnak meg kell nyílnia." + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -6186,6 +6255,12 @@ "value" : "Pour obtenir l'identifiant du bundle d'application, Nugget est nécessaire." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Nuggetre van szükség az App Bundle id megszerzéséhez." + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -6217,9 +6292,6 @@ } } } - }, - "Verify That It Worked" : { - }, "Version %@ (%@)" : { "localizations" : { @@ -6277,6 +6349,12 @@ "value" : "Version %1$@ (%2$@)" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Verzió %1$@ (%2$@)" + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -6365,6 +6443,12 @@ "value" : "Vidéos" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Videók" + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -6453,6 +6537,12 @@ "value" : "Voir sur GitHub" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Megtekintés a GitHubon" + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -6547,6 +6637,12 @@ "value" : "Concepteur de site web" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Weboldal Designere" + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -6629,6 +6725,12 @@ "value" : "Bienvenue à Pocket Poster!" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Üdvözlünk a Pocket Poster-be!" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -6705,6 +6807,12 @@ "value" : "Voulez-vous télécharger le fichier %@?" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Szeretnéd letölteni a(z) %@ fájlt?" + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -6787,6 +6895,12 @@ "value" : "Vous pouvez trouver des fonds d'écran sur le site officiel de Cowabun.ga." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Háttérképeket a hivatalos Cowabun.ga weboldalon találhatsz." + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -6851,6 +6965,12 @@ "value" : "Vous pouvez installer un raccourci facultatif si la méthode originale échoue." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Telepíthetsz egy opcionális parancsot, ha az eredeti módszer nem működik." + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -6927,6 +7047,12 @@ "value" : "Vous ne pouvez appliquer que des descripteurs %@." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Csak %@ descriptort alkalmazhatsz." + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -7015,6 +7141,12 @@ "value" : "Votre App Hash est incorrect. Veuillez le redéfinir." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Az App hashed helytelen. Kérlek állítsd be újra" + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -7103,6 +7235,12 @@ "value" : "Votre PosterBoard se rafraîchit automatiquement." } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "A PosterBoardod automatikusan újra fog tölteni." + } + }, "ja" : { "stringUnit" : { "state" : "translated", diff --git a/Pocket Poster/Pocket-Poster-InfoPlist.xcstrings b/Pocket Poster/Pocket-Poster-InfoPlist.xcstrings index e952db8..16409c1 100644 --- a/Pocket Poster/Pocket-Poster-InfoPlist.xcstrings +++ b/Pocket Poster/Pocket-Poster-InfoPlist.xcstrings @@ -59,6 +59,12 @@ "value" : "Pocket Poster" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pocket Poster" + } + }, "ja" : { "stringUnit" : { "state" : "translated", @@ -147,6 +153,12 @@ "value" : "Fond d'écran Nugget" } }, + "hu" : { + "stringUnit" : { + "state" : "translated", + "value" : "Nugget Háttérkép" + } + }, "ja" : { "stringUnit" : { "state" : "translated", diff --git a/Pocket Poster/Views/NavigatorViews/VideoView.swift b/Pocket Poster/Views/NavigatorViews/VideoView.swift index 97267b8..ed56f69 100644 --- a/Pocket Poster/Views/NavigatorViews/VideoView.swift +++ b/Pocket Poster/Views/NavigatorViews/VideoView.swift @@ -14,12 +14,30 @@ struct VideoView: View { @AppStorage("ignoreDurationLimit") var ignoreDurationLimit: Bool = false @State var selectedVideo: PhotosPickerItem? + @State private var currentPage: Int = 0 + + @State private var currentDate = Date() + private let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect() // update every second + private var dateFormatter: DateFormatter { + let formatter = DateFormatter() + formatter.dateFormat = "EEEE, MMMM d" + return formatter + } + private var timeFormatter: DateFormatter { + let formatter = DateFormatter() + if Locale.current.hourCycle == .zeroToEleven || Locale.current.hourCycle == .oneToTwelve { + formatter.dateFormat = "h:mm" + } else { + formatter.dateFormat = "HH:mm" + } + return formatter + } var body: some View { VStack { GeometryReader { geom in - TabView { - ForEach(pbManager.videos) { vid in + TabView(selection: $currentPage) { + ForEach(Array(pbManager.videos.enumerated()), id: \.offset) { idx, vid in ZStack { switch vid.loadState { case .unknown: @@ -31,6 +49,17 @@ struct VideoView: View { .scaledToFill() .frame(width: geom.size.width * 0.7, height: geom.size.height * 0.8) .clipped() + VStack { + Text(dateFormatter.string(from: currentDate)) + .shadow(radius: 10) + + Text(timeFormatter.string(from: currentDate)) + .font(.system(size: 75, weight: .semibold, design: .rounded)) + .shadow(radius: 10) + Spacer() + } + .padding(.top, 45) + .foregroundStyle(.white) case .failed: Text("Failed") } @@ -39,6 +68,7 @@ struct VideoView: View { .shadow(radius: 5) .background(Color.black.opacity(0.6)) .cornerRadius(24) + .tag(idx) .overlay { RoundedRectangle(cornerRadius: 24) .stroke(.gray, lineWidth: 4) @@ -51,22 +81,30 @@ struct VideoView: View { .overlay( // Loops Button Button(action: { - if let index = pbManager.videos.firstIndex(of: vid) { - pbManager.videos[index].autoReverses = !vid.autoReverses - } + pbManager.videos[idx].autoReverses = !vid.autoReverses }) { Image(systemName: "arrow.left.arrow.right.circle") .font(.title) - .foregroundStyle(.black) + .foregroundStyle(Color(uiColor: .label)) .background { - Circle() - .foregroundStyle(vid.autoReverses ? .blue : .white) + if vid.autoReverses { + Circle() + .foregroundStyle(.blue.opacity(0.8)) + .shadow(radius: 5) + } else { + Circle() + .foregroundStyle(.regularMaterial) + .shadow(radius: 5) + } } }.offset(x: 8, y: -8), alignment: .topTrailing ) } .onDelete(perform: removeVideo) + .onReceive(timer) { input in + currentDate = input + } // MARK: Select Photo Option if selectedVideo == nil && pbManager.videos.count < 5 { @@ -90,6 +128,7 @@ struct VideoView: View { .shadow(radius: 5) .background(Color.black.opacity(0.6)) .cornerRadius(24) + .tag(pbManager.videos.count) .overlay { RoundedRectangle(cornerRadius: 24) .stroke(.gray, lineWidth: 4) @@ -109,6 +148,7 @@ struct VideoView: View { UIApplication.shared.alert(title: NSLocalizedString("Failed to Import Video", comment: ""), body: String(format: NSLocalizedString("The video you imported is too long! Your video must be %@ seconds or less.", comment: ""), "\(Int(VideoHandler.MaxDurationSecs))")) } else { pbManager.videos[id].loadState = .loaded(movie) + currentPage = id } } } else { @@ -124,7 +164,7 @@ struct VideoView: View { selectedVideo = nil } } - .tabViewStyle(.page) + .tabViewStyle(PageTabViewStyle(indexDisplayMode: .always)) } } } @@ -155,7 +195,8 @@ struct DeleteButton: View { .font(.title) .background { Circle() - .foregroundStyle(.white) + .foregroundStyle(.regularMaterial) + .shadow(radius: 5) } } .offset(x: -8, y: -8) diff --git a/Pocket Poster/Views/OnBoarding/OnBoardingPage.swift b/Pocket Poster/Views/OnBoarding/OnBoardingPage.swift index 4e99f56..21e9e94 100644 --- a/Pocket Poster/Views/OnBoarding/OnBoardingPage.swift +++ b/Pocket Poster/Views/OnBoarding/OnBoardingPage.swift @@ -9,14 +9,14 @@ import SwiftUICore struct OnBoardingPage: Identifiable { var id = UUID() - var title: LocalizedStringKey + var title: String var description: String var image: String var link: URL? - var linkName: LocalizedStringKey? + var linkName: String? var gradientColors: [Color] - init(title: LocalizedStringKey, description: String, image: String, link: URL? = nil, linkName: LocalizedStringKey? = nil, gradientColors: [Color] = [Color("WelcomeLight"), Color("WelcomeDark")]) { + init(title: String, description: String, image: String, link: URL? = nil, linkName: String? = nil, gradientColors: [Color] = [Color("WelcomeLight"), Color("WelcomeDark")]) { self.id = UUID() self.title = title self.description = description @@ -29,30 +29,30 @@ struct OnBoardingPage: Identifiable { let onBoardingCards: [OnBoardingPage] = [ .init( - title: "Welcome to Pocket Poster!", + title: NSLocalizedString("Welcome to Pocket Poster!", comment: ""), description: NSLocalizedString("Here is a tutorial to help you get started with the app.", comment: ""), image: "Logo" ), .init( - title: "Install the Fallback Shortcut (Optional)", + title: NSLocalizedString("Install the Fallback Shortcut (Optional)", comment: ""), description: NSLocalizedString("To apply, PosterBoard will need to open.", comment: "") + "\n\n" + NSLocalizedString("You can install an optional shortcut if the original method fails.", comment: ""), image: "Shortcuts", link: URL(string: PosterBoardManager.ShortcutURL), - linkName: "Get Shortcut" + linkName: NSLocalizedString("Get Shortcut", comment: "") ), .init( - title: "Install Nugget", + title: NSLocalizedString("Install Nugget", comment: ""), description: NSLocalizedString("To get the app bundle id, Nugget is required.", comment: "") + "\n\n" + NSLocalizedString("On your computer, download Nugget from the GitHub.", comment: ""), image: "Nugget", link: URL(string: "https://github.com/leminlimez/Nugget/releases/latest"), - linkName: "Open GitHub" + linkName: NSLocalizedString("Open GitHub", comment: "") ), .init( - title: "Enjoy!", + title: NSLocalizedString("Enjoy!", comment: ""), description: NSLocalizedString("You can find wallpapers on the official Cowabun.ga website.", comment: ""), image: "Cowabunga", link: URL(string: PosterBoardManager.WallpapersURL), - linkName: "Find Wallpapers" + linkName: NSLocalizedString("Find Wallpapers", comment: "") ) ]