summaryrefslogtreecommitdiff
path: root/src/ui/ios/GF-Offline-Translator/GF Offline Translator
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@digitalgrammars.com>2018-11-15 10:33:31 +0100
committerJohn J. Camilleri <john@digitalgrammars.com>2018-11-15 10:33:31 +0100
commit735f5ff76f79ca53a1b2ed8cc0e13a75c9a01f5d (patch)
tree707e0f575302284d17345f61899569ab16711ff2 /src/ui/ios/GF-Offline-Translator/GF Offline Translator
parent422248f11fdb1aa76af72bee67d30ea8d63fa892 (diff)
Remove `src/ui` folder, moved to:
https://github.com/GrammaticalFramework/gf-offline-translator
Diffstat (limited to 'src/ui/ios/GF-Offline-Translator/GF Offline Translator')
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.h19
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.m50
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.h13
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.m23
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Base.lproj/Main.storyboard311
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.h21
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.m45
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Contents.json137
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60.pngbin2406 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@2x.pngbin6622 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@3x.pngbin11748 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76.pngbin3367 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@2x.pngbin9519 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@3x.pngbin16746 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small.pngbin1011 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.pngbin2317 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.pngbin4070 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.pngbin1448 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.pngbin3718 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.pngbin6388 -> 0 bytes
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Info.plist47
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.h25
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.m75
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.h19
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.m62
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.h13
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.m23
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.h32
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.m194
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.h15
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.m22
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.h18
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.m19
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.h15
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.m45
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.h15
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.m56
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.h21
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.m86
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.h35
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.m109
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationInputTableViewCell.xib58
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.h15
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.m106
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOutputTableViewCell.xib45
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.h17
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.m47
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.h20
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.m307
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.h34
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.m286
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.h32
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.m79
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.h16
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.m57
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.h15
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.m22
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.h13
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.m25
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.h17
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.m13
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/help_content.html131
-rw-r--r--src/ui/ios/GF-Offline-Translator/GF Offline Translator/main.m16
63 files changed, 0 insertions, 2936 deletions
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.h
deleted file mode 100644
index 841083385..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// AppDelegate.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class Translator;
-
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
-
-@property (strong, nonatomic) UIWindow *window;
-@property (strong, nonatomic) Translator *translator;
-
-@end
-
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.m
deleted file mode 100644
index ec2a0a85f..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/AppDelegate.m
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// AppDelegate.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "AppDelegate.h"
-
-#import "TranslatorStore.h"
-
-@interface AppDelegate ()
-
-@end
-
-@implementation AppDelegate
-
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- // Override point for customization after application launch.
-
-
- return YES;
-}
-
-- (void)applicationWillResignActive:(UIApplication *)application {
- // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application {
- // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
- [TranslatorStore saveCurrentGrammarsFromTranslator:self.translator];
-}
-
-- (void)applicationWillEnterForeground:(UIApplication *)application {
- // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application {
- // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application {
- // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.h
deleted file mode 100644
index 31a30c8b9..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.h
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// ArrowsButton.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface ArrowsButton : UIButton
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.m
deleted file mode 100644
index c2d890f32..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/ArrowsButton.m
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// ArrowsButton.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "ArrowsButton.h"
-#import "StyleKitGF.h"
-
-@implementation ArrowsButton
-
-
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect {
- // Drawing code
- [StyleKitGF drawArrowsWithFrame:rect];
-}
-
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Base.lproj/Main.storyboard b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Base.lproj/Main.storyboard
deleted file mode 100644
index 59b5cbbbf..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,311 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="xFI-0W-N5x">
- <dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
- <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
- </dependencies>
- <scenes>
- <!--Translation Text View Controller-->
- <scene sceneID="tne-QT-ifu">
- <objects>
- <viewController id="BYZ-38-t0r" customClass="TranslationTextViewController" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
- <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
- </view>
- <navigationItem key="navigationItem" id="St3-7e-rXA">
- <barButtonItem key="rightBarButtonItem" title="Info" id="pCM-e5-4xf">
- <connections>
- <segue destination="dgk-2A-luy" kind="show" identifier="Info" id="X1I-na-NNV"/>
- </connections>
- </barButtonItem>
- </navigationItem>
- <connections>
- <segue destination="B6l-9t-iLr" kind="presentation" identifier="ChangeLanguage" id="wkV-br-4Id"/>
- <segue destination="Vu1-QE-7az" kind="show" identifier="TranslationOptions" id="zeM-mX-HkR"/>
- </connections>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="1166" y="-372"/>
- </scene>
- <!--Choose language-->
- <scene sceneID="vPx-fF-xJR">
- <objects>
- <tableViewController id="Fe0-Ou-Rlf" customClass="LanguagesViewController" sceneMemberID="viewController">
- <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="2Mo-cK-SuX">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.95686274509803926" alpha="1" colorSpace="calibratedRGB"/>
- <prototypes>
- <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="LanguageCell" textLabel="qme-rd-ja5" style="IBUITableViewCellStyleDefault" id="NLI-62-k37">
- <rect key="frame" x="0.0" y="114" width="600" height="44"/>
- <autoresizingMask key="autoresizingMask"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="NLI-62-k37" id="fZN-04-6Tc">
- <rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Swedish" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qme-rd-ja5">
- <rect key="frame" x="15" y="0.0" width="570" height="43"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="16"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- </tableViewCellContentView>
- </tableViewCell>
- <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="hKD-Nt-QPD" style="IBUITableViewCellStyleDefault" id="JwG-RO-i9T">
- <rect key="frame" x="0.0" y="158" width="600" height="44"/>
- <autoresizingMask key="autoresizingMask"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JwG-RO-i9T" id="JAV-RA-w7z">
- <rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="English" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hKD-Nt-QPD">
- <rect key="frame" x="15" y="0.0" width="570" height="43"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="16"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- </tableViewCellContentView>
- </tableViewCell>
- <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="9kF-jW-ZZq" style="IBUITableViewCellStyleDefault" id="haA-Gu-nbG">
- <rect key="frame" x="0.0" y="202" width="600" height="44"/>
- <autoresizingMask key="autoresizingMask"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="haA-Gu-nbG" id="T9t-BH-xD6">
- <rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Spanish" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9kF-jW-ZZq">
- <rect key="frame" x="15" y="0.0" width="570" height="43"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="16"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- </tableViewCellContentView>
- </tableViewCell>
- </prototypes>
- <sections/>
- <connections>
- <outlet property="dataSource" destination="Fe0-Ou-Rlf" id="aoc-Vz-oLo"/>
- <outlet property="delegate" destination="Fe0-Ou-Rlf" id="Dst-b0-Mzq"/>
- </connections>
- </tableView>
- <navigationItem key="navigationItem" title="Choose language" id="iGz-3o-bcY">
- <barButtonItem key="leftBarButtonItem" systemItem="cancel" id="XEa-C1-DUt">
- <connections>
- <action selector="cancel:" destination="Fe0-Ou-Rlf" id="uO1-fV-m5z"/>
- </connections>
- </barButtonItem>
- </navigationItem>
- </tableViewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="ADZ-WF-Rrq" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="2690" y="30"/>
- </scene>
- <!--Navigation Controller-->
- <scene sceneID="Huc-dh-g8v">
- <objects>
- <navigationController automaticallyAdjustsScrollViewInsets="NO" id="xFI-0W-N5x" sceneMemberID="viewController">
- <toolbarItems/>
- <navigationBar key="navigationBar" contentMode="scaleToFill" id="xvB-hQ-an3">
- <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
- <autoresizingMask key="autoresizingMask"/>
- </navigationBar>
- <nil name="viewControllers"/>
- <connections>
- <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="CD4-Hh-94z"/>
- </connections>
- </navigationController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="1PJ-ar-1KV" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="426" y="-372"/>
- </scene>
- <!--Info-->
- <scene sceneID="nXS-Na-9ij">
- <objects>
- <viewController title="Info" id="dgk-2A-luy" customClass="WebViewController" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="muk-1p-gTk"/>
- <viewControllerLayoutGuide type="bottom" id="wdN-RZ-bap"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="0BT-Mn-C5l">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rac-eS-ve4">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </webView>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="rac-eS-ve4" firstAttribute="top" secondItem="0BT-Mn-C5l" secondAttribute="top" id="7cM-HO-6vz"/>
- <constraint firstItem="rac-eS-ve4" firstAttribute="leading" secondItem="0BT-Mn-C5l" secondAttribute="leading" id="F2R-VX-m9g"/>
- <constraint firstAttribute="trailing" secondItem="rac-eS-ve4" secondAttribute="trailing" id="Prv-Ph-Otq"/>
- <constraint firstItem="wdN-RZ-bap" firstAttribute="top" secondItem="rac-eS-ve4" secondAttribute="bottom" id="Row-Zp-YvG"/>
- </constraints>
- </view>
- <connections>
- <outlet property="webView" destination="rac-eS-ve4" id="GhE-qg-QnW"/>
- </connections>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="RKo-u1-dmE" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="1880" y="-1478"/>
- </scene>
- <!--Translation Options View Controller-->
- <scene sceneID="Gym-bd-J1L">
- <objects>
- <tableViewController id="Vu1-QE-7az" customClass="TranslationOptionsViewController" sceneMemberID="viewController">
- <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="52" sectionHeaderHeight="10" sectionFooterHeight="10" id="9Ly-b2-546">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.95686274509803926" alpha="1" colorSpace="calibratedRGB"/>
- <prototypes>
- <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Cell" id="bD0-ad-CEO" customClass="SentenceTranslationUITableViewCell">
- <rect key="frame" x="0.0" y="114" width="600" height="52"/>
- <autoresizingMask key="autoresizingMask"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bD0-ad-CEO" id="ZlP-Qe-UAj">
- <rect key="frame" x="0.0" y="0.0" width="600" height="51"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lB8-TQ-gOC">
- <rect key="frame" x="14" y="29" width="548" height="14"/>
- <fontDescription key="fontDescription" type="system" pointSize="12"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" verticalCompressionResistancePriority="751" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gZT-bJ-Kpt">
- <rect key="frame" x="8" y="8" width="554" height="21"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="infoLight" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nkL-os-Edb">
- <rect key="frame" x="570" y="15" width="22" height="22"/>
- <connections>
- <action selector="showTree:" destination="bD0-ad-CEO" eventType="touchUpInside" id="mwb-KY-CKE"/>
- </connections>
- </button>
- </subviews>
- <constraints>
- <constraint firstItem="gZT-bJ-Kpt" firstAttribute="leading" secondItem="ZlP-Qe-UAj" secondAttribute="leadingMargin" id="0dY-24-331"/>
- <constraint firstItem="nkL-os-Edb" firstAttribute="trailing" secondItem="ZlP-Qe-UAj" secondAttribute="trailingMargin" id="62L-Lw-qMg"/>
- <constraint firstAttribute="bottomMargin" secondItem="gZT-bJ-Kpt" secondAttribute="bottom" constant="14" id="7R4-WV-G6b"/>
- <constraint firstItem="lB8-TQ-gOC" firstAttribute="top" secondItem="gZT-bJ-Kpt" secondAttribute="bottom" id="8io-C1-3lS"/>
- <constraint firstItem="lB8-TQ-gOC" firstAttribute="leading" secondItem="ZlP-Qe-UAj" secondAttribute="leadingMargin" constant="6" id="FPJ-ge-w3P"/>
- <constraint firstItem="gZT-bJ-Kpt" firstAttribute="trailing" secondItem="ZlP-Qe-UAj" secondAttribute="trailingMargin" constant="-30" id="WO6-jN-5Sg"/>
- <constraint firstItem="nkL-os-Edb" firstAttribute="leading" secondItem="gZT-bJ-Kpt" secondAttribute="trailing" constant="8" id="X3h-hy-uPh"/>
- <constraint firstItem="lB8-TQ-gOC" firstAttribute="trailing" secondItem="ZlP-Qe-UAj" secondAttribute="trailingMargin" constant="-30" id="e2a-zj-bAf"/>
- <constraint firstItem="nkL-os-Edb" firstAttribute="top" secondItem="ZlP-Qe-UAj" secondAttribute="topMargin" constant="7" id="kHq-Qe-pd8"/>
- <constraint firstItem="gZT-bJ-Kpt" firstAttribute="top" secondItem="ZlP-Qe-UAj" secondAttribute="topMargin" id="rQg-rd-NdA"/>
- <constraint firstAttribute="bottomMargin" secondItem="nkL-os-Edb" secondAttribute="bottom" constant="6" id="tod-J2-c7w"/>
- <constraint firstItem="lB8-TQ-gOC" firstAttribute="bottom" secondItem="ZlP-Qe-UAj" secondAttribute="bottomMargin" id="uU7-Mw-1Hj"/>
- </constraints>
- <variation key="default">
- <mask key="constraints">
- <exclude reference="7R4-WV-G6b"/>
- </mask>
- </variation>
- </tableViewCellContentView>
- <connections>
- <outlet property="translationSentance" destination="gZT-bJ-Kpt" id="CkR-a4-myk"/>
- <outlet property="translationTree" destination="lB8-TQ-gOC" id="R1v-e6-Dec"/>
- </connections>
- </tableViewCell>
- <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Basic" textLabel="Whx-GO-JX3" style="IBUITableViewCellStyleDefault" id="8A5-Qc-R0d" customClass="SentenceTranslationUITableViewCell">
- <rect key="frame" x="0.0" y="166" width="600" height="52"/>
- <autoresizingMask key="autoresizingMask"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8A5-Qc-R0d" id="2HZ-Yy-h5F">
- <rect key="frame" x="0.0" y="0.0" width="600" height="51"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Whx-GO-JX3">
- <rect key="frame" x="15" y="0.0" width="570" height="51"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="16"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- </tableViewCellContentView>
- </tableViewCell>
- </prototypes>
- <connections>
- <outlet property="dataSource" destination="Vu1-QE-7az" id="aaA-LZ-lYo"/>
- <outlet property="delegate" destination="Vu1-QE-7az" id="MZf-as-uDy"/>
- </connections>
- </tableView>
- <navigationItem key="navigationItem" id="gHe-8r-vSO"/>
- <connections>
- <segue destination="4Hm-Xx-a85" kind="show" identifier="WebView" id="maE-LZ-yt0"/>
- </connections>
- </tableViewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="VmA-sb-BbB" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="1880" y="-784"/>
- </scene>
- <!--Web View Controller-->
- <scene sceneID="X2Q-9F-hid">
- <objects>
- <viewController id="4Hm-Xx-a85" customClass="WebViewController" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="UCN-ya-kgJ"/>
- <viewControllerLayoutGuide type="bottom" id="8GP-cw-HP4"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="e4f-Yd-GYs">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Spb-gc-bFg">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </webView>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="Spb-gc-bFg" firstAttribute="top" secondItem="e4f-Yd-GYs" secondAttribute="top" id="2Iw-Fw-8mr"/>
- <constraint firstAttribute="trailing" secondItem="Spb-gc-bFg" secondAttribute="trailing" id="LPO-8J-Adk"/>
- <constraint firstItem="Spb-gc-bFg" firstAttribute="leading" secondItem="e4f-Yd-GYs" secondAttribute="leading" id="nDD-5G-4me"/>
- <constraint firstItem="8GP-cw-HP4" firstAttribute="top" secondItem="Spb-gc-bFg" secondAttribute="bottom" id="rhL-KZ-bwq"/>
- </constraints>
- </view>
- <connections>
- <outlet property="webView" destination="Spb-gc-bFg" id="aHr-v4-S6W"/>
- </connections>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="yzz-Gx-TbE" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="2606" y="-784"/>
- </scene>
- <!--Navigation Controller-->
- <scene sceneID="WFo-Wh-qjb">
- <objects>
- <navigationController automaticallyAdjustsScrollViewInsets="NO" id="B6l-9t-iLr" sceneMemberID="viewController">
- <toolbarItems/>
- <navigationBar key="navigationBar" contentMode="scaleToFill" id="lfh-gu-V91">
- <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
- <autoresizingMask key="autoresizingMask"/>
- </navigationBar>
- <nil name="viewControllers"/>
- <connections>
- <segue destination="Fe0-Ou-Rlf" kind="relationship" relationship="rootViewController" id="mmI-Sf-zMe"/>
- </connections>
- </navigationController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="saS-qW-BUT" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="1880" y="30"/>
- </scene>
- </scenes>
-</document>
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.h
deleted file mode 100644
index 70f842633..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// Grammar.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "pgf/pgf.h"
-
-@class Language;
-@class Translator;
-
-@interface Grammar : NSObject
-@property (nonatomic) Language *language;
-@property (nonatomic) PgfConcr *concrete;
-
-+ (Grammar *)loadGrammarFromLanguage:(Language *)language withTranslator:(Translator *)translator;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.m
deleted file mode 100644
index 5ce6c0269..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Grammar.m
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// Grammar.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "Grammar.h"
-#import "Translator.h"
-#import "Language.h"
-
-// Grammatical Framework
-#import "pgf/pgf.h"
-#import "gu/mem.h"
-#import "gu/exn.h"
-#import "gu/file.h"
-
-@implementation Grammar
-
-+ (Grammar *)loadGrammarFromLanguage:(Language *)language withTranslator:(Translator *)translator {
- Grammar *grammar = [Grammar new];
-
- // Load the file
- NSString *appLanguage = [NSString stringWithFormat:@"App%@",language.abbreviation];
-
- PgfConcr *concr = pgf_get_language(translator.pgf, [appLanguage UTF8String]);
- NSString *path = [[NSBundle mainBundle] pathForResource:appLanguage ofType:@"pgf_c"];
- FILE *file = fopen([path UTF8String], "r");
-
- GuIn *guIn = gu_file_in(file, translator.pool);
-
- pgf_concrete_load(concr, guIn, translator.err);
-
- grammar.concrete = concr;
- grammar.language = language;
-
- return grammar;
-}
-
-- (void)dealloc {
- pgf_concrete_unload(self.concrete);
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Contents.json b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index c04dfd8f3..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "images" : [
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-Small.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-Small@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "29x29",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone",
- "size" : "40x40",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-Spotlight-40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-60@3x.png",
- "scale" : "3x"
- },
- {
- "idiom" : "ipad",
- "size" : "29x29",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "29x29",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-Spotlight-40.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-Spotlight-40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-76.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "24x24",
- "idiom" : "watch",
- "scale" : "2x",
- "role" : "notificationCenter",
- "subtype" : "38mm"
- },
- {
- "size" : "27.5x27.5",
- "idiom" : "watch",
- "scale" : "2x",
- "role" : "notificationCenter",
- "subtype" : "42mm"
- },
- {
- "size" : "29x29",
- "idiom" : "watch",
- "role" : "companionSettings",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "watch",
- "filename" : "Icon-Small@3x.png",
- "role" : "companionSettings",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "watch",
- "scale" : "2x",
- "role" : "appLauncher",
- "subtype" : "38mm"
- },
- {
- "size" : "44x44",
- "idiom" : "watch",
- "scale" : "2x",
- "role" : "longLook",
- "subtype" : "42mm"
- },
- {
- "size" : "86x86",
- "idiom" : "watch",
- "scale" : "2x",
- "role" : "quickLook",
- "subtype" : "38mm"
- },
- {
- "size" : "98x98",
- "idiom" : "watch",
- "scale" : "2x",
- "role" : "quickLook",
- "subtype" : "42mm"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-} \ No newline at end of file
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60.png
deleted file mode 100644
index 76758a145..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png
deleted file mode 100644
index 57aab6c95..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png
deleted file mode 100644
index b71f5aa7e..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76.png
deleted file mode 100644
index 8f9c74d48..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
deleted file mode 100644
index 85d1b9518..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@3x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@3x.png
deleted file mode 100644
index 6f4587895..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-76@3x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small.png
deleted file mode 100644
index 526eaeeb7..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
deleted file mode 100644
index c707559a8..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png
deleted file mode 100644
index a2c8d23b7..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png
deleted file mode 100644
index 562c13758..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png
deleted file mode 100644
index c9cd5bcd8..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png
deleted file mode 100644
index f823628f9..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png
+++ /dev/null
Binary files differ
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Info.plist b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Info.plist
deleted file mode 100644
index 11cf2a677..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIdentifier</key>
- <string>GF.$(PRODUCT_NAME:rfc1034identifier)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>$(PRODUCT_NAME)</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>0.2</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>8</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>UILaunchStoryboardName</key>
- <string>Main</string>
- <key>UIMainStoryboardFile</key>
- <string>Main</string>
- <key>UIRequiredDeviceCapabilities</key>
- <array>
- <string>armv7</string>
- </array>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UISupportedInterfaceOrientations~ipad</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
-</dict>
-</plist>
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.h
deleted file mode 100644
index 921929cb3..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// Language.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface Language : NSObject
-
-@property (nonatomic, copy) NSString *name;
-@property (nonatomic, copy) NSString *abbreviation;
-@property (nonatomic, copy) NSString *bcp;
-
-
-- (instancetype)initWithName:(NSString *)name
- abbreviation:(NSString *)abbreviation
- bcp:(NSString *)bcp;
-
-- (BOOL)isEqualToLanguage:(Language *)language;
-+ (NSArray *)allLanguages;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.m
deleted file mode 100644
index ba0b526e9..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Language.m
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// Language.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "Language.h"
-
-
-@implementation Language
-
-- (instancetype)initWithName:(NSString *)name
- abbreviation:(NSString *)abbreviation
- bcp:(NSString *)bcp {
- self = [super init];
- if (self) {
- _name = name;
- _abbreviation = abbreviation;
- _bcp = bcp;
- }
- return self;
-}
-
-- (BOOL)isEqualToLanguage:(Language *)language {
- if (!language) {
- return NO;
- }
-
- BOOL haveEqualNames = (!self.name && !language.name) || [self.name isEqualToString:language.name];
- BOOL haveEqualBcp = (!self.bcp && !language.bcp) || [self.bcp isEqualToString:language.bcp];
-
- return haveEqualNames && haveEqualBcp;
-}
-
-+ (NSArray *)allLanguages {
- return @[
- [[Language alloc] initWithName:@"Bulgarian" abbreviation:@"Bul" bcp:@"en-GB"],
- [[Language alloc] initWithName:@"Chinese" abbreviation:@"Chi" bcp:@"zh-CN"],
- [[Language alloc] initWithName:@"Catalan" abbreviation:@"Cat" bcp:@"ca-ES"],
- [[Language alloc] initWithName:@"Dutch" abbreviation:@"Dut" bcp:@"nl-NL"],
- [[Language alloc] initWithName:@"English" abbreviation:@"Eng" bcp:@"en-GB"],
- [[Language alloc] initWithName:@"Estonian" abbreviation:@"Est" bcp:@"es-EE"],
- [[Language alloc] initWithName:@"Finnish" abbreviation:@"Fin" bcp:@"fi-FI"],
- [[Language alloc] initWithName:@"French" abbreviation:@"Fre" bcp:@"fr-FR"],
- [[Language alloc] initWithName:@"German" abbreviation:@"Ger" bcp:@"de-DE"],
- [[Language alloc] initWithName:@"Hindi" abbreviation:@"Hin" bcp:@"hi-IN"],
- [[Language alloc] initWithName:@"Italian" abbreviation:@"Ita" bcp:@"it-IT"],
- [[Language alloc] initWithName:@"Japanese" abbreviation:@"Jpn" bcp:@"ja-JP"],
- [[Language alloc] initWithName:@"Spanish" abbreviation:@"Spa" bcp:@"es-ES"],
- [[Language alloc] initWithName:@"Swedish" abbreviation:@"Swe" bcp:@"sv-SE"],
- [[Language alloc] initWithName:@"Thai" abbreviation:@"Tha" bcp:@"th-TH"]
- ];
-}
-
-#pragma mark - NSObject
-
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
-
- if (![object isKindOfClass:[Language class]]) {
- return NO;
- }
-
- return [self isEqualToLanguage:(Language *)object];
-}
-
-- (NSUInteger)hash {
- return [self.name hash] ^ [self.bcp hash];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.h
deleted file mode 100644
index 278d8cf96..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// LanguagesViewController.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "TranslationTextViewController.h"
-@class Language;
-
-
-@interface LanguagesViewController : UITableViewController
-@property (nonatomic, weak) id<TranslationTextViewControllerDelegate> delegate;
-@property (nonatomic) NSArray *currentLanguages;
-@property (nonatomic) BOOL fromLanguage;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.m
deleted file mode 100644
index 22616501e..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/LanguagesViewController.m
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// LanguagesViewController.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "LanguagesViewController.h"
-#import "Language.h"
-#import "UITableViewCell+Customize.h"
-
-@interface LanguagesViewController ()
-
-@property (nonatomic) NSArray *languages;
-
-@end
-
-@implementation LanguagesViewController
-
-#pragma mark - View lifecycle
-
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- // Removes already used languages
- NSMutableArray *allLanguagesMutableCopy = Language.allLanguages.mutableCopy;
- [allLanguagesMutableCopy removeObjectsInArray:self.currentLanguages];
- self.languages = allLanguagesMutableCopy.copy;
-}
-
-#pragma mark - User Interaction
-
-- (IBAction)cancel:(UIBarButtonItem *)sender {
- [self dismissViewControllerAnimated:YES completion:nil];
-}
-
-#pragma mark - Table view data source
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return self.languages.count;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LanguageCell" forIndexPath:indexPath];
-
- Language *language = self.languages[indexPath.row];
- cell.textLabel.text = language.name;
-
- return cell;
-}
-
-#pragma mark - Table view delegate
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- Language *language = self.languages[indexPath.row];
-
- [self.delegate changeLanguageToLanguage:language isFrom:self.fromLanguage];
- [self dismissViewControllerAnimated:YES completion:nil];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.h
deleted file mode 100644
index ac0efa162..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.h
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// MenuViewItem.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface MenuView : UIButton
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.m
deleted file mode 100644
index 858d553f1..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MenuView.m
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// MenuViewItem.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "MenuView.h"
-#import "StyleKitGF.h"
-
-@implementation MenuView
-
-
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect {
- // Drawing code
- [StyleKitGF drawMenyItemWithFrame:rect];
-}
-
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.h
deleted file mode 100644
index 59c5d164f..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// MorphAnalyser.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-24.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-// Grammitcal framework
-#import "pgf.h"
-
-@class Grammar;
-
-@interface MorphAnalyser : NSObject
-
-@property (nonatomic) PgfPGF *pgf;
-@property (nonatomic) GuExn *err;
-
-@property (nonatomic, strong) Grammar *to;
-@property (nonatomic, strong) Grammar *from;
-
-@property (nonatomic, readonly) NSArray *analysedWords;
-@property (nonatomic, readonly) NSString *bestTranslation;
-@property (nonatomic, readonly) NSMutableArray *html;
-
-
-- (instancetype)initWithPgf:(PgfPGF *)pgf err:(GuExn *)err to:(Grammar *)to from:(Grammar *)from;
-- (void)analysWord:(NSString *)word;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.m
deleted file mode 100644
index 81af81407..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/MorphAnalyser.m
+++ /dev/null
@@ -1,194 +0,0 @@
-//
-// MorphAnalyser.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-24.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "MorphAnalyser.h"
-
-// Model
-#import "Grammar.h"
-
-// Grammatical Framework
-#import "pgf/pgf.h"
-#import "gu/mem.h"
-#import "gu/exn.h"
-#import "gu/file.h"
-
-
-typedef struct {
- PgfMorphoCallback callback;
- PgfPGF* pgf;
- PgfConcr* src;
- PgfConcr* tgt;
-} PgfLinLemmasCallback;
-
-NSMutableArray *morphWords;
-NSMutableArray *htmls;
-
-void print_lemma(PgfMorphoCallback* _self,
- PgfCId lemma, GuString analysis, prob_t prob,
- GuExn* err) {
-
- PgfLinLemmasCallback* this = gu_container(_self, PgfMorphoCallback, callback);
-
- // Here we print the lemmas. One and the same lemma could
- // appear several times if there are different analyses.
- // In this case "barn" is child but it could be in singular,
- // in plural or it could be used as a compound form.
- // Duplications should be eliminated in the user interface.
-
- printf("%s (%s)\n", lemma, analysis);
-
- GuPool* tmp_pool = gu_new_pool();
- GuStringBuf* buf = gu_string_buf(tmp_pool);
- GuOut* out = gu_string_buf_out(buf);
-
- // Now we build an expression from the lemma.
- PgfApplication app = {lemma, 0};
- PgfExpr expr = pgf_expr_apply(&app, tmp_pool);
-
- // Now we linearize the expression in the source language
- pgf_linearize(this->src, expr, out, err);
-
- if (pgf_has_linearization(this->tgt, lemma))
- gu_puts(" - ", out, err);
- else
- gu_puts(" ", out, err);
-
- // Here we extract the type of the lemma
- // N for nouns, V,V2,V3,V2V,... for verbs, A for adjectives,
- // Prep for prepositions, etc.
- PgfType* ty = pgf_function_type(this->pgf, lemma);
-
- NSString *inflectionCid = [NSString stringWithFormat:@"Inflection%@",
- [NSString stringWithUTF8String:ty->cid]];
-
- BOOL hasLinearization = pgf_has_linearization(this->tgt, [inflectionCid UTF8String]);
-
- // Here we get the tag that should be shown in the UI
- {
- // The purpose of this buffer is to just construct an expression.
- // Maybe there is an easier way in ObjectiveC
- GuStringBuf* expr_buf = gu_string_buf(tmp_pool);
- GuOut* expr_out = gu_string_buf_out(expr_buf);
-
-
-
- if (hasLinearization) {
- gu_printf(expr_out, err, "MkTag (Inflection%s %s)",ty->cid ,lemma);
- GuString s = gu_string_buf_freeze(expr_buf, tmp_pool);
- GuIn* in = gu_string_in(s, tmp_pool);
- PgfExpr tag_expr = pgf_read_expr(in, tmp_pool, err);
-
- pgf_linearize(this->tgt, tag_expr, out, err);
-
- gu_puts(". ", out, err);
- }
- }
-
- if (pgf_has_linearization(this->tgt, lemma)) {
-
-
- // Now we linearize the expression in the target language
- // This is the only thing that needs to be done for
- // visualization in the first view. Everything else
- // is useful only for the second view which shows
- // inflection tables and alternative translations.
- pgf_linearize(this->tgt, expr, out, err);
- } else {
-// gu_puts(".", out, err);
- }
-
- // Finally we get the string which is used for describing
- // the different lexical entries in the translations view
- GuString s = gu_string_buf_freeze(buf, tmp_pool);
- printf("entry: %s\n", s);
-
- NSString *translation = [NSString stringWithUTF8String:s];
- if ([morphWords containsObject:translation]) { //||
-// [[translation stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] hasSuffix:@"."]) {
- return;
- }
-
- [morphWords addObject:translation];
-
- // Here we get the html for the inflection table
- if (hasLinearization) {
- // The purpose of this buffer is to just construct an expression.
- // Maybe there is an easier way in ObjectiveC
- GuStringBuf* expr_buf = gu_string_buf(tmp_pool);
- GuOut* expr_out = gu_string_buf_out(expr_buf);
- gu_printf(expr_out, err, "MkDocument \"\" (Inflection%s %s) \"\"",ty->cid, lemma);
- GuString s = gu_string_buf_freeze(expr_buf, tmp_pool);
- GuIn* in = gu_string_in(s, tmp_pool);
- PgfExpr html_expr = pgf_read_expr(in, tmp_pool, err);
-
- GuStringBuf* html_buf = gu_string_buf(tmp_pool);
- GuOut* html_out = gu_string_buf_out(html_buf);
- pgf_linearize(this->tgt, html_expr, html_out, err);
- GuString lin = gu_string_buf_freeze(html_buf, tmp_pool);
- printf("html:\n%s\n", lin);
-
- NSString *htmlString = [NSString stringWithUTF8String:lin];
-
- if (htmlString.length > 0) {
- NSMutableString *html = [NSMutableString stringWithString: @"<html><head><title></title></head><body style=\"background:transparent;\">"];
- [html appendString:htmlString];
- [html appendString:@"</body></html>"];
- [htmls addObject:html];
- }
- } else {
- [htmls addObject:@""];
- }
-
- printf("\n");
- gu_pool_free(tmp_pool);
-}
-
-
-@implementation MorphAnalyser
-
-- (instancetype)initWithPgf:(PgfPGF *)pgf err:(GuExn *)err to:(Grammar *)to from:(Grammar *)from {
- self = [super init];
-
- if (self) {
- _pgf = pgf;
- _err = err;
- _to = to;
- _from = from;
- }
- return self;
-}
-
-
-- (NSString *)bestTranslation {
- if (self.analysedWords.count) {
- for (NSString *translation in self.analysedWords) {
- if (![[translation stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] hasSuffix:@"."]) {
- return [[translation componentsSeparatedByString:@" "].lastObject stringByAppendingString:@" "];
- }
- }
- }
- return nil;
-}
-
-- (void)analysWord:(NSString *)word {
-
- morphWords = [NSMutableArray new];
- htmls = [NSMutableArray new];
-
- PgfLinLemmasCallback callback = { { print_lemma }, self.pgf, self.from.concrete, self.to.concrete };
- pgf_lookup_morpho(self.from.concrete, [word UTF8String], &callback.callback, self.err);
-
- _analysedWords = morphWords;
- _html = htmls;
-
- htmls = nil;
- morphWords = nil;
-}
-
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.h
deleted file mode 100644
index 209a1dd55..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// NSString+stringToArray.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-03.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface NSString (StringToArray)
-
-- (NSArray *)stringToArray;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.m
deleted file mode 100644
index a023673f3..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/NSString+StringToArray.m
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// NSString+stringToArray.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-03.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "NSString+stringToArray.h"
-
-@implementation NSString (StringToArray)
-
-- (NSArray *)stringToArray {
- NSMutableArray *array = [NSMutableArray array];
- for (int i = 0; i < [self length]; i++) {
- NSString *character = [self substringWithRange:NSMakeRange(i, 1)];
- [array addObject:character];
- }
- return array;
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.h
deleted file mode 100644
index 8499cf34c..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// Translation.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-04.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "Translation.h"
-
-
-
-@interface PhraseTranslation : Translation
-
-@property (nonatomic, strong) NSArray *sequences;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.m
deleted file mode 100644
index 308f49546..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/PhraseTranslation.m
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Translation.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-04.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "PhraseTranslation.h"
-#import "UIColor+TranslationsResults.h"
-
-
-
-@implementation PhraseTranslation
-
-
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.h
deleted file mode 100644
index e997c1e06..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// SLKTextView+TextInputMode.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-05.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "SLKTextView.h"
-
-@interface SLKTextView (TextInputMode)
-
-@property (nonatomic,retain) NSString *userDefinedKeyboardLanguage;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.m
deleted file mode 100644
index 278f22e3f..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SLKTextView+TextInputMode.m
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// SLKTextView+TextInputMode.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-05.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "SLKTextView+TextInputMode.h"
-#import <objc/runtime.h>
-
-@implementation SLKTextView (TextInputMode)
-
-static char userDefinedKeyboardLanguageKey;
-
-- (NSString *)userDefinedKeyboardLanguage {
- return objc_getAssociatedObject(self, &userDefinedKeyboardLanguageKey);
-}
-
-- (void)setUserDefinedKeyboardLanguage:(NSString *)aString {
- objc_setAssociatedObject(self, &userDefinedKeyboardLanguageKey, aString, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-}
-
-- (UITextInputMode *) textInputMode {
- for (UITextInputMode *tim in [UITextInputMode activeInputModes]) {
- if ([[SLKTextView langFromLocale:self.userDefinedKeyboardLanguage] isEqualToString:[SLKTextView langFromLocale:tim.primaryLanguage]]) {
- return tim;
- }
- }
- return [super textInputMode];
-}
-
-+ (NSString *)langFromLocale:(NSString *)locale {
- NSRange rangeOne = [locale rangeOfString:@"_"];
- if (rangeOne.length == 0)
- rangeOne.location = locale.length;
-
- NSRange rangeTwo = [locale rangeOfString:@"-"];
- if (rangeTwo.length == 0)
- rangeTwo.location = locale.length;
-
- return [[locale substringToIndex:MIN(rangeOne.location, rangeTwo.location)] lowercaseString];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.h
deleted file mode 100644
index 97eb3bfc9..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// SentenceTranslationUITableViewCell.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-18.
-// Copyright © 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface SentenceTranslationUITableViewCell : UITableViewCell
-
-- (void)configureCellWithSentenceInTableView:(UITableView *)tableView withTranslation:(NSString *)translation andTree:(NSString *)tree;
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.m
deleted file mode 100644
index 06325637c..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/SentenceTranslationUITableViewCell.m
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// SentenceTranslationUITableViewCell.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-18.
-// Copyright © 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "SentenceTranslationUITableViewCell.h"
-#import "PhraseTranslation.h"
-
-@interface SentenceTranslationUITableViewCell ()
-@property (weak, nonatomic) IBOutlet UILabel *translationSentance;
-@property (weak, nonatomic) IBOutlet UILabel *translationTree;
-
-@property (weak, nonatomic) UITableView *tableView;
-
-@property (strong, nonatomic) NSString *translationTreeText;
-
-@end
-
-@implementation SentenceTranslationUITableViewCell
-
-- (void)configureCellWithSentenceInTableView:(UITableView *)tableView withTranslation:(NSString *)translation andTree:(NSString *)tree {
- self.tableView = tableView;
- self.translationSentance.text = translation;
- self.translationTreeText = tree;
-
- self.translationTree.text = @"";
-}
-- (IBAction)showTree:(id)sender {
-
- if ([self.translationTree.text isEqualToString:@""]) {
- self.translationTree.alpha = 0;
-
- [self.tableView beginUpdates];
- self.translationTree.text = self.translationTreeText;
- [self.tableView endUpdates];
-
- [UIView animateWithDuration:0.25 delay:0.15 options:0 animations:^{
- self.translationTree.alpha = 1;
- } completion:nil];
-
- } else {
- [UIView animateWithDuration:0.25 animations:^{
- self.translationTree.alpha = 0;
- } completion:^(BOOL finished) {
- [self.tableView beginUpdates];
- self.translationTree.text = @"";
- [self.tableView endUpdates];
- }];
- }
-
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.h
deleted file mode 100644
index 568e09a31..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// StyleKitGF.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-19.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-// Generated by PaintCode (www.paintcodeapp.com)
-//
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-
-@interface StyleKitGF : NSObject
-
-// Drawing Methods
-+ (void)drawArrowsWithFrame: (CGRect)frame;
-+ (void)drawMenyItemWithFrame: (CGRect)frame;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.m
deleted file mode 100644
index 7ca703152..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/StyleKitGF.m
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// StyleKitGF.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-19.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-// Generated by PaintCode (www.paintcodeapp.com)
-//
-
-#import "StyleKitGF.h"
-
-
-@implementation StyleKitGF
-
-#pragma mark Initialization
-
-+ (void)initialize
-{
-}
-
-#pragma mark Drawing Methods
-
-+ (void)drawArrowsWithFrame: (CGRect)frame
-{
- //// Color Declarations
- UIColor* color = [UIColor colorWithRed: 0 green: 0.478 blue: 1 alpha: 1];
-
- //// Bezier Drawing
- UIBezierPath* bezierPath = UIBezierPath.bezierPath;
- [bezierPath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.77855 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.53483 * CGRectGetHeight(frame))];
- [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.31140 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.53483 * CGRectGetHeight(frame))];
- [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.31140 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.45788 * CGRectGetHeight(frame))];
- [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.77855 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.45788 * CGRectGetHeight(frame))];
- [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.77855 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.53483 * CGRectGetHeight(frame))];
- [bezierPath closePath];
- [bezierPath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.77855 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.34247 * CGRectGetHeight(frame))];
- [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.77855 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.64384 * CGRectGetHeight(frame))];
- [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.95436 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.50918 * CGRectGetHeight(frame))];
- [bezierPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.77855 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.34247 * CGRectGetHeight(frame))];
- [bezierPath closePath];
- [color setFill];
- [bezierPath fill];
-
-
- //// Bezier 2 Drawing
- UIBezierPath* bezier2Path = UIBezierPath.bezierPath;
- [bezier2Path moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22452 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.53483 * CGRectGetHeight(frame))];
- [bezier2Path addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.68880 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.53483 * CGRectGetHeight(frame))];
- [bezier2Path addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.68880 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.45788 * CGRectGetHeight(frame))];
- [bezier2Path addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22452 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.45788 * CGRectGetHeight(frame))];
- [bezier2Path addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22452 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.53483 * CGRectGetHeight(frame))];
- [bezier2Path closePath];
- [bezier2Path moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22452 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.34247 * CGRectGetHeight(frame))];
- [bezier2Path addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22452 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.64384 * CGRectGetHeight(frame))];
- [bezier2Path addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.04979 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.50918 * CGRectGetHeight(frame))];
- [bezier2Path addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22452 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.34247 * CGRectGetHeight(frame))];
- [bezier2Path closePath];
- [color setFill];
- [bezier2Path fill];
-}
-
-+ (void)drawMenyItemWithFrame: (CGRect)frame
-{
- //// Color Declarations
- UIColor* color = [UIColor colorWithRed: 0 green: 0.478 blue: 1 alpha: 1];
-
- //// Oval Drawing
- UIBezierPath* ovalPath = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(CGRectGetMinX(frame) + 1, CGRectGetMinY(frame) + 3, floor((CGRectGetWidth(frame) - 1) * 0.28037 + 0.5), CGRectGetHeight(frame) - 6)];
- [color setFill];
- [ovalPath fill];
-
-
- //// Oval 2 Drawing
- UIBezierPath* oval2Path = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(CGRectGetMinX(frame) + floor(CGRectGetWidth(frame) * 0.36111 + 0.5), CGRectGetMinY(frame) + 3, floor(CGRectGetWidth(frame) * 0.63889 + 0.5) - floor(CGRectGetWidth(frame) * 0.36111 + 0.5), CGRectGetHeight(frame) - 6)];
- [color setFill];
- [oval2Path fill];
-
-
- //// Oval 3 Drawing
- UIBezierPath* oval3Path = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(CGRectGetMinX(frame) + floor((CGRectGetWidth(frame) - 2) * 0.71698 + 0.5), CGRectGetMinY(frame) + 3, CGRectGetWidth(frame) - 2 - floor((CGRectGetWidth(frame) - 2) * 0.71698 + 0.5), CGRectGetHeight(frame) - 6)];
- [color setFill];
- [oval3Path fill];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.h
deleted file mode 100644
index 7b5d06aec..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// Translation.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-03.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class Language;
-
-typedef NS_ENUM(NSUInteger, TranslationResult) {
- WorstResult,
- BestResult,
- DefaultResult,
- ParseByChunksResult,
- InputSentence
-};
-
-@interface Translation : NSObject
-
-@property (nonatomic) NSString *fromText;
-@property (nonatomic) NSString *toText;
-@property (nonatomic) NSArray *toTexts;
-@property (nonatomic) Language *fromLanguage;
-@property (nonatomic) Language *toLanguage;
-@property (nonatomic) TranslationResult result;
-
-+ (instancetype)translationWithText:(NSString *)fromText
- toText:(NSString *)toText
- fromLanguage:(Language *)fromLanguage
- toLanguage:(Language *)toLanguage;
-- (void)speak;
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.m
deleted file mode 100644
index 8a2bc67fc..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translation.m
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// Translation.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-03.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "Translation.h"
-#import "Language.h"
-#import <AVFoundation/AVFoundation.h>
-
-
-@implementation Translation
-
-@synthesize toTexts = _toTexts;
-
-+ (instancetype)translationWithText:(NSString *)fromText
- toText:(NSString *)toText
- fromLanguage:(Language *)fromLanguage
- toLanguage:(Language *)toLanguage {
- Translation *translation = [self new];
-
- translation.result = [Translation resultForText:toText];
-
- translation.toText = [Translation formatTranslation:toText];
- translation.fromText = fromText;
-
- translation.fromLanguage = fromLanguage;
- translation.toLanguage = toLanguage;
-
- return translation;
-}
-
-+ (TranslationResult)resultForText:(NSString *)text {
-
- NSString *firstChar = [text substringToIndex:1];
-
- if (text.length == 0) {
- return DefaultResult;
- }
-
- if ([firstChar isEqualToString:@"%"] ||
- [text rangeOfString:@"parse error:"].location != NSNotFound ||
- [text rangeOfString:@"["].location != NSNotFound) {
- return WorstResult;
- }
-
- if ([firstChar isEqualToString:@"*"]) {
- return ParseByChunksResult;
- }
-
- if ([firstChar isEqualToString:@"+"]) {
- return BestResult;
- }
-
- return DefaultResult;
-}
-
-+ (NSString *)formatTranslation:(NSString *)text {
-
- if (text.length == 0) {
- return text;
- }
-
- NSCharacterSet *charsToRemove = [NSCharacterSet characterSetWithCharactersInString:@"+*% "];
- NSString *trimmedText = [text stringByTrimmingCharactersInSet:charsToRemove];
-
- for (NSString *charToRemove in @[@"[", @"]", @"_"]) {
- trimmedText =[trimmedText stringByReplacingOccurrencesOfString:charToRemove withString:@" "];
- }
-
- return trimmedText;
-}
-
-- (void)speak {
- AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:self.toText];
- utterance.rate = AVSpeechUtteranceMinimumSpeechRate;
- utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:self.toLanguage.bcp];
-
- AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init];
- [synthesizer speakUtterance:utterance];
-}
-
-#pragma mark - Setters & getters
-
-- (NSString *)toText {
- if (!_toText) {
- return _fromText;
- }
- return _toText;
-}
-
-- (NSArray *)toTexts {
- if (nil) {
- return @[_fromText];
- }
- return _toTexts;
-}
-
-- (void)setToTexts:(NSArray *)toTexts {
- NSMutableArray *formatedTexts = [NSMutableArray new];
- for (NSString *text in toTexts) {
- [formatedTexts addObject:[Translation formatTranslation:text]];
- }
- _toTexts = formatedTexts.copy;
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationInputTableViewCell.xib b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationInputTableViewCell.xib
deleted file mode 100644
index 2b8a2a451..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationInputTableViewCell.xib
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
- <dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
- <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
- <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TranslationInput" id="UIw-HO-3Uj" customClass="TranslationTextTableViewCell">
- <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
- <autoresizingMask key="autoresizingMask"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="UIw-HO-3Uj" id="7tu-Bs-CSE">
- <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7To-y6-ppO">
- <rect key="frame" x="9" y="2" width="58" height="39"/>
- <color key="backgroundColor" red="0.30855830201242807" green="0.77903700374603524" blue="1" alpha="1" colorSpace="calibratedRGB"/>
- </view>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" verticalCompressionResistancePriority="751" misplaced="YES" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="adT-pY-vJo">
- <rect key="frame" x="18" y="8" width="40" height="27"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- <constraints>
- <constraint firstItem="7To-y6-ppO" firstAttribute="leading" secondItem="7tu-Bs-CSE" secondAttribute="leading" id="5hM-ra-fKy"/>
- <constraint firstAttribute="trailingMargin" relation="greaterThanOrEqual" secondItem="adT-pY-vJo" secondAttribute="trailing" constant="25" id="69O-6f-UoR"/>
- <constraint firstItem="adT-pY-vJo" firstAttribute="leading" secondItem="7tu-Bs-CSE" secondAttribute="leadingMargin" id="9Vd-9J-Rlw"/>
- <constraint firstItem="adT-pY-vJo" firstAttribute="leading" secondItem="7tu-Bs-CSE" secondAttribute="leadingMargin" constant="10" id="IkA-0z-tjq"/>
- <constraint firstItem="7To-y6-ppO" firstAttribute="trailing" secondItem="adT-pY-vJo" secondAttribute="trailing" id="NvK-qx-qu9"/>
- <constraint firstAttribute="bottomMargin" secondItem="adT-pY-vJo" secondAttribute="bottom" id="OoV-Kh-Bco"/>
- <constraint firstItem="adT-pY-vJo" firstAttribute="top" secondItem="7tu-Bs-CSE" secondAttribute="topMargin" id="WIB-Kb-Qc8"/>
- <constraint firstItem="7To-y6-ppO" firstAttribute="trailing" secondItem="adT-pY-vJo" secondAttribute="trailing" constant="9" id="fs7-hl-Qh7"/>
- <constraint firstAttribute="trailing" secondItem="7To-y6-ppO" secondAttribute="trailing" id="kaU-fi-tBu"/>
- <constraint firstAttribute="bottom" secondItem="7To-y6-ppO" secondAttribute="bottom" constant="2" id="lcW-9e-wSN"/>
- <constraint firstItem="7To-y6-ppO" firstAttribute="leading" secondItem="adT-pY-vJo" secondAttribute="leading" constant="-9" id="oN5-mX-1Gl"/>
- <constraint firstItem="7To-y6-ppO" firstAttribute="top" secondItem="7tu-Bs-CSE" secondAttribute="top" constant="2" id="voa-C4-ldW"/>
- </constraints>
- <variation key="default">
- <mask key="constraints">
- <exclude reference="5hM-ra-fKy"/>
- <exclude reference="NvK-qx-qu9"/>
- <exclude reference="kaU-fi-tBu"/>
- <exclude reference="9Vd-9J-Rlw"/>
- </mask>
- </variation>
- </tableViewCellContentView>
- <connections>
- <outlet property="decorationView" destination="7To-y6-ppO" id="yF5-JS-aJv"/>
- <outlet property="translationTextLabel" destination="adT-pY-vJo" id="Yma-rH-iaF"/>
- </connections>
- <point key="canvasLocation" x="678" y="412"/>
- </tableViewCell>
- </objects>
-</document>
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.h
deleted file mode 100644
index 08da46370..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// TranslationOptionsViewController.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-11.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class Translation;
-
-@interface TranslationOptionsViewController : UITableViewController
-@property (nonatomic) Translation *translation;
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.m
deleted file mode 100644
index c14238d83..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOptionsViewController.m
+++ /dev/null
@@ -1,106 +0,0 @@
-//
-// TranslationOptionsViewController.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-11.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "TranslationOptionsViewController.h"
-#import "PhraseTranslation.h"
-#import "WordTranslation.h"
-#import "WebViewController.h"
-#import "SentenceTranslationUITableViewCell.h"
-
-@implementation TranslationOptionsViewController
-
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- self.tableView.rowHeight = UITableViewAutomaticDimension;
- self.tableView.estimatedRowHeight = 19;
-}
-
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
-
- [self.tableView reloadData];
-}
-
-#pragma mark - Table view data source
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return self.translation.toTexts.count;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
-
- if ([self.translation isMemberOfClass:[WordTranslation class]]) {
-
- NSString *identifier = @"Basic";
-
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath];
-
- WordTranslation *translation = (WordTranslation *)self.translation;
- NSString *html = translation.html[indexPath.row];
-
- cell.textLabel.text = translation.toTexts[indexPath.row];
-
- if (html.length > 0) {
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
- } else {
- cell.accessoryType = UITableViewCellAccessoryNone;
- }
-
- return cell;
- } else if ([self.translation isMemberOfClass:[PhraseTranslation class]]) {
-
- NSString *identifier = @"Cell";
-
- SentenceTranslationUITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath];
-
- PhraseTranslation *translation = (PhraseTranslation *)self.translation;
-
- [cell configureCellWithSentenceInTableView:tableView
- withTranslation:translation.toTexts[indexPath.row]
- andTree:translation.sequences[indexPath.row]];
- return cell;
- }
-
- return nil;
-}
-
-#pragma mark - Table view delegate
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
- if ([self.translation isMemberOfClass:[WordTranslation class]]) {
- WordTranslation *translation = (WordTranslation *)self.translation;
- NSString *html = translation.html[indexPath.row];
-
- if (html.length > 0) {
- [self performSegueWithIdentifier:@"WebView" sender:indexPath];
- }
- }
-}
-
-#pragma mark - Navigation
-
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- [super prepareForSegue:segue sender:sender];
-
- // WebView
- if ([sender isKindOfClass:[NSIndexPath class]] &&
- [self.translation isMemberOfClass:[WordTranslation class]]) {
-
- WordTranslation *translation = (WordTranslation *)self.translation;
- NSIndexPath *indexPath = (NSIndexPath *)sender;
-
- WebViewController *webVC = segue.destinationViewController;
- webVC.title = translation.toText;
- webVC.htmlToRender = translation.html[indexPath.row];
- }
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOutputTableViewCell.xib b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOutputTableViewCell.xib
deleted file mode 100644
index 9b56a1298..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationOutputTableViewCell.xib
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
- <dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
- <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
- <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TranslationOutput" id="KGk-i7-Jjw" customClass="TranslationTextTableViewCell">
- <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
- <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X0L-SM-Oy6">
- <rect key="frame" x="251" y="2" width="61" height="39"/>
- <color key="backgroundColor" red="1" green="0.26915805189999997" blue="0.054802574200000002" alpha="1" colorSpace="calibratedRGB"/>
- </view>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" verticalCompressionResistancePriority="751" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uQa-0I-JXG">
- <rect key="frame" x="261" y="8" width="42" height="27"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- <constraints>
- <constraint firstItem="uQa-0I-JXG" firstAttribute="bottom" secondItem="H2p-sc-9uM" secondAttribute="bottomMargin" id="0kp-2S-9HE"/>
- <constraint firstItem="uQa-0I-JXG" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="25" id="7tz-W5-sjO"/>
- <constraint firstItem="uQa-0I-JXG" firstAttribute="leading" secondItem="X0L-SM-Oy6" secondAttribute="leading" constant="10" id="PeL-5E-g6c"/>
- <constraint firstItem="X0L-SM-Oy6" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="2" id="Y0H-g2-j15"/>
- <constraint firstItem="uQa-0I-JXG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="aF2-US-9FV"/>
- <constraint firstItem="uQa-0I-JXG" firstAttribute="trailing" secondItem="X0L-SM-Oy6" secondAttribute="trailing" constant="-9" id="iCN-4t-n07"/>
- <constraint firstAttribute="bottom" secondItem="X0L-SM-Oy6" secondAttribute="bottom" constant="2" id="uf5-yE-V0h"/>
- <constraint firstItem="uQa-0I-JXG" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" constant="-9" id="vz1-Ju-XEr"/>
- </constraints>
- </tableViewCellContentView>
- <connections>
- <outlet property="decorationView" destination="X0L-SM-Oy6" id="hyg-YB-kiu"/>
- <outlet property="translationTextLabel" destination="uQa-0I-JXG" id="E0m-m4-PbH"/>
- </connections>
- </tableViewCell>
- </objects>
-</document>
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.h
deleted file mode 100644
index 75570c5ef..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// TranslationInputTableViewCell.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-@class PhraseTranslation;
-
-@interface TranslationTextTableViewCell : UITableViewCell
-
-
-- (void)setCellWithLanguage:(PhraseTranslation *)translation fromLanguage:(BOOL)fromLanguage;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.m
deleted file mode 100644
index 733c1c344..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextTableViewCell.m
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// TranslationInputTableViewCell.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "TranslationTextTableViewCell.h"
-#import "PhraseTranslation.h"
-#import "Language.h"
-#import "UIColor+TranslationsResults.h"
-
-@interface TranslationTextTableViewCell ()
-
-@property (weak, nonatomic) IBOutlet UILabel *translationTextLabel;
-@property (weak, nonatomic) IBOutlet UIImageView *flagImageView;
-@property (weak, nonatomic) IBOutlet UIView *decorationView;
-
-@end
-
-@implementation TranslationTextTableViewCell
-
-- (void)awakeFromNib {
- self.decorationView.layer.cornerRadius = 5;
- self.decorationView.layer.masksToBounds = YES;
-}
-
-- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
-
- // Configure the view for the selected state
-}
-
-- (void)setCellWithLanguage:(PhraseTranslation *)translation fromLanguage:(BOOL)fromLanguage {
-
- Language *language = fromLanguage ? translation.fromLanguage : translation.toLanguage;
- NSString *text = fromLanguage ? translation.fromText : translation.toText;
-
- NSString *imageName = language.abbreviation;
- [self.flagImageView setImage:[UIImage imageNamed:imageName]];
- self.translationTextLabel.text = text;
- TranslationResult resultColor = fromLanguage ? InputSentence : translation.result;
- self.decorationView.backgroundColor = [UIColor colorForResult: resultColor];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.h
deleted file mode 100644
index ef38e044c..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// TranslationTextViewController.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "SLKTextViewController.h"
-@class Language;
-
-@protocol TranslationTextViewControllerDelegate <NSObject>
-
-- (void)changeLanguageToLanguage:(Language *)laguange isFrom:(BOOL)isFrom;
-
-@end
-
-@interface TranslationTextViewController : SLKTextViewController <TranslationTextViewControllerDelegate>
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.m
deleted file mode 100644
index 9fe67a17b..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslationTextViewController.m
+++ /dev/null
@@ -1,307 +0,0 @@
- //
-// TranslationTextViewController.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "TranslationTextViewController.h"
-
-// Models
-#import "Translator.h"
-#import "Grammar.h"
-#import "Language.h"
-#import "PhraseTranslation.h"
-#import "MorphAnalyser.h"
-#import "TranslatorStore.h"
-#import "NSString+StringToArray.h"
-
-// Views
-#import "TranslationTextTableViewCell.h"
-#import "ArrowsButton.h"
-#import "MenuView.h"
-#import "SLKTextView+TextInputMode.h"
-
-// Grammatical framework
-#import "pgf/pgf.h"
-#import "gu/mem.h"
-#import "gu/exn.h"
-#import "gu/file.h"
-
-// View controllers
-#import "LanguagesViewController.h"
-#import "TranslationOptionsViewController.h"
-#import "WebViewController.h"
-
-@interface TranslationTextViewController ()
-
-@property (nonatomic) Translator *translator;
-@property (nonatomic, strong) NSMutableArray *inputs;
-@property (nonatomic) BOOL isLoadingGrammar;
-@property (nonatomic) UIBarButtonItem *leftLanguageButton;
-@property (nonatomic) UIBarButtonItem *rightLanguageButton;
-
-@end
-
-@implementation TranslationTextViewController
-
-#pragma mark - Getters & setters
-
-- (NSMutableArray *)inputs {
- if (!_inputs) {
- _inputs = [NSMutableArray new];
- }
- return _inputs;
-}
-
-- (void)setIsLoadingGrammar:(BOOL)isLoadingGrammar {
- _isLoadingGrammar = isLoadingGrammar;
-
- self.leftLanguageButton.enabled = !isLoadingGrammar;
- self.rightLanguageButton.enabled = !isLoadingGrammar;
-}
-
-#pragma mark - Initializer
-
-+ (UITableViewStyle)tableViewStyleForCoder:(NSCoder *)decoder {
- return (UITableViewStyleGrouped);
-}
-
-#pragma mark - View lifecycle
-
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- // Setup keyboard
- self.textView.autocapitalizationType = UITextAutocapitalizationTypeNone;
- [self.textInputbar.rightButton setTitle:@"Translate" forState:UIControlStateNormal];
- [self.singleTapGesture addTarget:self action:@selector(didTapTableView:)];
-
- // Register cells
- UINib *nib = [UINib nibWithNibName:@"TranslationInputTableViewCell" bundle:nil];
- [[self tableView] registerNib:nib forCellReuseIdentifier:@"TranslationInput"];
-
- nib = [UINib nibWithNibName:@"TranslationOutputTableViewCell" bundle:nil];
- [[self tableView] registerNib:nib forCellReuseIdentifier:@"TranslationOutput"];
-
- // Setup table view
- self.tableView.estimatedRowHeight = 89;
- self.tableView.rowHeight = UITableViewAutomaticDimension;
- self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
- self.tableView.allowsSelection = YES;
- self.inverted = NO;
-
- // Setup buttons
- ArrowsButton *arrows = [[ArrowsButton alloc] initWithFrame:CGRectMake(0, 0, 50, 30)];
- [arrows addTarget:self action:@selector(switchLanguage:) forControlEvents:UIControlEventTouchUpInside];
- arrows.backgroundColor = [UIColor clearColor];
- UIBarButtonItem *arrowsButton = [[UIBarButtonItem alloc] initWithCustomView:arrows];
-
- self.leftLanguageButton = [[UIBarButtonItem alloc] initWithTitle:@"Loading"
- style:(UIBarButtonItemStylePlain)
- target:self
- action:@selector(changeLanguage:)];
- self.rightLanguageButton = [[UIBarButtonItem alloc] initWithTitle:@"Loading"
- style:(UIBarButtonItemStylePlain)
- target:self
- action:@selector(changeLanguage:)];
-
- self.navigationItem.leftBarButtonItems = @[self.leftLanguageButton, arrowsButton, self.rightLanguageButton];
-
- // Load grammars
- self.isLoadingGrammar = YES;
-
- [TranslatorStore loadTranslatorWithCompletion:^(Translator *translator) {
- self.translator = translator;
-
- self.isLoadingGrammar = NO;
- [self updateButtonTitles];
- [self textDidUpdate:YES];
- self.textView.userDefinedKeyboardLanguage = self.translator.from.language.bcp;
- }];
-}
-
-- (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-
- self.textView.userDefinedKeyboardLanguage = self.translator.from.language.bcp;
-}
-
-
-#pragma mark - Navigation
-
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- [super prepareForSegue:segue sender:sender];
-
- if ([segue.identifier isEqualToString:@"ChangeLanguage"]) {
- UINavigationController *navigationController = segue.destinationViewController;
-
- LanguagesViewController *destinattionController = (LanguagesViewController *)navigationController.topViewController;
- BOOL fromLanguage = sender == self.leftLanguageButton;
-
- destinattionController.currentLanguages = @[self.translator.from.language, self.translator.to.language];
- destinattionController.fromLanguage = fromLanguage;
- destinattionController.delegate = self;
- } else if ([segue.identifier isEqualToString:@"TranslationOptions"]) {
- TranslationOptionsViewController *destinattionController = segue.destinationViewController;
- destinattionController.title = ((Translation *)sender).fromText;
- destinattionController.translation = sender;
- } else if ([segue.identifier isEqualToString:@"Info"]) {
- WebViewController *destinationController = (WebViewController *)segue.destinationViewController;
- NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"help_content" ofType:@"html"];
- NSString* htmlString = [NSString stringWithContentsOfFile:htmlFile encoding:NSUTF8StringEncoding error:nil];
-
- destinationController.htmlToRender = htmlString;
- }
-}
-
-- (void)goToHelp:(id)sender {
- [self performSegueWithIdentifier:@"helpView" sender:nil];
-}
-
-- (void)changeLanguage:(id)sender {
- [self performSegueWithIdentifier:@"ChangeLanguage" sender:sender];
-}
-
-#pragma mark - TranslationTextViewControllerDelegate
-
-- (void)changeLanguageToLanguage:(Language *)laguange isFrom:(BOOL)isFrom {
- UIBarButtonItem *button = isFrom ? self.leftLanguageButton : self.rightLanguageButton;
- button.title = @"loading";
-
- self.isLoadingGrammar = YES;
- [self textDidUpdate:YES];
-
- [self.translator changeLanguageToLanguage:laguange isFrom:isFrom withCompletion:^{
- [self updateButtonTitles];
- self.isLoadingGrammar = NO;
- [self textDidUpdate:YES];
- }];
-}
-
-#pragma mark - SLKTextViewController Events
-
-
-- (BOOL)canPressRightButton {
- // Asks if the right button can be pressed
- if (self.isLoadingGrammar) {
- return NO;
- }
- return [super canPressRightButton];
-}
-
-- (void)didPressRightButton:(id)sender {
-
- // Notifies the view controller when the right button's action has been triggered, manually or by using the keyboard return key.
- // Must call super
-
- NSString *input = self.textView.text;
-
- // If chinese add input to chars
- if ([self.translator.from.language.bcp isEqualToString:@"zh-CN"]) {
- NSArray *array = [input stringToArray];
- input = [array componentsJoinedByString:@" "];
- }
-
- NSInteger wordsCount = [input componentsSeparatedByString:@" "].count;
-
-
- dispatch_async(dispatch_queue_create("Load grammars",NULL), ^{
- Translation *newTranslation = (wordsCount == 1 ? (Translation *)[self.translator analysWord:input] : (Translation *)[self.translator translatePhrase:input]);
-
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.inputs addObject:newTranslation];
- [self.tableView reloadData];
-
- [newTranslation speak];
-
-// [self.tableView slk_scrollToBottomAnimated:YES];
-//
- NSIndexPath *bottomIndexPath = [NSIndexPath indexPathForRow:(self.inputs.count*2)-1 inSection:0];
- [self.tableView scrollToRowAtIndexPath:bottomIndexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
- });
- });
-
-
-
- // This little trick validates any pending auto-correction or auto-spelling just after hitting the 'Send' button
- [self.textView refreshFirstResponder];
- [super didPressRightButton:sender];
-
-
-}
-
-#pragma mark - <UITableViewDataSource>
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return self.inputs.count*2;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
- BOOL input = indexPath.row % 2 == 0;
- NSString *identifier = input ? @"TranslationInput" : @"TranslationOutput";
-
- TranslationTextTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath];
-
- PhraseTranslation *translation = self.inputs[indexPath.row/2];
- [cell setCellWithLanguage:translation fromLanguage:input];
- if (!input && (translation.toTexts.count || translation.sequences.count > 0)) {
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
- cell.selectionStyle = UITableViewCellSelectionStyleDefault;
- } else {
- cell.accessoryType = UITableViewCellAccessoryNone;
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- }
-
- return cell;
-}
-
-#pragma mark - <UITableViewDelegate>
-
-
-// Uncomment this method to handle the cell selection
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- if (self.inputs.count == 0) {
- return;
- }
- if ([tableView isEqual:self.tableView] && indexPath.row % 2 == 1) {
- PhraseTranslation *translation = self.inputs[indexPath.row/2];
- if (translation.toTexts.count > 0 || translation.sequences.count > 0) {
- [self performSegueWithIdentifier:@"TranslationOptions" sender:translation];
- }
- }
- if ([tableView isEqual:self.tableView] && indexPath.row % 2 == 0) {
- PhraseTranslation *translation = self.inputs[indexPath.row/2];
- self.textInputbar.textView.text = translation.fromText;
- }
- [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
-}
-
-#pragma mark - Gesture method
-
-- (void)didTapTableView:(UIGestureRecognizer *)gesture {
- if (![self.textView isFirstResponder]) {
- CGPoint touchLoaction = [gesture locationInView:self.tableView];
- NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:touchLoaction];
- [self.tableView.delegate tableView:self.tableView didSelectRowAtIndexPath:indexPath];
- }
-}
-
-#pragma mark - Private helpers
-
-- (void)updateButtonTitles {
- self.leftLanguageButton.title = self.translator.from.language.name;
- self.rightLanguageButton.title = self.translator.to.language.name;
-}
-
-- (void)switchLanguage:(id)sender {
- [TranslatorStore switchLanguage:self.translator];
-
- [self updateButtonTitles];
- self.textView.userDefinedKeyboardLanguage = self.translator.from.language.bcp;
- [self.textView reloadInputViews];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.h
deleted file mode 100644
index 5085b24c0..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// Translator.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-// Grammitcal framework
-#import "pgf.h"
-
-@class Grammar;
-@class PhraseTranslation;
-@class WordTranslation;
-@class Language;
-
-@interface Translator : NSObject
-
-@property (nonatomic) PgfPGF *pgf;
-@property (nonatomic) GuOut *fileOut;
-@property (nonatomic) GuExn *err;
-@property (nonatomic) GuPool *pool;
-
-@property (nonatomic, strong) Grammar *to;
-@property (nonatomic, strong) Grammar *from;
-@property (nonatomic, strong) Grammar *previous;
-
-- (PhraseTranslation *)translatePhrase:(NSString *)phrase;
-- (WordTranslation *)analysWord:(NSString *)word;
-- (void)changeLanguageToLanguage:(Language *)language isFrom:(BOOL)isFrom withCompletion:(void (^)(void))completion;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.m
deleted file mode 100644
index 0faceab43..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/Translator.m
+++ /dev/null
@@ -1,286 +0,0 @@
-//
-// Translator.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-28.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "Translator.h"
-
-// Model
-#import "Grammar.h"
-#import "PhraseTranslation.h"
-#import "WordTranslation.h"
-#import "MorphAnalyser.h"
-#import "Language.h"
-
-
-// Grammatical Framework
-#import "pgf/literals.h"
-#import "pgf/pgf.h"
-#import "gu/mem.h"
-#import "gu/exn.h"
-#import "gu/file.h"
-
-
-@interface Translator ()
-
-@property (nonatomic, strong) NSArray *sequences;
-
-@end
-
-@implementation Translator
-
-#pragma mark - inits
-
-- (instancetype)init {
- self = [super init];
- if (self) {
-
- NSBundle *bundle = [NSBundle mainBundle];
- NSString *path = [bundle pathForResource:@"App" ofType:@"pgf"];
-
- // Create the pool that is used to allocate everything
- _pool = gu_new_pool();
-
- // Create an exception frame that catches all errors.
- _err = gu_new_exn(_pool);
-
- // Read the PGF grammar.
- _pgf = pgf_read([path UTF8String], _pool, _err);
- }
- return self;
-}
-
-#pragma mark - Public translation method
-
-- (NSString *)getSequance:(NSString *)phrase ep:(PgfExprProb *)ep tmpErr:(GuExn *)tmpErr tmpPool:(GuPool *)tmpPool {
-
-
-
- GuPool* tmp_pool = gu_new_pool();
- GuStringBuf* buf = gu_string_buf(tmp_pool);
- GuOut* outt = gu_string_buf_out(buf);
-
-
-
- // Write out the abstract syntax tree
- gu_printf(outt, self.err, "", [phrase UTF8String]);
- pgf_print_expr(ep->expr, NULL, 0, outt, self.err);
- gu_putc('\n', outt, self.err);
-
- // pgf_linearize(self.to.concrete, html_expr, html_out, err);
- GuString lin = gu_string_buf_freeze(buf, tmp_pool);
-
- NSString *string = [NSString stringWithUTF8String:lin];
- NSLog(@"%@", string);
-
- gu_exn_clear(tmpErr);
- gu_pool_free(tmp_pool);
- tmpPool = nil;
- tmpErr = nil;
-
- return string;
-}
-
-- (PhraseTranslation *)translatePhrase:(NSString *)phrase {
-
- GuPool *tmpPool = gu_new_pool();
- GuExn *tmpErr = gu_new_exn(tmpPool);
-
- PgfExprEnum *parsedExpressions = [self parsePhrase:[phrase stringByAppendingString:@" "] startCat:@"Phr" tmpPool:tmpPool tmpErr:tmpErr];
- NSArray *translatedText = nil;
-
- if (parsedExpressions != nil) {
- translatedText = [self linearizeResult:parsedExpressions tmpPool:tmpPool tmpErr:tmpErr];
- if (translatedText.count == 0) {
- translatedText = @[[self translateByLookUp:phrase]];
- }
- } else {
- translatedText = @[[self translateByLookUp:phrase]];
- }
-
-
-
- PhraseTranslation *translation = [PhraseTranslation translationWithText:phrase
- toText:translatedText.firstObject
- fromLanguage:self.from.language
- toLanguage:self.to.language];
-
- translation.toTexts = translatedText;
- translation.sequences = self.sequences;
-
- if ([translation.toLanguage.bcp isEqualToString:@"th-TH"] ||
- [translation.toLanguage.bcp isEqualToString:@"ja-JP"] ||
- [translation.toLanguage.bcp isEqualToString:@"zh-CN"]) {
-
- NSMutableArray *trimmedArray = @[].mutableCopy;
-
- for (NSString *string in translation.toTexts) {
- NSString *trimmed = [string stringByReplacingOccurrencesOfString:@" " withString:@""];
- [trimmedArray addObject:trimmed];
- }
- NSString *trimmed = [translation.toText stringByReplacingOccurrencesOfString:@" " withString:@""];
-
- translation.toText = trimmed;
- translation.toTexts = trimmedArray.copy;
- }
-
- return translation;
-}
-
-- (WordTranslation *)analysWord:(NSString *)word; {
-
- MorphAnalyser *analyser = [[MorphAnalyser alloc] initWithPgf:self.pgf err:self.err to:self.to from:self.from];
- [analyser analysWord:word];
-
- WordTranslation *translation = [WordTranslation translationWithText:word
- toText:analyser.bestTranslation
- fromLanguage:self.from.language
- toLanguage:self.to.language];
-
- translation.toTexts = analyser.analysedWords;
- translation.html = analyser.html;
-
- return translation;
-}
-
-#pragma mark - Private helpers
-
-- (NSString *)translateByLookUp:(NSString *)phrase {
- NSMutableString *translation = @"%".mutableCopy;
- NSArray *words = [phrase componentsSeparatedByString:@" "];
-
- for (NSString *word in words) {
- NSString *translatedWord = [self translateWord:word];
- [translation appendString: translatedWord ? [NSString stringWithFormat:@" %@", translatedWord] : [NSString stringWithFormat:@" %@", word]];
- }
- return translation.copy;
-}
-
-- (NSString *)translateWord:(NSString *)word {
- GuPool *tmpPool = gu_new_pool();
- GuExn *tmpErr = gu_new_exn(tmpPool);
-
- PgfExprEnum *parse = [self parsePhrase:word startCat:@"Chunk" tmpPool:tmpPool tmpErr: tmpErr];
- NSString *translation = @"";
-
- if (parse) {
- NSArray *results = [self linearizeResult:parse tmpPool:tmpPool tmpErr:tmpErr];
-
- if (results.count) {
- translation = results.firstObject;
- } else {
- translation = [self translateByLookUp:word];
- }
- } else {
- MorphAnalyser *analyser = [[MorphAnalyser alloc] initWithPgf:self.pgf err:self.err to:self.to from:self.from];
- [analyser analysWord:word];
- translation = analyser.bestTranslation;
- }
-
- // Clear up resources
- gu_exn_clear(tmpErr);
- gu_pool_free(tmpPool);
- tmpPool = nil;
- tmpErr = nil;
-
- return translation;
-}
-
-- (PgfExprEnum *)parsePhrase:(NSString *)phrase startCat:(NSString *)startCat tmpPool:(GuPool *)tmpPool tmpErr:(GuExn *)tmpErr {
-
- PgfCallbacksMap* callbacks =
- pgf_new_callbacks_map(self.from.concrete, tmpPool);
- pgf_callbacks_map_add_literal(self.from.concrete, callbacks,
- "PN", &pgf_nerc_literal_callback);
-
- pgf_callbacks_map_add_literal(self.from.concrete, callbacks,
- "Symb", &pgf_unknown_literal_callback);
-
- PgfExprEnum *result = pgf_parse_with_heuristics(self.from.concrete, "Phr", [phrase UTF8String],
- -1, callbacks,
- tmpErr, tmpPool, tmpPool);
-
-
-
-// PgfExprEnum *result = pgf_parse(self.from.concrete, [startCat UTF8String], [phrase UTF8String], tmpErr, tmpPool, tmpPool);
- return gu_ok(tmpErr) ? result : nil;
-}
-
--(NSArray *)linearizeResult:(PgfExprEnum *)result tmpPool:(GuPool *)tmpPool tmpErr:(GuExn *)tmpErr {
-
- NSMutableArray *translations = [NSMutableArray new];
- NSMutableArray *sequences = [NSMutableArray new];
-
- PgfExprProb *ep;
- gu_enum_next(result, &ep, tmpPool);
-
-
- // If null reutrun empty array
- if (!ep) {
- return @[];
- }
-
- for (int i = 0; i <= 10 && ep != nil; i++) {
- PgfExprProb parse = ep[0];
-
- // Get translation
- GuStringBuf *stringBuff = gu_string_buf(tmpPool);
- GuOut *tmpOut = gu_string_buf_out(stringBuff);
- pgf_linearize(self.to.concrete, parse.expr, tmpOut, tmpErr);
-
- // Get sequence
- GuString lin = gu_string_buf_freeze(stringBuff, tmpPool);
- NSString *phrase = [NSString stringWithUTF8String:lin];
-
- NSString *translated = [NSString stringWithUTF8String:gu_string_buf_freeze(stringBuff, tmpPool)];
-
- NSInteger resultIndex = [translations indexOfObjectPassingTest:^BOOL(NSString *str, NSUInteger idx, BOOL *stop) {
- return [str isEqualToString:translated];
- }];
-
- if (resultIndex == NSNotFound) {
- [translations addObject:translated];
- [sequences addObject:[self getSequance:phrase ep:ep tmpErr:tmpErr tmpPool:tmpPool]];
- }
-
- gu_out_flush(tmpOut, tmpErr);
- tmpOut = nil;
-
- gu_enum_next(result, &ep, tmpPool);
- }
- self.sequences = [sequences copy];
-
- return [translations copy];
-}
-
-- (void)changeLanguageToLanguage:(Language *)language isFrom:(BOOL)isFrom withCompletion:(void (^)(void))completion {
-
- dispatch_async(dispatch_queue_create("Load grammars",NULL), ^{
- if ([self.previous.language isEqualToLanguage:language]) {
- Grammar *temp = isFrom ? self.from : self.to;
- if (isFrom) {
- self.from = self.previous;
- } else {
- self.to = self.previous;
- }
- self.previous = temp;
- } else {
- self.previous = isFrom ? self.from : self.to;
- if (isFrom) {
- self.from = [Grammar loadGrammarFromLanguage:language withTranslator:self];
- } else {
- self.to = [Grammar loadGrammarFromLanguage:language withTranslator:self];
- }
- }
-
- dispatch_async(dispatch_get_main_queue(), ^{
- completion();
- });
- });
-}
-
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.h
deleted file mode 100644
index ede27a291..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// TranslatorStore.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-22.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class Translator;
-
-@interface TranslatorStore : NSObject
-
-/**
- * Loads a translator with the last saved grammars on a background thread, if can't find anyone it loads defaults grammars wich are
- * Swedish -> English.
- *
- * @param completion A completion block with the loaded grammars
- */
-+ (void)loadTranslatorWithCompletion:(void (^)(Translator *translator))completion;
-
-/**
- * Saves the current grammars names to NSUserDefaults.
- *
- * @param translator The translator that contains the current grammars.
- */
-+ (void)saveCurrentGrammarsFromTranslator:(Translator *)translator;
-
-+ (void)switchLanguage:(Translator *)translator;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.m
deleted file mode 100644
index 18c1e8cc0..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/TranslatorStore.m
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// TranslatorStore.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-22.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "TranslatorStore.h"
-#import "AppDelegate.h"
-
-// Model
-#import "Translator.h"
-#import "Language.h"
-#include "Grammar.h"
-
-@implementation TranslatorStore
-
-+ (void)loadTranslatorWithCompletion:(void (^)(Translator *translator))completion {
-
- // Load grammars strings from NSUserDefaults
- NSString *fromLanguageString = [[NSUserDefaults standardUserDefaults] stringForKey:@"FromLanguage"];
- NSString *fromAbbreviationString = [[NSUserDefaults standardUserDefaults] stringForKey:@"FromAbbreviation"];
- NSString *fromBCPString = [[NSUserDefaults standardUserDefaults] stringForKey:@"FromBCP"];
-
- NSString *toLanguageString = [[NSUserDefaults standardUserDefaults] stringForKey:@"toLanguage"];
- NSString *toAbbreviationString = [[NSUserDefaults standardUserDefaults] stringForKey:@"toAbbreviation"];
- NSString *toBCPString = [[NSUserDefaults standardUserDefaults] stringForKey:@"toBCP"];
-
- if (!fromLanguageString) {
- fromLanguageString = @"Swedish";
- fromAbbreviationString = @"Swe";
- fromBCPString = @"sv-SE";
-
- toLanguageString = @"English";
- toAbbreviationString = @"Eng";
- toBCPString = @"en-GB";
- }
-
- // Setup translator
- Language *fromLanguage = [[Language alloc] initWithName:fromLanguageString abbreviation:fromAbbreviationString bcp:fromBCPString];
- Language *toLanguage = [[Language alloc] initWithName:toLanguageString abbreviation:toAbbreviationString bcp:toBCPString];
- __block Translator *translator = [[Translator alloc] init];
-
- dispatch_async(dispatch_queue_create("Load grammars",NULL), ^{
- translator.from = [Grammar loadGrammarFromLanguage:fromLanguage withTranslator:translator];
- translator.to = [Grammar loadGrammarFromLanguage:toLanguage withTranslator:translator];
-
- AppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
- appDelegate.translator = translator;
-
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(translator);
- });
- });
-}
-
-+ (void)saveCurrentGrammarsFromTranslator:(Translator *)translator {
-
-
- [[NSUserDefaults standardUserDefaults] setObject:translator.from.language.name forKey:@"FromLanguage"];
- [[NSUserDefaults standardUserDefaults] setObject:translator.from.language.abbreviation forKey:@"FromAbbreviation"];
- [[NSUserDefaults standardUserDefaults] setObject:translator.from.language.bcp forKey:@"FromBCP"];
-
- [[NSUserDefaults standardUserDefaults] setObject:translator.to.language.name forKey:@"toLanguage"];
- [[NSUserDefaults standardUserDefaults] setObject:translator.to.language.abbreviation forKey:@"toAbbreviation"];
- [[NSUserDefaults standardUserDefaults] setObject:translator.to.language.bcp forKey:@"toBCP"];
-
- [[NSUserDefaults standardUserDefaults] synchronize];
-}
-
-+ (void)switchLanguage:(Translator *)translator {
-
- Grammar *temp = translator.from;
- translator.from = translator.to;
- translator.to = temp;
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.h
deleted file mode 100644
index cbdb33372..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-// UIColor+TranslationsResults.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-04.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "PhraseTranslation.h"
-
-@interface UIColor (TranslationsResults)
-
-+ (UIColor *)colorForResult:(TranslationResult)result;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.m
deleted file mode 100644
index ea3026afc..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UIColor+TranslationsResults.m
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// UIColor+TranslationsResults.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-04.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "UIColor+TranslationsResults.h"
-
-@implementation UIColor (TranslationsResults)
-
-+ (UIColor *)colorFromHexString:(NSString *)hexString {
- unsigned rgbValue = 0;
- NSScanner *scanner = [NSScanner scannerWithString:hexString];
- [scanner setScanLocation:1]; // bypass '#' character
- [scanner scanHexInt:&rgbValue];
- return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0];
-}
-
-+ (UIColor *)colorForResult:(TranslationResult)result {
- switch (result) {
- case BestResult:
- return [UIColor bestResultColor];
- case WorstResult:
- return [UIColor worstResultColor];
- case ParseByChunksResult:
- return [UIColor parseByChunksResultColor];
- case InputSentence:
- return [UIColor inputSentenceColor];
- default:
- return [UIColor defaultResultColor];
- }
-}
-
-+ (UIColor *)worstResultColor {
- return [UIColor colorFromHexString:@"#FF303e"];
-}
-
-+ (UIColor *)defaultResultColor {
- return [UIColor colorFromHexString:@"#FFFF99"];
-}
-
-
-+ (UIColor *)parseByChunksResultColor {
- return [UIColor colorFromHexString:@"#FFB2A5"];
-}
-
-+ (UIColor *)bestResultColor {
- return [UIColor colorFromHexString:@"#75CD75"];
-}
-
-+ (UIColor *)inputSentenceColor {
- return [UIColor colorFromHexString:@"#CDCDED"];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.h
deleted file mode 100644
index 2ee3763a6..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// UITableViewCell+Customize.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-11.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface UITableViewCell (Customize)
-
-- (void)sizeImageViewToSize:(CGSize)size;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.m
deleted file mode 100644
index 28e86eb9a..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/UITableViewCell+Customize.m
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// UITableViewCell+Customize.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-11.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "UITableViewCell+Customize.h"
-
-@implementation UITableViewCell (Customize)
-
-- (void)sizeImageViewToSize:(CGSize)size {
-
- UIGraphicsBeginImageContextWithOptions(size, NO, UIScreen.mainScreen.scale);
- CGRect imageRect = CGRectMake(0.0, 0.0, size.width, size.height);
- [self.imageView.image drawInRect:imageRect];
- self.imageView.image = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.h
deleted file mode 100644
index 18c05ae07..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.h
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// WebViewController.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-25.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface WebViewController : UIViewController
-@property (nonatomic, strong) NSString *htmlToRender;
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.m
deleted file mode 100644
index 0ea5eee4d..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WebViewController.m
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// WebViewController.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-05-25.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "WebViewController.h"
-#import "MorphAnalyser.h"
-
-
-@interface WebViewController ()
-@property (weak, nonatomic) IBOutlet UIWebView *webView;
-
-@end
-
-@implementation WebViewController
-
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self.webView loadHTMLString:self.htmlToRender baseURL:nil];
-}
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.h b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.h
deleted file mode 100644
index 7abb76370..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// WordTranslation.h
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-03.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "Translation.h"
-
-
-@interface WordTranslation : Translation
-
-@property (nonatomic, strong) NSArray *html;
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.m
deleted file mode 100644
index 4a207e967..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/WordTranslation.m
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// WordTranslation.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-06-03.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import "WordTranslation.h"
-
-@implementation WordTranslation
-
-@end
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/help_content.html b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/help_content.html
deleted file mode 100644
index 446df43bb..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/help_content.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<html>
-<body>
-</p>
-<b>GF Offline Translator</b>:
-text and speech translation for 14 languages with
-quality control
-</p>
-<p>
-<b>Speech input </b>: Tap microphone icon if available on the keyboard.
-<br>
-<b>Text input </b>: Select the text box at the bottom on the screen.
-<br>
-<b>Correction </b>: Tap input text to copy it to the text box.
-<br>
-<b>Alternatives </b>: Tap output text.
-<br>
-<b>Grammar info </b>: Tap any of the alternatives.
-<br>
-<b>Confidence </b>: colour of output text
-<ul>
-<li> <span style="background-color:palegreen">Green </span>: semantic, probably correct (but has alternatives) </li>
-<li> <span style="background-color:yellow">Yellow </span>: syntactic, often incorrect (has alternatives) </li>
-<li> <span style="background-color:pink">Light red </span>: chunk-based, probably incorrect (has alternatives) </li>
-<li> <span style="background-color:red">Dark red </span>: word-based, often very bad </li>
-</ul>
-</p>
-
-<hr>
-
-<h2>More details</h2>
-<p>
-GF Offline Translator is based on grammar and semantics. It is compact in size
-and gives control on quality. Its technology is inspired by compilers, which are
-programs that translate computer languages.
-Most other translators for human language are based on
-statistics and have less control of quality and are much bigger, so that
-they require either an internet connection or a huge storage on your phone.
-</p>
-The app indicates translation confidence with colours:
-<ul>
- <li><b>Green</b>:
- semantic translation, should be correct.
- But not necessarily the only correct one.
- You can tap the output to see alternatives.
- </li>
- <li><b>Yellow</b>:
- syntactic translation, should be grammatically correct.
- But can be very strange in its interpretation and choice of words.
- </li>
- <li><b>Light red</b>:
- chunk translation, probably incorrect.
- Builds the translation from small pieces.
- </li>
- <li><b>Dark red</b>:
- word-by-word translation, almost certainly incorrect.
- Builds the translation word by word.
- </li>
-</ul>
-The green translations come from a tourist phrasebook, which allows
-you to translate things like "hello" and "how far is the airport from
-the hotel".
-</p>
-
-<p>
-Translation works between any supported languages, which means 182
-language pairs in the current version. But different languages are on different levels of development.
-The following table gives a rough idea of what to expect:
-</p>
-
-<p>
-<center>
-<table rules=all border=yes>
-<tr> <th></th> <th>coverage</th> <th>quality</th> <th>speed</th></tr>
-<tr> <th>Bulgarian</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=palegreen></td> </tr>
-<tr> <th>Catalan</th> <td bgcolor=pink></td> <td bgcolor=yellow></td> <td bgcolor=pink></td> </tr>
-<tr> <th>Chinese</th> <td bgcolor=pink></td> <td bgcolor=pink></td> <td bgcolor=palegreen></td> </tr>
-<tr> <th>Dutch</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=yellow></td> </tr>
-<tr> <th>English</th> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> </tr>
-<tr> <th>Finnish</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=pink></td> </tr>
-<tr> <th>French</th> <td bgcolor=pink></td> <td bgcolor=yellow></td> <td bgcolor=pink></td> </tr>
-<tr> <th>German</th> <td bgcolor=pink></td> <td bgcolor=yellow></td> <td bgcolor=pink></td> </tr>
-<tr> <th>Hindi</th> <td bgcolor=pink></td> <td bgcolor=red></td> <td bgcolor=yellow></td> </tr>
-<tr> <th>Italian</th> <td bgcolor=pink></td> <td bgcolor=pink></td> <td bgcolor=pink></td> </tr>
-<tr> <th>Japanese</th> <td bgcolor=pink></td> <td bgcolor=pink></td> <td bgcolor=yellow></td> </tr>
-<tr> <th>Spanish</th> <td bgcolor=pink></td> <td bgcolor=yellow></td> <td bgcolor=pink></td> </tr>
-<tr> <th>Swedish</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=palegreen></td> </tr>
-<tr> <th>Thai</th> <td bgcolor=pink></td> <td bgcolor=red></td> <td bgcolor=yellow></td> </tr>
-</table>
-</center>
-<br>
-For <b>Japanse</b> and <b>Thai</b> input, words must be separated with spaces.
-</p>
-
-<p>
-When you tap on a translation you get a screen with <b>alternative translations</b>.
-Tapping on each of the alternatives
-gives you <b>grammatical information</b>:
-an inflection table, if it is a single word,
-and a syntax tree otherwise.
-</p>
-
-<p>
-To make it easier to input what you want to translate it is recommended to add that language keyboard in your settings on your iOS device.
-You can add keyboards from Settings > General > Keyboard > Keyboards.
-
-If more than one language is added, you can change the language while typing. Follow these steps to change the language of your keyboard once you’ve added it:
- <li>Tap the globe icon in the lower left corner to choose the next language on your keyboard. The chosen language appears on the Space bar. </li>
- <li>Touch and hold the globe icon in the lower left to display a menu of enabled keyboards. Drag to choose a new keyboard. </li>
-</p>
-
-<p>
-The translation works <b>completely off-line</b>, without
-internet connection, when doing text-based translation.
-Speech input needs an connection to work.
-</p>
-
-<p>
-The GF Offline Translator is powered by
-<a href="http://www.grammaticalframework.org/">GF</a>, Grammatical Framework.
-It is open-source software,
-built by support from the GF community and from <a href="http://www.digitalgrammars.com/">Digital Grammars</a>.
-</p>
-
-<p>
-<i>Digital Grammars is a company that can tailor this app to you needs and provide good
-translation for the kind of vocabulary you need. Just tell us what you want to see
- in the green area!</i>
-</p>
-
-</body>
-</html>
diff --git a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/main.m b/src/ui/ios/GF-Offline-Translator/GF Offline Translator/main.m
deleted file mode 100644
index c1018b339..000000000
--- a/src/ui/ios/GF-Offline-Translator/GF Offline Translator/main.m
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-// main.m
-// GF Offline Translator
-//
-// Created by Cenny Davidsson on 2015-04-27.
-// Copyright (c) 2015 Grammatical Framework. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "AppDelegate.h"
-
-int main(int argc, char * argv[]) {
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
-}