Skip to content

Commit

Permalink
update status string
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleduo committed Jul 12, 2016
1 parent 76f9d9e commit a77b4e7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
10 changes: 9 additions & 1 deletion source/tinypng4mac/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@

"Later" = "Later";

"Register" = "Register";
"Register" = "Register";

"Initialed" = "Initialed";
"Prepared" = "Prepared";
"Uploading" = "Uploading";
"Processing" = "Processing";
"Downloading" = "Downloading";
"Finish" = "Finish";
"ERROR" = "ERROR";
2 changes: 1 addition & 1 deletion source/tinypng4mac/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="box" id="X7r-Gl-0hN"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IX1-JP-bbZ">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" alphaValue="0.40000000000000002" translatesAutoresizingMaskIntoConstraints="NO" id="IX1-JP-bbZ">
<rect key="frame" x="99" y="180" width="123" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Drag .PNGs here!" id="cXq-XC-8Ss">
<font key="font" metaFont="systemBold" size="14"/>
Expand Down
4 changes: 4 additions & 0 deletions source/tinypng4mac/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class MainViewController: NSViewController, NSOpenSavePanelDelegate, NSTableView
@objc func resetConfiguration(notification: NSNotification) {
TPClient.sApiKey = ""
apiKey.stringValue = ""
apiKey.editable = true
keySaved = false
changePanel(true, animated: true)
}
Expand Down Expand Up @@ -227,6 +228,9 @@ class MainViewController: NSViewController, NSOpenSavePanelDelegate, NSTableView
if newKey != TPClient.sApiKey {
print("newKey: " + newKey)
saveApiKey(newKey)
if TPClient.sOutputPath != "" {
self.changePanel(false, animated: true)
}
}
}
} else if obj.object === self.outputPathField {
Expand Down
14 changes: 7 additions & 7 deletions source/tinypng4mac/views/TaskTableCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ class TaskTableCell: NSTableCellView {
var progress = 0
switch taskStatus {
case .INITIAL:
statusText = "initialed"
statusText = NSLocalizedString("Initialed", comment: "Initialed")
progress = 1
case .PREPARE:
statusText = "Prepared"
statusText = NSLocalizedString("Prepared", comment: "Prepared")
progress = 2
case .UPLOADING:
statusText = "Uploading"
statusText = NSLocalizedString("Uploading", comment: "Uploading")
progress = 3
case .PROCESSING:
statusText = "Processing"
statusText = NSLocalizedString("Processing", comment: "Processing")
progress = 4
case .DOWNLOADING:
statusText = "Downloading"
statusText = NSLocalizedString("Downloading", comment: "Downloading")
progress = 5
case .FINISH:
statusText = "Finish"
statusText = NSLocalizedString("Finish", comment: "Finish")
progress = 6
case .ERROR:
statusText = "ERROR"
statusText = NSLocalizedString("ERROR", comment: "ERROR")
}

if taskStatus == .FINISH {
Expand Down
10 changes: 9 additions & 1 deletion source/tinypng4mac/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@

"Later" = "稍后";

"Register" = "注册";
"Register" = "注册";

"Initialed" = "初始化";
"Prepared" = "准备中";
"Uploading" = "上传中";
"Processing" = "处理中";
"Downloading" = "下载中";
"Finish" = "完成";
"ERROR" = "错误";

0 comments on commit a77b4e7

Please sign in to comment.