diff --git a/yobble/Resources/Localizable.xcstrings b/yobble/Resources/Localizable.xcstrings index 552fcf8..b6f2ae1 100644 --- a/yobble/Resources/Localizable.xcstrings +++ b/yobble/Resources/Localizable.xcstrings @@ -2,28 +2,55 @@ "sourceLanguage" : "ru", "strings" : { "@%@" : { - - }, - "@yourusername" : { - + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "@%@" + } + } + } }, "🌍" : { - - }, - "CATEGORY" : { - + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "🌍" + } + } + } }, "Fun Fest" : { - "comment" : "Fun Fest" + "comment" : "Fun Fest", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fun Fest" + } + } + } }, "Hello, world!" : { - - }, - "loading_placeholder" : { - + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Hello, world!" + } + } + } }, "OK" : { - + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "OK" + } + } + } }, "profile_down_text_1" : { @@ -36,15 +63,16 @@ }, "Push-увСдомлСния" : { - }, - "SERVICES" : { - }, "Yobble" : { - - }, - "Your Name" : { - + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Yobble" + } + } + } }, "АктивныС сСссии" : { @@ -53,7 +81,14 @@ }, "Π’ΠΎΠΉΡ‚ΠΈ" : { - + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Log in" + } + } + } }, "Π’Ρ‹ΠΉΡ‚ΠΈ ΠΈΠ· Π°ΠΊΠΊΠ°ΡƒΠ½Ρ‚Π°" : { @@ -66,6 +101,17 @@ }, "Двухфакторная аутСнтификация" : { + }, + "Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Π΄Ρ€ΡƒΠ·Π΅ΠΉ" : { + "comment" : "Add friends", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Add friends" + } + } + } }, "Π”Ρ€ΡƒΠ³ΠΎΠ΅" : { @@ -90,15 +136,49 @@ }, "Π—Π°Π³Π»ΡƒΡˆΠΊΠ°: Π₯Ρ€Π°Π½ΠΈΠ»ΠΈΡ‰Π΅ Π΄Π°Π½Π½Ρ‹Ρ…" : { + }, + "Π—Π°Π³Ρ€ΡƒΠ·ΠΊΠ°..." : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Loading..." + } + } + } }, "Π—Π°ΠΊΠ°Π·Ρ‹" : { - "comment" : "Orders" + "comment" : "Orders", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Orders" + } + } + } }, "Π—Π°ΠΊΡ€Ρ‹Ρ‚ΡŒ" : { - "comment" : "Π—Π°ΠΊΡ€Ρ‹Ρ‚ΡŒ" + "comment" : "Π—Π°ΠΊΡ€Ρ‹Ρ‚ΡŒ", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Close" + } + } + } }, "Π—Π°Ρ€Π΅Π³ΠΈΡΡ‚Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒΡΡ" : { - "comment" : "Π—Π°Ρ€Π΅Π³ΠΈΡΡ‚Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒΡΡ" + "comment" : "Π—Π°Ρ€Π΅Π³ΠΈΡΡ‚Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒΡΡ", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Register" + } + } + } }, "Π—Π΄Π΅ΡΡŒ Π±ΡƒΠ΄ΡƒΡ‚ Ρ‡Π°Ρ‚Ρ‹" : { @@ -107,10 +187,26 @@ }, "Π˜Π½Π²Π°ΠΉΡ‚-ΠΊΠΎΠ΄ (Π½Π΅ΠΎΠ±ΡΠ·Π°Ρ‚Π΅Π»ΡŒΠ½ΠΎ)" : { - "comment" : "Π˜Π½Π²Π°ΠΉΡ‚-ΠΊΠΎΠ΄" + "comment" : "Π˜Π½Π²Π°ΠΉΡ‚-ΠΊΠΎΠ΄", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Invite code (optional)" + } + } + } }, "Π˜ΡΡ‚ΠΎΡ€ΠΈΡ" : { - "comment" : "History" + "comment" : "History", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "History" + } + } + } }, "Как ΡΠ±Ρ€ΠΎΡΠΈΡ‚ΡŒ ΠΏΠ°Ρ€ΠΎΠ»ΡŒ?" : { "comment" : "FAQ question: reset password" @@ -119,10 +215,26 @@ "comment" : "FAQ question: support" }, "ΠšΠΎΡ€Π·ΠΈΠ½Π°" : { - "comment" : "Cart" + "comment" : "Cart", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Cart" + } + } + } }, "ΠšΠΎΡˆΠ΅Π»Ρ‘ΠΊ" : { - "comment" : "Wallet" + "comment" : "Wallet", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Wallet" + } + } + } }, "Π›Π΅Π½Ρ‚Π°" : { @@ -131,25 +243,62 @@ }, "Π›ΠΎΠ³ΠΈΠ½" : { - "comment" : "Π›ΠΎΠ³ΠΈΠ½" + "comment" : "Π›ΠΎΠ³ΠΈΠ½", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Login" + } + } + } }, "Π›ΠΎΠ³ΠΈΠ½ Π΄ΠΎΠ»ΠΆΠ΅Π½ Π±Ρ‹Ρ‚ΡŒ ΠΎΡ‚ 3 Π΄ΠΎ 32 символов (английскиС Π±ΡƒΠΊΠ²Ρ‹, Ρ†ΠΈΡ„Ρ€Ρ‹, _)" : { - "comment" : "Π›ΠΎΠ³ΠΈΠ½ Π΄ΠΎΠ»ΠΆΠ΅Π½ Π±Ρ‹Ρ‚ΡŒ ΠΎΡ‚ 3 Π΄ΠΎ 32 символов (английскиС Π±ΡƒΠΊΠ²Ρ‹, Ρ†ΠΈΡ„Ρ€Ρ‹, _)" + "comment" : "Π›ΠΎΠ³ΠΈΠ½ Π΄ΠΎΠ»ΠΆΠ΅Π½ Π±Ρ‹Ρ‚ΡŒ ΠΎΡ‚ 3 Π΄ΠΎ 32 символов (английскиС Π±ΡƒΠΊΠ²Ρ‹, Ρ†ΠΈΡ„Ρ€Ρ‹, _)", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Username must be 3 to 32 characters (letters, digits, or _)" + } + } + } }, "Π›ΠΎΠ³ΠΈΠ½ ΡƒΠΆΠ΅ занят." : { - }, - "Π›ΡŽΠ΄ΠΈ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ Π·Π½Π°Ρ‚ΡŒ" : { - "comment" : "People You May Like" }, "Мини-прилоТСния" : { - "comment" : "Applets" + "comment" : "Applets", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Applets" + } + } + } }, "Мои Π·Π°Π³Ρ€ΡƒΠ·ΠΊΠΈ" : { - "comment" : "My Downloads" + "comment" : "My Downloads", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "My Downloads" + } + } + } }, "Мои ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΈ" : { - "comment" : "My Comments" + "comment" : "My Comments", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "My Comments" + } + } + } }, "Мой ΠΏΡ€ΠΎΡ„ΠΈΠ»ΡŒ" : { @@ -158,7 +307,15 @@ "comment" : "FAQ answer: support" }, "Настройки" : { - "comment" : "Settings" + "comment" : "Settings", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Settings" + } + } + } }, "НС ΡƒΠ΄Π°Π»ΠΎΡΡŒ ΠΎΠ±Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ ΠΎΡ‚Π²Π΅Ρ‚ сСрвСра." : { @@ -240,6 +397,17 @@ }, "Поиск" : { + }, + "ΠŸΠΎΠΌΠΎΡ‰ΡŒ" : { + "comment" : "Help Center", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Help Center" + } + } + } }, "ΠŸΡ€ΠΈΠ³Π»Π°ΡˆΠ΅Π½ΠΈΠ΅ достигло Π»ΠΈΠΌΠΈΡ‚Π° использования." : { @@ -286,8 +454,16 @@ "Π‘Π΅Ρ€Π²Π΅Ρ€ Π½Π΅ ΠΎΡ‚Π²Π΅Ρ‡Π°Π΅Ρ‚. ΠŸΠΎΠΏΡ€ΠΎΠ±ΡƒΠΉΡ‚Π΅ ΠΏΠΎΠ·ΠΆΠ΅." : { }, - "Π‘ΠΊΠ°Π½ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ" : { - "comment" : "Scan" + "Π‘ΠΊΠ°Π½" : { + "comment" : "Scan", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Scan" + } + } + } }, "Блишком ΠΌΠ½ΠΎΠ³ΠΎ запросов." : { @@ -302,10 +478,15 @@ }, "Π¦Π΅Π½Ρ‚Ρ€ Π°Π²Ρ‚ΠΎΡ€ΠΎΠ²" : { - "comment" : "Creator Center" - }, - "Π¦Π΅Π½Ρ‚Ρ€ ΠΏΠΎΠΌΠΎΡ‰ΠΈ" : { - "comment" : "Help Center" + "comment" : "Creator Center", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Creator Center" + } + } + } }, "ЧастыС вопросы" : { "comment" : "FAQ navigation title" @@ -314,7 +495,15 @@ }, "Π§Π΅Ρ€Π½ΠΎΠ²ΠΈΠΊΠΈ" : { - "comment" : "Drafts" + "comment" : "Drafts", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Drafts" + } + } + } }, "Π§Π΅Ρ€Π½ΠΎΠ²ΠΈΠΊΠΈ доступны Π² Π±ΠΎΠΊΠΎΠ²ΠΎΠΌ мСню Π² Ρ€Π°Π·Π΄Π΅Π»Π΅ Drafts." : { "comment" : "FAQ answer: drafts" diff --git a/yobble/Views/SplashScreenView.swift b/yobble/Views/SplashScreenView.swift index 658316a..c9352c4 100644 --- a/yobble/Views/SplashScreenView.swift +++ b/yobble/Views/SplashScreenView.swift @@ -6,7 +6,7 @@ struct SplashScreenView: View { ProgressView() .progressViewStyle(CircularProgressViewStyle()) .scaleEffect(1.5) - Text(NSLocalizedString("loading_placeholder", comment: "")) + Text(NSLocalizedString("Π—Π°Π³Ρ€ΡƒΠ·ΠΊΠ°...", comment: "")) .padding(.top, 10) } } diff --git a/yobble/Views/Tab/SideMenuView.swift b/yobble/Views/Tab/SideMenuView.swift index bb02157..57e9e5b 100644 --- a/yobble/Views/Tab/SideMenuView.swift +++ b/yobble/Views/Tab/SideMenuView.swift @@ -53,8 +53,10 @@ struct SideMenuFooterButton: View { Text(title) .font(.caption2) } + .frame(maxWidth: .infinity) .foregroundColor(.primary) } + .frame(maxWidth: .infinity) } } @@ -73,16 +75,7 @@ struct SideMenuView: View { // Adjustable paddings private let topPadding: CGFloat = 66 private let bottomPadding: CGFloat = 34 - - // Dummy account data - private let accounts: [Account] = [ - Account(name: "Your Name", username: "@yourusername", isCurrent: true), - Account(name: "Second Account", username: "@second", isCurrent: false), - Account(name: "Another One", username: "@another", isCurrent: false), - Account(name: "Test User", username: "@test", isCurrent: false), - Account(name: "Creative Profile", username: "@creative", isCurrent: false) - ] - + private var themeToggleButton: some View { Button(action: { themeManager.toggleTheme(from: colorScheme) @@ -124,102 +117,22 @@ struct SideMenuView: View { ScrollView(showsIndicators: false) { VStack(alignment: .leading, spacing: 0) { // Parent VStack - - // --- Header --- - HStack(alignment: .top) { - Button(action: { }) { - Image(systemName: "person.circle.fill") - .resizable() - .frame(width: 60, height: 60) - .foregroundColor(.gray) - } - Spacer() - themeToggleButton - } - .padding(.horizontal, 20) - .padding(.top, topPadding) - .padding(.bottom, 10) - - // --- Header Button --- - Button(action: { - withAnimation(.spring()) { - isAccountListExpanded.toggle() - } - }) { - HStack { - VStack(alignment: .leading) { - Text("@\(viewModel.username)") - .font(.title3).bold() -// Text("@yourusername") -// .font(.footnote) - } - .foregroundColor(.primary) - - Spacer() - - Image(systemName: isAccountListExpanded ? "chevron.up" : "chevron.down") - .font(.headline) - .foregroundColor(.secondary) - } - } - .padding(.horizontal, 20) - .padding(.bottom, 10) - // --- Collapsible Account List in a clipped container --- - VStack { - if isAccountListExpanded { - VStack(alignment: .leading, spacing: 15) { - ForEach(accounts) { account in - HStack { - Button(action: { }) { - ZStack { - Image(systemName: "person.circle.fill") - .resizable() - .frame(width: 32, height: 32) // Smaller icon - .foregroundColor(.secondary) - - if account.isCurrent { - Image(systemName: "checkmark.circle.fill") - .foregroundColor(.blue) - .background(Circle().fill(Color(UIColor.systemBackground))) - .font(.body) // Smaller checkmark - .offset(x: 11, y: 11) // Adjusted offset - } - } - - VStack(alignment: .leading) { - Text(account.username).font(.footnote).bold() // Smaller text -// Text(account.name).font(.footnote).bold() // Smaller text -// Text(account.username).font(.caption2) // Smaller text - } - .foregroundColor(.primary) - } - - Spacer() - } - } - } - .padding(.horizontal, 20) - .padding(.vertical, 10) - .transition(.slideAndFade) - } - } - .clipped() - // Menu Items VStack(alignment: .leading, spacing: 20) { // Section 1 VStack(alignment: .leading, spacing: 7) { - SideMenuButton(icon: "person.2.fill", title: NSLocalizedString("Π›ΡŽΠ΄ΠΈ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ Π·Π½Π°Ρ‚ΡŒ", comment: "People You May Like"), action: {}) + SideMenuButton(icon: "person.2.fill", title: NSLocalizedString("Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Π΄Ρ€ΡƒΠ·Π΅ΠΉ", comment: "Add friends"), action: {}) SideMenuButton(icon: "star.fill", title: NSLocalizedString("Fun Fest", comment: "Fun Fest"), action: {}) SideMenuButton(icon: "lightbulb.fill", title: NSLocalizedString("Π¦Π΅Π½Ρ‚Ρ€ Π°Π²Ρ‚ΠΎΡ€ΠΎΠ²", comment: "Creator Center"), action: {}) } + .padding(.top, topPadding) Divider() // Section 2 VStack(alignment: .leading, spacing: 7) { - Text("CATEGORY").font(.caption2).foregroundColor(.secondary) +// Text("CATEGORY").font(.caption2).foregroundColor(.secondary) SideMenuButton(icon: "doc.text", title: NSLocalizedString("Π§Π΅Ρ€Π½ΠΎΠ²ΠΈΠΊΠΈ", comment: "Drafts"), action: {}) SideMenuButton(icon: "bubble.left", title: NSLocalizedString("Мои ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΈ", comment: "My Comments"), action: {}) SideMenuButton(icon: "clock", title: NSLocalizedString("Π˜ΡΡ‚ΠΎΡ€ΠΈΡ", comment: "History"), action: {}) @@ -230,7 +143,7 @@ struct SideMenuView: View { // Section 3 VStack(alignment: .leading, spacing: 7) { - Text("SERVICES").font(.caption2).foregroundColor(.secondary) +// Text("SERVICES").font(.caption2).foregroundColor(.secondary) SideMenuButton(icon: "shippingbox", title: NSLocalizedString("Π—Π°ΠΊΠ°Π·Ρ‹", comment: "Orders"), action: {}) SideMenuButton(icon: "cart", title: NSLocalizedString("ΠšΠΎΡ€Π·ΠΈΠ½Π°", comment: "Cart"), action: {}) SideMenuButton(icon: "wallet.pass", title: NSLocalizedString("ΠšΠΎΡˆΠ΅Π»Ρ‘ΠΊ", comment: "Wallet"), action: {}) @@ -252,24 +165,35 @@ struct SideMenuView: View { Spacer() // Footer - HStack(spacing: 20) { - Spacer() - SideMenuFooterButton(icon: "qrcode.viewfinder", title: NSLocalizedString("Π‘ΠΊΠ°Π½ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ", comment: "Scan"), action: {}) - SideMenuFooterButton(icon: "questionmark.circle", title: NSLocalizedString("Π¦Π΅Π½Ρ‚Ρ€ ΠΏΠΎΠΌΠΎΡ‰ΠΈ", comment: "Help Center")) { + HStack(spacing: 0) { + SideMenuFooterButton( + icon: "qrcode.viewfinder", + title: NSLocalizedString("Π‘ΠΊΠ°Π½", comment: "Scan"), + action: {} + ) + Spacer(minLength: 40) + SideMenuFooterButton( + icon: "questionmark.circle", + title: NSLocalizedString("ΠŸΠΎΠΌΠΎΡ‰ΡŒ", comment: "Help Center") + ) { withAnimation(.easeInOut) { isPresented = false } navigateToFAQ = true } - SideMenuFooterButton(icon: "gear", title: NSLocalizedString("Настройки", comment: "Settings")) { + Spacer(minLength: 40) + SideMenuFooterButton( + icon: "gear", + title: NSLocalizedString("Настройки", comment: "Settings") + ) { withAnimation(.easeInOut) { isPresented = false } navigateToSettings = true } - Spacer() } - .padding() + .padding(.horizontal, 28) + .padding(.vertical) .padding(.bottom, bottomPadding) } .background(Color(UIColor.systemBackground))