Archived
Localisations complete, colour picker finished
This commit is contained in:
@@ -58,9 +58,9 @@
|
||||
589FBD2CE6A9C73CD9B81441 /* Pods-AvH PlanUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AvH PlanUITests.release.xcconfig"; path = "Target Support Files/Pods-AvH PlanUITests/Pods-AvH PlanUITests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
74EDE3D8134812AB76BEB988 /* Pods_AvH_PlanUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AvH_PlanUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7605BB0678C9E27A1D3E9DAA /* Pods_AvH_Plan.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AvH_Plan.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A920726022E5BAD8001B3D46 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
|
||||
A957A74F22DDC15500E0A2ED /* MenuViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuViewCell.swift; sourceTree = "<group>"; };
|
||||
A957A75022DDC15500E0A2ED /* MenuViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MenuViewCell.xib; sourceTree = "<group>"; };
|
||||
A958A91E22DF528C007052B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
|
||||
A958A92322DF5388007052B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
A958A92522DF538C007052B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
A961337C2299867400B541D4 /* AvH Plan.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AvH Plan.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -523,7 +523,7 @@
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
A96133862299867400B541D4 /* Base */,
|
||||
A958A91E22DF528C007052B0 /* de */,
|
||||
A920726022E5BAD8001B3D46 /* de */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkmark-1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkmark-2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkmark-3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,13 @@
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||
<viewLayoutGuide key="safeArea" id="b9C-lJ-bz8"/>
|
||||
<items>
|
||||
<navigationItem title="AvH Plan" id="b1q-oE-Z8h"/>
|
||||
<navigationItem title="AvH Plan" id="b1q-oE-Z8h">
|
||||
<barButtonItem key="rightBarButtonItem" title="Customize" id="meV-sG-wBX">
|
||||
<connections>
|
||||
<segue destination="8XB-jK-YFD" kind="show" id="UX9-mg-MGy"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
</items>
|
||||
</navigationBar>
|
||||
</subviews>
|
||||
@@ -382,4 +388,7 @@
|
||||
<image name="ic_tomato" width="25" height="25"/>
|
||||
<image name="ic_writing" width="25" height="25"/>
|
||||
</resources>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="UX9-mg-MGy"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
</document>
|
||||
|
||||
@@ -12,4 +12,5 @@ class ColourViewCell: GenericViewCell {
|
||||
|
||||
@IBOutlet weak var colorView: UIView!
|
||||
@IBOutlet weak var label: UILabel!
|
||||
@IBOutlet weak var imageView: UIImageView!
|
||||
}
|
||||
|
||||
@@ -13,27 +13,36 @@
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="ColourViewCell" customModule="AvH_Plan" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="437" height="71"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="437" height="55"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="437" height="71"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="437" height="55"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="190-8v-eT2">
|
||||
<rect key="frame" x="71" y="8" width="342" height="55"/>
|
||||
<rect key="frame" x="71" y="8" width="342" height="39"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pXw-Js-My4">
|
||||
<rect key="frame" x="16" y="70" width="405" height="1"/>
|
||||
<rect key="frame" x="16" y="54" width="405" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HcR-OC-IDt">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HcR-OC-IDt">
|
||||
<rect key="frame" x="16" y="8" width="39" height="39"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="psw-Nb-1ak">
|
||||
<rect key="frame" x="12" y="12" width="15" height="15"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="HcR-OC-IDt" secondAttribute="height" multiplier="1:1" id="4zf-WA-ORG"/>
|
||||
<constraint firstAttribute="bottom" secondItem="psw-Nb-1ak" secondAttribute="bottom" constant="12" id="BDV-j7-tt4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="psw-Nb-1ak" secondAttribute="trailing" constant="12" id="GGZ-kx-EA8"/>
|
||||
<constraint firstItem="psw-Nb-1ak" firstAttribute="leading" secondItem="HcR-OC-IDt" secondAttribute="leading" constant="12" id="h8y-KQ-lwZ"/>
|
||||
<constraint firstItem="psw-Nb-1ak" firstAttribute="top" secondItem="HcR-OC-IDt" secondAttribute="top" constant="12" id="hje-Pu-PPR"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
@@ -56,6 +65,7 @@
|
||||
<size key="customSize" width="437" height="71"/>
|
||||
<connections>
|
||||
<outlet property="colorView" destination="HcR-OC-IDt" id="qB6-fL-D3e"/>
|
||||
<outlet property="imageView" destination="psw-Nb-1ak" id="oew-Yu-sU3"/>
|
||||
<outlet property="label" destination="190-8v-eT2" id="Xnc-ZG-PDp"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="412.31884057971018" y="160.37946428571428"/>
|
||||
|
||||
@@ -11,7 +11,8 @@ import MagazineLayout
|
||||
|
||||
class CustomizationViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegateMagazineLayout {
|
||||
|
||||
let courses = ["German", "English", "French", "Spanish", "Latin", "Turkish", "Chinese", "Arts", "Music", "Theatre", "Geography", "History", "Politics", "Philosophy", "Religion", "Maths", "Biology", "Chemistry", "Physics", "CompSci", "PhysEd", "GLL", "WAT", "Forder", "WP"]
|
||||
var courses = [String]()
|
||||
var translatedCourses = [String]()
|
||||
@IBOutlet weak var collectionView: UICollectionView!
|
||||
let identifier = "customisation_cell"
|
||||
// let storyboard = UIStoryboard(name: "main", bundle: nil)
|
||||
@@ -27,6 +28,8 @@ class CustomizationViewController: UIViewController, UICollectionViewDataSource,
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
courses = self.df.courses
|
||||
translatedCourses = self.df.translatedCourses
|
||||
self.collectionView.register(UINib(nibName: "ColourViewCell", bundle: nil), forCellWithReuseIdentifier: identifier)
|
||||
}
|
||||
|
||||
@@ -58,7 +61,7 @@ class CustomizationViewController: UIViewController, UICollectionViewDataSource,
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||
if let s = storyboard?.instantiateViewController(withIdentifier: "ColourPickerView") as? ColourPickerView {
|
||||
s.course = self.courses[indexPath.item]
|
||||
s.course = self.translatedCourses[indexPath.item]
|
||||
s.internalCourse = self.courses[indexPath.item]
|
||||
s.currentIndexPath = indexPath
|
||||
self.present(s, animated: true)
|
||||
@@ -105,8 +108,10 @@ class CustomizationViewController: UIViewController, UICollectionViewDataSource,
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: identifier, for: indexPath as IndexPath) as! ColourViewCell
|
||||
cell.label.text = self.courses[indexPath.item]
|
||||
cell.label.text = self.translatedCourses[indexPath.item]
|
||||
cell.colorView.layer.cornerRadius = cell.colorView.frame.height / 2
|
||||
cell.colorView.layer.borderWidth = 0.4
|
||||
cell.colorView.layer.borderColor = #colorLiteral(red: 0.2549019754, green: 0.2745098174, blue: 0.3019607961, alpha: 1)
|
||||
cell.colorView.backgroundColor = self.df.getColourPalette()[prefs.integer(forKey: "colour-index-\(courses[indexPath.item])")]
|
||||
cell.backgroundColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
|
||||
return cell
|
||||
|
||||
@@ -279,7 +279,7 @@ class DataFetcher {
|
||||
}
|
||||
|
||||
func getColourPaletteNames() -> [String] {
|
||||
return ["White", "Red", "Orange", "Yellow", "Green", "Cyan", "Light Blue", "Blue", "Purple", "Pink", "Brown", "Grey"]
|
||||
return [NSLocalizedString("white", comment: ""), NSLocalizedString("red", comment: ""), NSLocalizedString("orange", comment: ""), NSLocalizedString("yellow", comment: ""), NSLocalizedString("green", comment: ""), NSLocalizedString("cyan", comment: ""), NSLocalizedString("lightblue", comment: ""), NSLocalizedString("blue", comment: ""), NSLocalizedString("purple", comment: ""), NSLocalizedString("pink", comment: ""), NSLocalizedString("brown", comment: ""), NSLocalizedString("grey", comment: "")]
|
||||
}
|
||||
|
||||
func getColour(for course: String) -> UIColor {
|
||||
@@ -337,4 +337,8 @@ class DataFetcher {
|
||||
return #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
let courses = ["German", "English", "French", "Spanish", "Latin", "Turkish", "Chinese", "Arts", "Music", "Theatre", "Geography", "History", "Politics", "Philosophy", "Religion", "Maths", "Biology", "Chemistry", "Physics", "CompSci", "PhysEd", "GLL", "WAT", "Forder", "WP"]
|
||||
|
||||
let translatedCourses = [NSLocalizedString("german", comment: ""), NSLocalizedString("english", comment: ""), NSLocalizedString("french", comment: ""), NSLocalizedString("spanish", comment: ""), NSLocalizedString("latin", comment: ""), NSLocalizedString("turkish", comment: ""), NSLocalizedString("chinese", comment: ""), NSLocalizedString("arts", comment: ""), NSLocalizedString("music", comment: ""), NSLocalizedString("theatre", comment: ""), NSLocalizedString("geography", comment: ""), NSLocalizedString("history", comment: ""), NSLocalizedString("politics", comment: ""), NSLocalizedString("philosophy", comment: ""), NSLocalizedString("religion", comment: ""), NSLocalizedString("mathematics", comment: ""), NSLocalizedString("biology", comment: ""), NSLocalizedString("chemistry", comment: ""), NSLocalizedString("physics", comment: ""), NSLocalizedString("compsci", comment: ""), NSLocalizedString("physed", comment: ""), NSLocalizedString("gll", comment: ""), NSLocalizedString("wat", comment: ""), NSLocalizedString("forder", comment: ""), NSLocalizedString("wp", comment: "")]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
/* Class = "UITabBarController"; title = "AvH Plan"; ObjectID = "49e-Tb-3d3"; */
|
||||
"49e-Tb-3d3.title" = "AvH-Plan";
|
||||
|
||||
/* Class = "UITextField"; accessibilityHint = "Courses"; ObjectID = "69O-Fo-TQF"; */
|
||||
"69O-Fo-TQF.accessibilityHint" = "Kurse";
|
||||
|
||||
/* Class = "UITextField"; placeholder = "Your courses"; ObjectID = "69O-Fo-TQF"; */
|
||||
"69O-Fo-TQF.placeholder" = "Deine Kurse";
|
||||
|
||||
/* Class = "UILabel"; text = "Label"; ObjectID = "6H8-lj-boN"; */
|
||||
"6H8-lj-boN.text" = "Label";
|
||||
|
||||
/* Class = "UINavigationItem"; title = "Personal Plan"; ObjectID = "8j4-CR-EDO"; */
|
||||
"8j4-CR-EDO.title" = "Persönlicher Plan";
|
||||
|
||||
/* Class = "UINavigationItem"; title = "Customize"; ObjectID = "9Pf-pB-wLS"; */
|
||||
"9Pf-pB-wLS.title" = "Anpassen";
|
||||
|
||||
/* Class = "UINavigationItem"; title = "Information"; ObjectID = "9lv-eD-jS6"; */
|
||||
"9lv-eD-jS6.title" = "Informationen";
|
||||
|
||||
/* Class = "UIViewController"; title = "AvH Plan"; ObjectID = "9pv-A4-QxB"; */
|
||||
"9pv-A4-QxB.title" = "AvH-Plan";
|
||||
|
||||
/* Class = "UITabBarItem"; title = "Information"; ObjectID = "BQ7-VO-yI4"; */
|
||||
"BQ7-VO-yI4.title" = "Informationen";
|
||||
|
||||
/* Class = "UINavigationItem"; title = "Title"; ObjectID = "HYG-gj-KYl"; */
|
||||
"HYG-gj-KYl.title" = "Title";
|
||||
|
||||
/* Class = "UITabBarItem"; title = "Menu"; ObjectID = "IfX-2p-YWq"; */
|
||||
"IfX-2p-YWq.title" = "Speiseplan";
|
||||
|
||||
/* Class = "UIBarButtonItem"; title = "Done"; ObjectID = "PWA-cp-z6o"; */
|
||||
"PWA-cp-z6o.title" = "Speichern";
|
||||
|
||||
/* Class = "UITextField"; accessibilityHint = "Name"; ObjectID = "TpM-Mz-EpI"; */
|
||||
"TpM-Mz-EpI.accessibilityHint" = "Name";
|
||||
|
||||
/* Class = "UITextField"; placeholder = "Your name"; ObjectID = "TpM-Mz-EpI"; */
|
||||
"TpM-Mz-EpI.placeholder" = "Dein Name";
|
||||
|
||||
/* Class = "UIBarButtonItem"; title = "Done"; ObjectID = "ZI8-Ec-yYU"; */
|
||||
"ZI8-Ec-yYU.title" = "Speichern";
|
||||
|
||||
/* Class = "UITabBarItem"; title = "Plan"; ObjectID = "acW-dT-cKf"; */
|
||||
"acW-dT-cKf.title" = "Plan";
|
||||
|
||||
/* Class = "UINavigationItem"; title = "AvH Plan"; ObjectID = "b1q-oE-Z8h"; */
|
||||
"b1q-oE-Z8h.title" = "AvH-Plan";
|
||||
|
||||
/* Class = "UITextField"; accessibilityHint = "Classes"; ObjectID = "bCV-w1-hVY"; */
|
||||
"bCV-w1-hVY.accessibilityHint" = "Klassen";
|
||||
|
||||
/* Class = "UITextField"; placeholder = "Your classes"; ObjectID = "bCV-w1-hVY"; */
|
||||
"bCV-w1-hVY.placeholder" = "Deine Klassen";
|
||||
|
||||
/* Class = "UITabBarItem"; title = "Personal"; ObjectID = "cPa-gy-q4n"; */
|
||||
"cPa-gy-q4n.title" = "Persönlich";
|
||||
|
||||
/* Class = "UILabel"; text = "Default plan"; ObjectID = "hkV-XP-jXe"; */
|
||||
"hkV-XP-jXe.text" = "Standardplan";
|
||||
|
||||
/* Class = "UIBarButtonItem"; title = "Customize"; ObjectID = "iH8-LX-SKF"; */
|
||||
"iH8-LX-SKF.title" = "Anpassen";
|
||||
|
||||
"meV-sG-wBX.title" = "Anpassen";
|
||||
|
||||
/* Class = "UINavigationItem"; title = "Food Menu"; ObjectID = "mFX-6q-tAs"; */
|
||||
"mFX-6q-tAs.title" = "Speiseplan";
|
||||
|
||||
/* Class = "UISegmentedControl"; omP-RH-Hlh.segmentTitles[0] = "General"; ObjectID = "omP-RH-Hlh"; */
|
||||
"omP-RH-Hlh.segmentTitles[0]" = "Allgemein";
|
||||
|
||||
/* Class = "UISegmentedControl"; omP-RH-Hlh.segmentTitles[1] = "Personal"; ObjectID = "omP-RH-Hlh"; */
|
||||
"omP-RH-Hlh.segmentTitles[1]" = "Persönlich";
|
||||
|
||||
/* Class = "UILabel"; text = "Custom colours"; ObjectID = "rks-gf-AM4"; */
|
||||
"rks-gf-AM4.text" = "Benutzerdefinierte Farben";
|
||||
Reference in New Issue
Block a user