Skip to content

Commit

Permalink
(related to #86) Updating string keys for AppView.swift (#121)
Browse files Browse the repository at this point in the history
* Replaced all strings with keys

Revamped the entire localizations with up-to-date sentences written with the current situation in mind

* Wiped all previous translations

Lots of old translations no longer apply, and it is a good idea to get people to translate for the app again according to the current situation now that the base localization (English) is accurate and up-to-date

* Tuned code for proper building

Fixed some issues with the locale files

* Attempting to resolve conflict

ignore this 💀

* Reverted whatever I just did

* ;-; forgot to stage a file

* Reverted unintentional changes to code

Reverted button style, brought back "soundAlert.*"

* Salvaged some german locales

* Restored french translation of sound alert

* Tuned some UI aspect of things

Adjusted minimum window size for fitting to 4 columns of apps just right, fixed a typo that exposed raw string key, and added some horizontal paddings to search bar for better aesthetics

Modded various UI aspect of things

used same style as every other buttons in UI for consistency

Trimmed paddings on bottom bar

Adjusted padding for even paddings around buttons (because there is an un-removable safe area padding at the bottom of the window (which i cant seem to nuke by "ignoreSafeArea()") )

Added a thin border to search bar

for aesthetic purposes and ease of use by creating that contrast between search bar and background

* Added Chinese locales

:chef_kiss:

Updated my Chinese locale

updated to the new formatting used

* Ironed out locales formatting

Added spacings to separate different types of messages and changed some keys for consistency

Tuned ".ipa" parts for consistency

Updated text in setup view

* Repositioned crash button

moved crash button to the left of "Experiencing issues?" button to save some space and avoid taking up unnecessary row of space just for the 1 button

* Remove unnecessary imports

SwiftUI is all we need ✨

* Making changes according to isaac

* Changed grammar errors and cleaned code

According to Isaac's comments

* Modded upstream code to match current changes

* Updated locale to work with #108

Added and mapped keys to strings

Updated more UI to work with locale

Reverted signing settings

Reverted changes

Updated locale

* Removed unnecessary @State attribute

* Removed "private" attrib for code building

* Changed locale based on suggestions

* Reverted UI changes

mainly the bottom two buttons in swttings view

* Updated locale to work with latest PR

* Changed locale based on suggestions

Updated locale to work with latest PR

* Reverted UI changes

mainly the bottom two buttons in swttings view

* ignore project.pbxproj

* Revert "ignore project.pbxproj"

This reverts commit de00985.

Reverted ignore settings

* Reverted UI change suggested by Depal

* Reverted more UI suggested by Isaac

Added corner radius

* Reverted UI from Isaac's comments

Fixed some changes

* Revert "Remove unnecessary imports"

This reverts commit 686d1a7.

* Addes keys to AppView.swift

* Update locale for #95

* Updated keys to work with locale

SetupView.swift
  • Loading branch information
Wind-Explorer committed Jul 31, 2022
1 parent 219aeba commit b15c248
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 26 deletions.
4 changes: 2 additions & 2 deletions PlayCover/View/AppSettingsView.swift
Expand Up @@ -71,10 +71,10 @@ struct AppSettingsView: View {
Divider().padding(.leading, 36).padding(.trailing, 36)
VStack(alignment: .leading, spacing: 0) {
Toggle(isOn: $disableTimeout) {
Text("Disable Display Sleep")
Text("settings.toggle.disableDisplaySleep")
}
.padding()
.help("Prevent display from turning off while this app is running")
.help("settings.toggle.disableDisplaySleep.info")
Spacer()
Divider().padding(.leading, 36).padding(.trailing, 36)
Spacer()
Expand Down
28 changes: 13 additions & 15 deletions PlayCover/View/AppsView.swift
Expand Up @@ -29,21 +29,21 @@ struct AppsView: View {
}
if !xcodeCliInstalled {
VStack(spacing: 12) {
Text("You need to install Xcode Commandline tools and restart this App.")
Text("xcode.install.message")
.font(.title3)
Button("Install") {
Button("button.Install") {
do {
_ = try shell.sh("xcode-select --install")
alertTitle = NSLocalizedString("Xcode tools installation succeeded", comment: "")
alertBtn = NSLocalizedString("Close", comment: "")
alertText = NSLocalizedString("Please follow the given instructions, and restart the App.", comment: "")
alertTitle = NSLocalizedString("xcode.install.success", comment: "")
alertBtn = NSLocalizedString("button.Close", comment: "")
alertText = NSLocalizedString("alert.followInstructionsAndRestartApp", comment: "")
alertAction = {
exit(0)
}
showAlert = true
} catch {
alertTitle = NSLocalizedString("Xcode tools intallation failed", comment: "")
alertBtn = NSLocalizedString("OK", comment: "")
alertTitle = NSLocalizedString("xcode.install.failed", comment: "")
alertBtn = NSLocalizedString("button.OK", comment: "")
alertText = error.localizedDescription
alertAction = {}
showAlert = true
Expand Down Expand Up @@ -104,7 +104,7 @@ struct AppAddView: View {
.font(.system(size: 38.0, weight: .thin))
.frame(width: 64, height: 68).padding(.top).foregroundColor(
install.installing ? Color.gray : Color.accentColor)
Text("Add app").padding(.horizontal)
Text("playapp.add").padding(.horizontal)
.frame(width: 150, height: 50)
.padding(.bottom)
.lineLimit(nil)
Expand All @@ -115,8 +115,8 @@ struct AppAddView: View {
.frame(width: 150, height: 150).onHover(perform: { hovering in
isHover = hovering
}).alert(isPresented: $showWrongfileTypeAlert) {
Alert(title: Text("Wrong file type"),
message: Text("Choose an .ipa file"), dismissButton: .default(Text("OK")))
Alert(title: Text("alert.wrongFileType"),
message: Text("alert.wrongFileType.message"), dismissButton: .default(Text("button.OK")))
}
.onTapGesture {
if install.installing {
Expand Down Expand Up @@ -162,17 +162,15 @@ struct AppAddView: View {
} else {
showWrongfileTypeAlert = true
}
}.help("Drag or open an app file to install. IPAs from Configurator or iMazing won't work! " +
"You should get decrypted IPAs, either from the top right button, Discord, AppDb," +
" or a jailbroken device.")
}.help("playapp.add.help")
}

private func installApp() {
Installer.install(ipaUrl: uif.ipaUrl!, returnCompletion: { (_) in
DispatchQueue.main.async {
AppsVM.shared.fetchApps()
NotifyService.shared.notify(NSLocalizedString("App installed!", comment: ""),
NSLocalizedString("Check it out in 'My Apps'", comment: ""))
NotifyService.shared.notify(NSLocalizedString("notification.appInstalled", comment: ""),
NSLocalizedString("notification.appInstalled.message", comment: ""))
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions PlayCover/View/SetupView.swift
Expand Up @@ -70,26 +70,26 @@ struct SetupView: View {

VStack(alignment: .leading, spacing: 5) {
Group {
Text("setupView.1")
Text("setupView.2")
Text("setupView.3")
Text("setupView.4")
Text("setupView.5")
Text("setupView.step1")
Text("setupView.step2")
Text("setupView.step3")
Text("setupView.step4")
Text("setupView.step5")
HStack(spacing: 4) {
Text("setupView.6")
Text("setupView.step6")
Text("csrutil disable").textSelection(.enabled).font(.monospaced(.body)())
.padding(.horizontal, 4)
.padding(.vertical, 2)
.background(Color(red: 0.25, green: 0.25, blue: 0.25))
.cornerRadius(5)
.foregroundColor(Color(hex: 0xFFFFFF))
}
Text("setupView.7")
Text("setupView.8")
Text("setupView.step7")
Text("setupView.step8")

Spacer()

Text("setupView.9").font(.callout)
Text("setupView.step9").font(.callout)
}

GroupBox(label: Label(NSLocalizedString("setupView.vidTutorials", comment: ""),
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/de.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/en.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/es.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/fr.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/id.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/it.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/ja.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/ko.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/ru.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/vi.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "Enable Jailbreak Bypass (Alpha)";
"settings.toggle.jbBypass.info" = "Attempts to bypass Jailbreak Detection in some games (No guarentee to work all the time)";
"settings.toggle.autoWindowResize" = "Enable auto window resize";
"settings.toggle.disableDisplaySleep" = "Disable display sleep";
"settings.toggle.disableDisplaySleep.info" = "Prevent display from turning off while this app is running"

"settings.picker.displayRefreshRate" = "Screen refresh rate";
"settings.picker.screenSize" = "Display resolution";
Expand Down
2 changes: 2 additions & 0 deletions PlayCover/zh-Hans.lproj/Localizable.strings
Expand Up @@ -80,6 +80,8 @@
"settings.toggle.jbBypass" = "启用绕过越狱检测(预览)";
"settings.toggle.jbBypass.info" = "尝试绕过游戏的防越狱系统(不一定总是有效)";
"settings.toggle.autoWindowResize" = "启用自动窗口大小调整";
"settings.toggle.disableDisplaySleep" = "禁用显示器息屏";
"settings.toggle.disableDisplaySleep.info" = "防止显示器在此应用运行时息屏"

"settings.picker.displayRefreshRate" = "屏幕刷新率";
"settings.picker.screenSize" = "屏幕分辨率";
Expand Down

0 comments on commit b15c248

Please sign in to comment.