Made some strings localisable.
This commit is contained in:
1 parent
fbb7392ccc
commit
4ea4fa3d19
7 files changed
+87
-93
No files matched your search
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11535.1" systemVersion="16B2553a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11535.1"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11542"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -80,7 +80,7 @@
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<menu key="menu" title="OtherViews" id="uZy-Zq-VUz">
|
||||
<items>
|
||||
<menuItem title="None" state="on" id="QBa-Jt-TO2"/>
|
||||
<menuItem title="None" state="on" id="QBa-Jt-TO2" userLabel="Alternate group"/>
|
||||
<menuItem title="1" tag="1" id="mXc-eW-usD"/>
|
||||
<menuItem title="2" tag="2" id="xjR-b6-VG2"/>
|
||||
<menuItem title="3" tag="3" id="1xu-y0-sPc"/>
|
||||
@@ -105,7 +105,7 @@
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<menu key="menu" title="OtherViews" id="QUX-Wz-JDa">
|
||||
<items>
|
||||
<menuItem title="None" state="on" id="Qdb-gu-B3h"/>
|
||||
<menuItem title="None" state="on" id="Qdb-gu-B3h" userLabel="Fallback"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
|
||||
+2
-2
@@ -133,7 +133,7 @@ NSString *SBQueueCancelledNotification = @"SBQueueCancelledNotification";
|
||||
}
|
||||
|
||||
- (NSArray<SBQueueItem *> *)itemsAtIndexes:(NSIndexSet *)indexes {
|
||||
__block NSArray<SBQueueItem *> * items;
|
||||
__block NSArray<SBQueueItem *> *items;
|
||||
dispatch_sync(self.arrayQueue, ^{
|
||||
items = [self.items objectsAtIndexes:indexes];
|
||||
});
|
||||
@@ -308,7 +308,7 @@ NSString *SBQueueCancelledNotification = @"SBQueueCancelledNotification";
|
||||
if (!itemDescription) {
|
||||
itemDescription = NSLocalizedString(@"Working", @"Queue Working.");
|
||||
}
|
||||
NSString *info = [NSString stringWithFormat:@"%@, item %ld.", itemDescription, (long)self.currentIndex + 1];
|
||||
NSString *info = [NSString stringWithFormat:NSLocalizedString(@"%@, item %ld.", nil), itemDescription, (long)self.currentIndex + 1];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SBQueueWorkingNotification object:self userInfo:@{@"ProgressString": info,
|
||||
@"Progress": @(progress),
|
||||
|
||||
+30
-19
@@ -482,11 +482,20 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
|
||||
- (void)updateUI {
|
||||
[self.table reloadData];
|
||||
[self updateDockTile];
|
||||
[self updateState];
|
||||
}
|
||||
|
||||
- (void)updateState
|
||||
{
|
||||
if (self.queue.status != SBQueueStatusWorking) {
|
||||
self.statusLabel.stringValue = [NSString stringWithFormat:@"%lu files in queue.", (unsigned long)[self.queue count]];
|
||||
if (self.queue.count == 1) {
|
||||
self.statusLabel.stringValue = NSLocalizedString(@"1 item in queue", nil);
|
||||
}
|
||||
else {
|
||||
self.statusLabel.stringValue = [NSString stringWithFormat:NSLocalizedString(@"%lu items in queue.", nil), (unsigned long)self.queue.count];
|
||||
}
|
||||
}
|
||||
[self updateDockTile];
|
||||
}
|
||||
|
||||
- (void)start:(id)sender {
|
||||
@@ -585,17 +594,25 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
switch (item.status) {
|
||||
case SBQueueItemStatusCompleted:
|
||||
cell.imageView.image = [NSImage imageNamed:@"EncodeComplete"];
|
||||
cell.imageView.accessibilityLabel = NSLocalizedString(@"Completed", nil);
|
||||
break;
|
||||
case SBQueueItemStatusWorking:
|
||||
cell.imageView.image = [NSImage imageNamed:@"EncodeWorking"];
|
||||
cell.imageView.accessibilityLabel = NSLocalizedString(@"Working", nil);
|
||||
case SBQueueItemStatusEditing:
|
||||
cell.imageView.image = [NSImage imageNamed:@"EncodeWorking"];
|
||||
cell.imageView.accessibilityLabel = NSLocalizedString(@"Editing", nil);
|
||||
break;
|
||||
case SBQueueItemStatusFailed:
|
||||
cell.imageView.image = [NSImage imageNamed:@"EncodeCanceled"];
|
||||
cell.imageView.accessibilityLabel = NSLocalizedString(@"Failed", nil);
|
||||
case SBQueueItemStatusCancelled:
|
||||
cell.imageView.image = [NSImage imageNamed:@"EncodeCanceled"];
|
||||
cell.imageView.accessibilityLabel = NSLocalizedString(@"Canceled", nil);
|
||||
break;
|
||||
default:
|
||||
cell.imageView.image = _docImg;
|
||||
cell.imageView.accessibilityLabel = @"";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -627,16 +644,13 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
}
|
||||
|
||||
if (rowIndexes.count) {
|
||||
[aTableView beginUpdates];
|
||||
[aTableView removeRowsAtIndexes:rowIndexes withAnimation:NSTableViewAnimationEffectFade];
|
||||
[aTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:selectedIndex] byExtendingSelection:NO];
|
||||
[self removeItems:array];
|
||||
[aTableView endUpdates];
|
||||
[aTableView beginUpdates];
|
||||
[aTableView removeRowsAtIndexes:rowIndexes withAnimation:NSTableViewAnimationEffectFade];
|
||||
[aTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:selectedIndex] byExtendingSelection:NO];
|
||||
[self removeItems:array];
|
||||
[aTableView endUpdates];
|
||||
|
||||
if (self.queue.status != SBQueueStatusWorking) {
|
||||
self.statusLabel.stringValue = [NSString stringWithFormat:@"%lu files in queue.", (unsigned long)[self.queue count]];
|
||||
[self updateDockTile];
|
||||
}
|
||||
[self updateState];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,15 +672,12 @@ static void *SBQueueContex = &SBQueueContex;
|
||||
NSIndexSet *indexes = [self.queue indexesOfItemsWithStatus:SBQueueItemStatusCompleted];
|
||||
|
||||
if (indexes.count) {
|
||||
[self.table beginUpdates];
|
||||
[self.table removeRowsAtIndexes:indexes withAnimation:NSTableViewAnimationEffectFade];
|
||||
[self.table endUpdates];
|
||||
[self.queue removeItemsAtIndexes:indexes];
|
||||
[self.table beginUpdates];
|
||||
[self.table removeRowsAtIndexes:indexes withAnimation:NSTableViewAnimationEffectFade];
|
||||
[self.table endUpdates];
|
||||
[self.queue removeItemsAtIndexes:indexes];
|
||||
|
||||
if (self.queue.status != SBQueueStatusWorking) {
|
||||
self.statusLabel.stringValue = [NSString stringWithFormat:@"%lu files in queue.", (unsigned long)[self.queue count]];
|
||||
[self updateDockTile];
|
||||
}
|
||||
[self updateState];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user