Skip to content

Commit

Permalink
Fix to use overrides in LipikaApp Literator UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Atreya Ranganath committed Jun 17, 2021
1 parent 334f646 commit 60c9b7b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Application/LiteratorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,16 @@ class LiteratorModel: ObservableObject {
return self.ante!.anteliterate(lit.finalaizedOutput + lit.unfinalaizedOutput)
}
case (0, 1):
self.trans = try! self.factory.transliterator(schemeName: self.fromScheme, scriptName: self.toScript)
let override: [String: MappingValue]? = MappingStore.read(schemeName: self.fromScheme, scriptName: self.toScript)
self.trans = try! self.factory.transliterator(schemeName: self.fromScheme, scriptName: self.toScript, mappings: override)
eval = { (input: String) -> String in
_ = self.trans!.reset()
let lit = self.trans!.transliterate(input)
return lit.finalaizedOutput + lit.unfinalaizedOutput
}
case (1, 0):
self.ante = try! self.factory.anteliterator(schemeName: self.toScheme, scriptName: self.fromScript)
let override: [String: MappingValue]? = MappingStore.read(schemeName: self.toScheme, scriptName: self.fromScript)
self.ante = try! self.factory.anteliterator(schemeName: self.toScheme, scriptName: self.fromScript, mappings: override)
eval = { (input: String) -> String in
return self.ante!.anteliterate(input)
}
Expand Down
8 changes: 4 additions & 4 deletions Installation/LipikaIME.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,16 @@
<key>POSTINSTALL_PATH</key>
<dict>
<key>PATH</key>
<string>/Users/ratreya/workplace/lipika-ime/Installation/Scripts/postinstall</string>
<string>Scripts/postinstall</string>
<key>PATH_TYPE</key>
<integer>0</integer>
<integer>1</integer>
</dict>
<key>PREINSTALL_PATH</key>
<dict>
<key>PATH</key>
<string>/Users/ratreya/workplace/lipika-ime/Installation/Scripts/preinstall</string>
<string>Scripts/preinstall</string>
<key>PATH_TYPE</key>
<integer>0</integer>
<integer>1</integer>
</dict>
<key>RESOURCES</key>
<array>
Expand Down
8 changes: 5 additions & 3 deletions LipikaIME.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0940;
LastUpgradeCheck = 1140;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = Daivajnanam;
TargetAttributes = {
A5122A4620D429D300575848 = {
Expand Down Expand Up @@ -405,14 +405,14 @@
/* Begin PBXShellScriptBuildPhase section */
A5122A5520D43EE200575848 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 12;
buildActionMask = 8;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "set -ex\n${TARGET_BUILD_DIR}/Installer --remove\nif ! killall LipikaIME; then\n echo \"note: no LipikaIME process to kill\"\nfi\nrm -rf /Library/Input\\ Methods/LipikaIME.app\ncp -r ${TARGET_BUILD_DIR}/LipikaIME.app /Library/Input\\ Methods/\nopen /Library/Input\\ Methods/LipikaIME.app\n${TARGET_BUILD_DIR}/Installer --enable\n";
};
Expand Down Expand Up @@ -538,6 +538,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -603,6 +604,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down

0 comments on commit 60c9b7b

Please sign in to comment.