Skip to content

Commit

Permalink
Add Chinese Traditionnal
Browse files Browse the repository at this point in the history
  • Loading branch information
glouel committed Jul 15, 2019
1 parent 0e27add commit cd10187
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 19 deletions.
8 changes: 8 additions & 0 deletions Aerial.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
03D3DAC5221F286D00BDA52F /* pl.json in Resources */ = {isa = PBXBuildFile; fileRef = 03D3DAC3221F286700BDA52F /* pl.json */; };
03DAD470229EAC66000DA6D1 /* Installation.md in Resources */ = {isa = PBXBuildFile; fileRef = 03DAD46F229EAC66000DA6D1 /* Installation.md */; };
03DAD473229EC031000DA6D1 /* Readme.md in Resources */ = {isa = PBXBuildFile; fileRef = 03DAD472229EC031000DA6D1 /* Readme.md */; };
03E4B20D22DC7F8800C22EBE /* zh_TW.json in Resources */ = {isa = PBXBuildFile; fileRef = 03E4B20C22DC7F8700C22EBE /* zh_TW.json */; };
03E4B20E22DC7FE200C22EBE /* zh_TW.json in Resources */ = {isa = PBXBuildFile; fileRef = 03E4B20C22DC7F8700C22EBE /* zh_TW.json */; };
03E4B20F22DC7FE600C22EBE /* zh_TW.json in Resources */ = {isa = PBXBuildFile; fileRef = 03E4B20C22DC7F8700C22EBE /* zh_TW.json */; };
03E8730C2165013C002B469B /* DownloadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E8730B2165013C002B469B /* DownloadManager.swift */; };
03E8730F216501ED002B469B /* AsynchronousOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E8730E216501ED002B469B /* AsynchronousOperation.swift */; };
03E8731021662AEB002B469B /* DownloadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E8730B2165013C002B469B /* DownloadManager.swift */; };
Expand Down Expand Up @@ -207,6 +210,7 @@
03DAD475229EC544000DA6D1 /* HardwareDecoding.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = HardwareDecoding.md; sourceTree = "<group>"; };
03DAD476229EC64D000DA6D1 /* Troubleshooting.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Troubleshooting.md; sourceTree = "<group>"; };
03DAD477229ECAAA000DA6D1 /* CustomVideos.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CustomVideos.md; sourceTree = "<group>"; };
03E4B20C22DC7F8700C22EBE /* zh_TW.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = zh_TW.json; sourceTree = "<group>"; };
03E8730B2165013C002B469B /* DownloadManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadManager.swift; sourceTree = "<group>"; };
03E8730E216501ED002B469B /* AsynchronousOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsynchronousOperation.swift; sourceTree = "<group>"; };
03E8731221675FE0002B469B /* TimeManagement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeManagement.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -282,6 +286,7 @@
033192DF217B77E90073B580 /* Community */ = {
isa = PBXGroup;
children = (
03E4B20C22DC7F8700C22EBE /* zh_TW.json */,
038EBE9322D0AA3D00C7AD02 /* nl.json */,
036A34B4227309FB00A49135 /* zh_CN.json */,
035A92AB226754760095AB85 /* ar.json */,
Expand Down Expand Up @@ -677,6 +682,7 @@
03D1E79222848F7F00D10CF7 /* screen2.jpg in Resources */,
FAC36F4A1BE1756D007F2A20 /* MainMenu.xib in Resources */,
FAC36F501BE1756D007F2A20 /* icon-night.pdf in Resources */,
03E4B20E22DC7FE200C22EBE /* zh_TW.json in Resources */,
035A92A9225F8C480095AB85 /* he.json in Resources */,
035A92A7225F8C480095AB85 /* de.json in Resources */,
0395835421807D1F008E8F9C /* [email protected] in Resources */,
Expand All @@ -691,6 +697,7 @@
files = (
03D1E79322848F7F00D10CF7 /* screen2.jpg in Resources */,
036A34B722730A0700A49135 /* zh_CN.json in Resources */,
03E4B20F22DC7FE600C22EBE /* zh_TW.json in Resources */,
033D62B1216CAE2C00F3AF83 /* icon-night-dark.pdf in Resources */,
03D1E79622848F7F00D10CF7 /* screen1.jpg in Resources */,
03D1E79922848F7F00D10CF7 /* screen0.jpg in Resources */,
Expand Down Expand Up @@ -720,6 +727,7 @@
038EBE9422D0AA3D00C7AD02 /* nl.json in Resources */,
033D62AF216CAE2C00F3AF83 /* icon-night-dark.pdf in Resources */,
0369985D2196103300E359D3 /* missingvideos.json in Resources */,
03E4B20D22DC7F8800C22EBE /* zh_TW.json in Resources */,
FAC36F4F1BE1756D007F2A20 /* icon-night.pdf in Resources */,
0313F9E622942AA500B074BB /* CustomVideos.xib in Resources */,
033192E1217B78240073B580 /* en.json in Resources */,
Expand Down
34 changes: 20 additions & 14 deletions Aerial/Source/Models/Cache/PoiStringProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,52 +224,58 @@ final class PoiStringProvider {
}

// Helpers for the main popup
// swiftlint:disable:next cyclomatic_complexity
func getLanguagePosition() -> Int {
let preferences = Preferences.sharedInstance
// The list is alphabetized based on their english name in the UI
switch preferences.ciOverrideLanguage {
case "ar": // Arabic
return 1
case "zh_CN": // English
case "zh_CN": // Chinese Simplified
return 2
case "nl": // Dutch
case "zh_TW": // Chinese Traditional
return 3
case "en": // English
case "nl": // Dutch
return 4
case "fr": // French
case "en": // English
return 5
case "de": // German
case "fr": // French
return 6
case "he": // Hebrew
case "de": // German
return 7
case "pl": // Polish
case "he": // Hebrew
return 8
case "es": // Spanish
case "pl": // Polish
return 9
case "es": // Spanish
return 10
default: // This is the default, preferred language
return 0
}
}

// swiftlint:disable:next cyclomatic_complexity
func getLanguageStringFromPosition(pos: Int) -> String {
switch pos {
case 1:
return "ar"
case 2:
return "zh_CN"
case 3:
return "nl"
return "zh_TW"
case 4:
return "en"
return "nl"
case 5:
return "fr"
return "en"
case 6:
return "de"
return "fr"
case 7:
return "he"
return "de"
case 8:
return "pl"
return "he"
case 9:
return "pl"
case 10:
return "es"
default:
return ""
Expand Down
13 changes: 8 additions & 5 deletions Resources/PreferencesWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ is disabled
</view>
</tabViewItem>
<tabViewItem label="Text" identifier="" id="bPY-uP-DGa">
<view key="view" ambiguous="YES" id="M1m-ud-C95">
<view key="view" id="M1m-ud-C95">
<rect key="frame" x="10" y="33" width="614" height="381"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -1129,6 +1129,9 @@ should appear</string>
<menuItem title="Chinese Simplified" id="TGo-cK-qCu">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="Chinese Traditional" id="KHw-BR-2Mk">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="Dutch" id="aO2-Av-7xe">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
Expand Down Expand Up @@ -1177,7 +1180,7 @@ should appear</string>
</view>
</tabViewItem>
<tabViewItem label="Time" identifier="" id="PtY-yV-jgj">
<view key="view" id="ziy-Hg-uzO">
<view key="view" ambiguous="YES" id="ziy-Hg-uzO">
<rect key="frame" x="10" y="33" width="614" height="381"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -2808,7 +2811,7 @@ Gw
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fx9-wP-BAV">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" preferredMaxLayoutWidth="499" translatesAutoresizingMaskIntoConstraints="NO" id="fx9-wP-BAV">
<rect key="frame" x="74" y="281" width="503" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" alignment="justified" title="With macOS Catalina, Aerial has limited access (read only) to your local disk and now lives in a sandbox. " id="N0S-xL-ig4">
Expand All @@ -2822,7 +2825,7 @@ Gw
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSCaution" id="Xv7-LA-jpF"/>
</imageView>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="asM-kR-rgt">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="555" translatesAutoresizingMaskIntoConstraints="NO" id="asM-kR-rgt">
<rect key="frame" x="18" y="43" width="559" height="90"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" selectable="YES" alignment="justified" id="JiG-Ah-D6O">
Expand All @@ -2835,7 +2838,7 @@ After changing the folder, please close System Preferences for this to be taken
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aI8-Vj-v9Y">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="553" translatesAutoresizingMaskIntoConstraints="NO" id="aI8-Vj-v9Y">
<rect key="frame" x="19" y="180" width="557" height="93"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" selectable="YES" alignment="justified" id="3kv-uO-49e">
Expand Down

0 comments on commit cd10187

Please sign in to comment.