Archived
Fixed missing title for personal view controller when username has not been entered
This commit is contained in:
@@ -41,13 +41,17 @@ class PersonalPlanViewController: PlanViewController {
|
|||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
super.viewWillAppear(animated)
|
super.viewWillAppear(animated)
|
||||||
let user = self.prefs.string(forKey: "username")
|
let user = self.prefs.string(forKey: "username")
|
||||||
|
var navigationBarTitle = ""
|
||||||
if (user != nil && user != "") {
|
if (user != nil && user != "") {
|
||||||
if (user!.last == "x" || user!.last == "s" || user!.last == "z") {
|
if (user!.last == "x" || user!.last == "s" || user!.last == "z") {
|
||||||
self.navigationController?.navigationBar.topItem?.title = "\(user!)\(NSLocalizedString("nosplan", comment: ""))"
|
navigationBarTitle = "\(user!)\(NSLocalizedString("nosplan", comment: ""))"
|
||||||
} else {
|
} else {
|
||||||
self.navigationController?.navigationBar.topItem?.title = "\(user!)\(NSLocalizedString("splan", comment: ""))"
|
navigationBarTitle = "\(user!)\(NSLocalizedString("splan", comment: ""))"
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
navigationBarTitle = NSLocalizedString("your_plan", comment: "")
|
||||||
}
|
}
|
||||||
|
self.navigationController?.navigationBar.topItem?.title = navigationBarTitle
|
||||||
}
|
}
|
||||||
|
|
||||||
override func getViewType() -> String {
|
override func getViewType() -> String {
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
Localizable.strings
|
||||||
|
AvH Plan
|
||||||
|
|
||||||
|
Created by Deniz Duezgoeren on 17.07.19.
|
||||||
|
Copyright © 2019 Deniz Duezgoeren. All rights reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
"fetch_plan" = "Aktualisiere den Plan...";
|
||||||
|
"fetch_personal" = "Aktualisiere deinen Plan...";
|
||||||
|
"fetch_info" = "Aktualisiere die Infos...";
|
||||||
|
"fetch_menu" = "Aktualisiere den Speiseplan...";
|
||||||
|
"name" = "Name";
|
||||||
|
"classes" = "Klassen";
|
||||||
|
"courses" = "Kurse";
|
||||||
|
"splan" = "s Plan";
|
||||||
|
"nosplan" = "' Plan";
|
||||||
|
"customize_alert_title" = "Passe persönliche Einstellungen an";
|
||||||
|
"german" = "Deutsch (+ DAZ)";
|
||||||
|
"english" = "Englisch (+ ENA)";
|
||||||
|
"french" = "Französisch";
|
||||||
|
"spanish" = "Spanisch";
|
||||||
|
"latin" = "Latein";
|
||||||
|
"turkish" = "Türkisch";
|
||||||
|
"chinese" = "Chinesisch";
|
||||||
|
"arts" = "Kunst";
|
||||||
|
"music" = "Musik";
|
||||||
|
"theatre" = "Darstellendes Spiel";
|
||||||
|
"geography" = "Geographie & WUK";
|
||||||
|
"history" = "Geschichte";
|
||||||
|
"politics" = "Politik";
|
||||||
|
"philosophy" = "Philosophie";
|
||||||
|
"religion" = "Religion";
|
||||||
|
"mathematics" = "Mathematik";
|
||||||
|
"biology" = "Biologie & Naturwissenschaften";
|
||||||
|
"chemistry" = "Chemie";
|
||||||
|
"physics" = "Physik";
|
||||||
|
"compsci" = "Informatik";
|
||||||
|
"physed" = "Sport";
|
||||||
|
"gll" = "GLL";
|
||||||
|
"wat" = "WAT";
|
||||||
|
"forder" = "Förderunterricht";
|
||||||
|
"wp" = "WP & Methodenstunde";
|
||||||
|
|
||||||
|
"white" = "Weiß";
|
||||||
|
"red" = "Rot";
|
||||||
|
"orange" = "Orange";
|
||||||
|
"yellow" = "Gelb";
|
||||||
|
"green" = "Grün";
|
||||||
|
"cyan" = "Cyan";
|
||||||
|
"lightblue" = "Hellblau";
|
||||||
|
"blue" = "Blau";
|
||||||
|
"purple" = "Violett";
|
||||||
|
"pink" = "Pink";
|
||||||
|
"brown" = "Braun";
|
||||||
|
"grey" = "Grau";
|
||||||
|
"personal_plan_empty" = "Dein Plan ist leer :(";
|
||||||
|
|
||||||
|
// titles
|
||||||
|
"avh_plan" = "AvH-Plan";
|
||||||
|
"information" = "Informationen";
|
||||||
|
"food_menu" = "Speiseplan";
|
||||||
|
|
||||||
|
"last_updated" = "Zuletzt aktualisiert: ";
|
||||||
|
"back" = "Zurück";
|
||||||
|
"your_plan" = "Dein Plan";
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"6H8-lj-boN.text" = "Label";
|
"6H8-lj-boN.text" = "Label";
|
||||||
|
|
||||||
/* Class = "UINavigationItem"; title = "Personal Plan"; ObjectID = "8j4-CR-EDO"; */
|
/* Class = "UINavigationItem"; title = "Personal Plan"; ObjectID = "8j4-CR-EDO"; */
|
||||||
"8j4-CR-EDO.title" = "Persönlicher Plan";
|
"8j4-CR-EDO.title" = "Dein Plan";
|
||||||
|
|
||||||
/* Class = "UINavigationItem"; title = "Customize"; ObjectID = "9Pf-pB-wLS"; */
|
/* Class = "UINavigationItem"; title = "Customize"; ObjectID = "9Pf-pB-wLS"; */
|
||||||
"9Pf-pB-wLS.title" = "Anpassen";
|
"9Pf-pB-wLS.title" = "Anpassen";
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
Localizable.strings
|
||||||
|
AvH Plan
|
||||||
|
|
||||||
|
Created by Deniz Duezgoeren on 17.07.19.
|
||||||
|
Copyright © 2019 Deniz Duezgoeren. All rights reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
"fetch_plan" = "Fetching the plan...";
|
||||||
|
"fetch_personal" = "Fetching your plan...";
|
||||||
|
"fetch_info" = "Fetching some information...";
|
||||||
|
"fetch_menu" = "Fetching the menu...";
|
||||||
|
"name" = "Name";
|
||||||
|
"classes" = "Classes";
|
||||||
|
"courses" = "Courses";
|
||||||
|
"splan" = "'s Plan";
|
||||||
|
"nosplan" = "' Plan";
|
||||||
|
"customize_alert_title" = "Customize personal page";
|
||||||
|
|
||||||
|
"german" = "German (+ as a second language)";
|
||||||
|
"english" = "English (+ for beginners)";
|
||||||
|
"french" = "French";
|
||||||
|
"spanish" = "Spanish";
|
||||||
|
"latin" = "Latin";
|
||||||
|
"turkish" = "Turkish";
|
||||||
|
"chinese" = "Chinese";
|
||||||
|
"arts" = "Arts";
|
||||||
|
"music" = "Music";
|
||||||
|
"theatre" = "Theatre";
|
||||||
|
"geography" = "Geography & WUK";
|
||||||
|
"history" = "History";
|
||||||
|
"politics" = "Politics";
|
||||||
|
"philosophy" = "Philosophy";
|
||||||
|
"religion" = "Religion";
|
||||||
|
"mathematics" = "Mathematics";
|
||||||
|
"biology" = "Biology & Natural Sciences";
|
||||||
|
"chemistry" = "Chemistry";
|
||||||
|
"physics" = "Physics";
|
||||||
|
"compsci" = "Computer Science";
|
||||||
|
"physed" = "Physical Education";
|
||||||
|
"gll" = "GLL";
|
||||||
|
"wat" = "WAT";
|
||||||
|
"forder" = "Special Education";
|
||||||
|
"wp" = "WP & Methodenstunde";
|
||||||
|
|
||||||
|
"white" = "White";
|
||||||
|
"red" = "Red";
|
||||||
|
"orange" = "Orange";
|
||||||
|
"yellow" = "Yellow";
|
||||||
|
"green" = "Green";
|
||||||
|
"cyan" = "Cyan";
|
||||||
|
"lightblue" = "Light blue";
|
||||||
|
"blue" = "Blue";
|
||||||
|
"purple" = "Purple";
|
||||||
|
"pink" = "Pink";
|
||||||
|
"brown" = "Brown";
|
||||||
|
"grey" = "Grey";
|
||||||
|
"personal_plan_empty" = "Your plan is empty :(";
|
||||||
|
|
||||||
|
// titles
|
||||||
|
"avh_plan" = "AvH Plan";
|
||||||
|
"information" = "Information";
|
||||||
|
"food_menu" = "Food Menu";
|
||||||
|
|
||||||
|
"last_updated" = "Last updated: ";
|
||||||
|
"back" = "Back";
|
||||||
|
"your_plan" = "Your Plan";
|
||||||
Reference in New Issue
Block a user