Skip to content

Commit

Permalink
v3.1 update, accent option reactive to i18n, large de text, l10n changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Jul 31, 2024
1 parent 8e7a326 commit c971950
Show file tree
Hide file tree
Showing 4 changed files with 430 additions and 408 deletions.
48 changes: 24 additions & 24 deletions Scribe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2984,7 +2984,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3013,7 +3013,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3042,7 +3042,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.german;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3072,7 +3072,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.german;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3102,7 +3102,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.french;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3132,7 +3132,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.french;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3162,7 +3162,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.portuguese;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3192,7 +3192,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.portuguese;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3222,7 +3222,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.spanish;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3252,7 +3252,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.spanish;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3282,7 +3282,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.russian;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3312,7 +3312,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.russian;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3342,7 +3342,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.swedish;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3372,7 +3372,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.swedish;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3401,7 +3401,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.norwegian;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3430,7 +3430,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.norwegian;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3459,7 +3459,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.english;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -3484,7 +3484,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.english;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -3509,7 +3509,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.danish;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3538,7 +3538,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.danish;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3567,7 +3567,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.hebrew;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3596,7 +3596,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.hebrew;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3626,7 +3626,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.italian;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3656,7 +3656,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.0;
MARKETING_VERSION = 3.1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.scribe.italian;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
16 changes: 6 additions & 10 deletions Scribe/InstallationTab/InstallationVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,12 @@ class InstallationVC: UIViewController {
func setCurrentUI() {
// Sets the font size for the text in the app screen and corresponding UIImage icons.
if DeviceType.isPhone {
if Locale.userSystemLanguage == "DE" {
fontSize = UIScreen.main.bounds.height / 61
} else {
if UIScreen.main.bounds.width > 413 || UIScreen.main.bounds.width <= 375 {
print(UIScreen.main.bounds.width)
fontSize = UIScreen.main.bounds.height / 59
} else if UIScreen.main.bounds.width <= 413 && UIScreen.main.bounds.width > 375 {
print(UIScreen.main.bounds.width)
fontSize = UIScreen.main.bounds.height / 50
}
if UIScreen.main.bounds.width > 413 || UIScreen.main.bounds.width <= 375 {
print(UIScreen.main.bounds.width)
fontSize = UIScreen.main.bounds.height / 59
} else if UIScreen.main.bounds.width <= 413 && UIScreen.main.bounds.width > 375 {
print(UIScreen.main.bounds.width)
fontSize = UIScreen.main.bounds.height / 50
}

} else if DeviceType.isPad {
Expand Down
17 changes: 9 additions & 8 deletions Scribe/SettingsTab/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,26 +179,27 @@ extension SettingsViewController: UITableViewDelegate {
data.remove(at: 0)
}
} else {
let periodCommaOptionIndex = SettingsTableData.languageSettingsData[0].section.firstIndex(where: { s in
s.sectionTitle.elementsEqual(NSLocalizedString("app.settings.layout.periodAndComma", value: "Period and comma on ABC", comment: ""))
}) ?? -1

// Languages where we can disable accent keys.
let accentKeyLanguages: [String] = ["Swedish", "German", "Spanish"]
let accentKeyLanguages: [String] = [
NSLocalizedString("_global.german", comment: ""),
NSLocalizedString("_global.spanish", comment: ""),
NSLocalizedString("_global.swedish", comment: "")
]

let accentKeyOptionIndex = SettingsTableData.languageSettingsData[0].section.firstIndex(where: { s in
s.sectionTitle.elementsEqual(NSLocalizedString("app.settings.layout.disableAccentCharacters", value: "Disable accent characters", comment: ""))
}) ?? -1

// If there are no accent keys we can remove the `Disable accent characters` option.
if accentKeyLanguages.firstIndex(of: section.sectionTitle) == nil && accentKeyOptionIndex != -1 {
let accentKeySettings = data[0].section.remove(at: accentKeyOptionIndex)
print(accentKeySettings)
data[0].section.remove(at: accentKeyOptionIndex)
} else if accentKeyLanguages.firstIndex(of: section.sectionTitle) != nil && accentKeyOptionIndex == -1 {
data[0].section.insert(Section(
sectionTitle: NSLocalizedString("app.settings.layout.disableAccentCharacters", value: "Disable accent characters", comment: ""),
imageString: "info.circle",
hasToggle: true,
sectionState: .none(.toggleAccentCharacters)
sectionState: .none(.toggleAccentCharacters),
shortDescription: NSLocalizedString("app.settings.layout.disableAccentCharacters.description", value: "Include accented letter keys on the primary keyboard layout.", comment: "")
), at: 1
)
}
Expand Down
Loading

0 comments on commit c971950

Please sign in to comment.