translate

This commit is contained in:
cheykrym 2025-10-05 17:56:31 +03:00
parent 47746690d6
commit 413e276abe
3 changed files with 260 additions and 147 deletions

View File

@ -2,28 +2,55 @@
"sourceLanguage" : "ru", "sourceLanguage" : "ru",
"strings" : { "strings" : {
"@%@" : { "@%@" : {
"localizations" : {
}, "en" : {
"@yourusername" : { "stringUnit" : {
"state" : "translated",
"value" : "@%@"
}
}
}
}, },
"🌍" : { "🌍" : {
"localizations" : {
}, "en" : {
"CATEGORY" : { "stringUnit" : {
"state" : "translated",
"value" : "🌍"
}
}
}
}, },
"Fun Fest" : { "Fun Fest" : {
"comment" : "Fun Fest" "comment" : "Fun Fest",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Fun Fest"
}
}
}
}, },
"Hello, world!" : { "Hello, world!" : {
"localizations" : {
}, "en" : {
"loading_placeholder" : { "stringUnit" : {
"state" : "translated",
"value" : "Hello, world!"
}
}
}
}, },
"OK" : { "OK" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "OK"
}
}
}
}, },
"profile_down_text_1" : { "profile_down_text_1" : {
@ -36,15 +63,16 @@
}, },
"Push-уведомления" : { "Push-уведомления" : {
},
"SERVICES" : {
}, },
"Yobble" : { "Yobble" : {
"localizations" : {
}, "en" : {
"Your Name" : { "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" "comment" : "FAQ question: reset password"
@ -119,10 +215,26 @@
"comment" : "FAQ question: support" "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 символов (английские буквы, цифры, _)" : { "Логин должен быть от 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" : "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" : "Creator Center",
}, "localizations" : {
"Центр помощи" : { "en" : {
"comment" : "Help Center" "stringUnit" : {
"state" : "translated",
"value" : "Creator Center"
}
}
}
}, },
"Частые вопросы" : { "Частые вопросы" : {
"comment" : "FAQ navigation title" "comment" : "FAQ navigation title"
@ -314,7 +495,15 @@
}, },
"Черновики" : { "Черновики" : {
"comment" : "Drafts" "comment" : "Drafts",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Drafts"
}
}
}
}, },
"Черновики доступны в боковом меню в разделе Drafts." : { "Черновики доступны в боковом меню в разделе Drafts." : {
"comment" : "FAQ answer: drafts" "comment" : "FAQ answer: drafts"

View File

@ -6,7 +6,7 @@ struct SplashScreenView: View {
ProgressView() ProgressView()
.progressViewStyle(CircularProgressViewStyle()) .progressViewStyle(CircularProgressViewStyle())
.scaleEffect(1.5) .scaleEffect(1.5)
Text(NSLocalizedString("loading_placeholder", comment: "")) Text(NSLocalizedString("Загрузка...", comment: ""))
.padding(.top, 10) .padding(.top, 10)
} }
} }

View File

@ -53,8 +53,10 @@ struct SideMenuFooterButton: View {
Text(title) Text(title)
.font(.caption2) .font(.caption2)
} }
.frame(maxWidth: .infinity)
.foregroundColor(.primary) .foregroundColor(.primary)
} }
.frame(maxWidth: .infinity)
} }
} }
@ -74,15 +76,6 @@ struct SideMenuView: View {
private let topPadding: CGFloat = 66 private let topPadding: CGFloat = 66
private let bottomPadding: CGFloat = 34 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 { private var themeToggleButton: some View {
Button(action: { Button(action: {
themeManager.toggleTheme(from: colorScheme) themeManager.toggleTheme(from: colorScheme)
@ -125,101 +118,21 @@ struct SideMenuView: View {
ScrollView(showsIndicators: false) { ScrollView(showsIndicators: false) {
VStack(alignment: .leading, spacing: 0) { // Parent VStack 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 // Menu Items
VStack(alignment: .leading, spacing: 20) { VStack(alignment: .leading, spacing: 20) {
// Section 1 // Section 1
VStack(alignment: .leading, spacing: 7) { 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: "star.fill", title: NSLocalizedString("Fun Fest", comment: "Fun Fest"), action: {})
SideMenuButton(icon: "lightbulb.fill", title: NSLocalizedString("Центр авторов", comment: "Creator Center"), action: {}) SideMenuButton(icon: "lightbulb.fill", title: NSLocalizedString("Центр авторов", comment: "Creator Center"), action: {})
} }
.padding(.top, topPadding)
Divider() Divider()
// Section 2 // Section 2
VStack(alignment: .leading, spacing: 7) { 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: "doc.text", title: NSLocalizedString("Черновики", comment: "Drafts"), action: {})
SideMenuButton(icon: "bubble.left", title: NSLocalizedString("Мои комментарии", comment: "My Comments"), action: {}) SideMenuButton(icon: "bubble.left", title: NSLocalizedString("Мои комментарии", comment: "My Comments"), action: {})
SideMenuButton(icon: "clock", title: NSLocalizedString("История", comment: "History"), action: {}) SideMenuButton(icon: "clock", title: NSLocalizedString("История", comment: "History"), action: {})
@ -230,7 +143,7 @@ struct SideMenuView: View {
// Section 3 // Section 3
VStack(alignment: .leading, spacing: 7) { 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: "shippingbox", title: NSLocalizedString("Заказы", comment: "Orders"), action: {})
SideMenuButton(icon: "cart", title: NSLocalizedString("Корзина", comment: "Cart"), action: {}) SideMenuButton(icon: "cart", title: NSLocalizedString("Корзина", comment: "Cart"), action: {})
SideMenuButton(icon: "wallet.pass", title: NSLocalizedString("Кошелёк", comment: "Wallet"), action: {}) SideMenuButton(icon: "wallet.pass", title: NSLocalizedString("Кошелёк", comment: "Wallet"), action: {})
@ -252,24 +165,35 @@ struct SideMenuView: View {
Spacer() Spacer()
// Footer // Footer
HStack(spacing: 20) { HStack(spacing: 0) {
Spacer() SideMenuFooterButton(
SideMenuFooterButton(icon: "qrcode.viewfinder", title: NSLocalizedString("Сканировать", comment: "Scan"), action: {}) icon: "qrcode.viewfinder",
SideMenuFooterButton(icon: "questionmark.circle", title: NSLocalizedString("Центр помощи", comment: "Help Center")) { title: NSLocalizedString("Скан", comment: "Scan"),
action: {}
)
Spacer(minLength: 40)
SideMenuFooterButton(
icon: "questionmark.circle",
title: NSLocalizedString("Помощь", comment: "Help Center")
) {
withAnimation(.easeInOut) { withAnimation(.easeInOut) {
isPresented = false isPresented = false
} }
navigateToFAQ = true navigateToFAQ = true
} }
SideMenuFooterButton(icon: "gear", title: NSLocalizedString("Настройки", comment: "Settings")) { Spacer(minLength: 40)
SideMenuFooterButton(
icon: "gear",
title: NSLocalizedString("Настройки", comment: "Settings")
) {
withAnimation(.easeInOut) { withAnimation(.easeInOut) {
isPresented = false isPresented = false
} }
navigateToSettings = true navigateToSettings = true
} }
Spacer()
} }
.padding() .padding(.horizontal, 28)
.padding(.vertical)
.padding(.bottom, bottomPadding) .padding(.bottom, bottomPadding)
} }
.background(Color(UIColor.systemBackground)) .background(Color(UIColor.systemBackground))