fold similar strings together for easier translation
This commit is contained in:
parent
d6a55c133b
commit
f741e74659
2
NEWS
2
NEWS
|
@ -14,7 +14,7 @@ NEWS file for Transmission <http://www.transmissionbt.com/>
|
|||
+ Updated images in the inspector
|
||||
+ Optional display of remaining time while seeding in Minimal View
|
||||
+ Improved accuracy for displaying the remaining disk space warning
|
||||
- Gtk+:
|
||||
- GTK+:
|
||||
+ New "watch directory" for auto-adding torrents
|
||||
+ New system tray popup to notify when a torrent is completed
|
||||
+ Add file selection and prioritization to the "open torrent" dialog
|
||||
|
|
|
@ -1421,8 +1421,8 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
else
|
||||
tr_getSessionStats(fLib, &stats);
|
||||
|
||||
statusString = [NSLocalizedString(@"Ratio: ", "status bar -> status label")
|
||||
stringByAppendingString: [NSString stringForRatio: stats.ratio]];
|
||||
statusString = [NSString stringWithFormat: @"%@: %@", NSLocalizedString(@"Ratio", "status bar -> status label"),
|
||||
[NSString stringForRatio: stats.ratio]];
|
||||
}
|
||||
else //STATUS_TRANSFER_TOTAL or STATUS_TRANSFER_SESSION
|
||||
{
|
||||
|
@ -1434,9 +1434,9 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
else
|
||||
tr_getSessionStats(fLib, &stats);
|
||||
|
||||
statusString = [NSString stringWithFormat: NSLocalizedString(@"DL: %@ UL: %@",
|
||||
"status bar -> status label (2 spaces between)"),
|
||||
[NSString stringForFileSize: stats.downloadedBytes], [NSString stringForFileSize: stats.uploadedBytes]];
|
||||
statusString = [NSString stringWithFormat: @"%@: %@ %@: %@",
|
||||
NSLocalizedString(@"DL", "status bar -> status label"), [NSString stringForFileSize: stats.downloadedBytes],
|
||||
NSLocalizedString(@"UL", "status bar -> status label"), [NSString stringForFileSize: stats.uploadedBytes]];
|
||||
}
|
||||
|
||||
if ([NSApp isOnLeopardOrBetter])
|
||||
|
|
Binary file not shown.
|
@ -60,11 +60,12 @@ tr_handle * fLib;
|
|||
[[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
|
||||
|
||||
//set label text
|
||||
[fUploadedLabelField setStringValue: NSLocalizedString(@"Uploaded:", "Stats window -> label")];
|
||||
[fDownloadedLabelField setStringValue: NSLocalizedString(@"Downloaded:", "Stats window -> label")];
|
||||
[fRatioLabelField setStringValue: NSLocalizedString(@"Ratio:", "Stats window -> label")];
|
||||
[fTimeLabelField setStringValue: NSLocalizedString(@"Running Time:", "Stats window -> label")];
|
||||
[fNumOpenedLabelField setStringValue: NSLocalizedString(@"Program Started:", "Stats window -> label")];
|
||||
[fUploadedLabelField setStringValue: [NSLocalizedString(@"Uploaded", "Stats window -> label") stringByAppendingString: @":"]];
|
||||
[fDownloadedLabelField setStringValue: [NSLocalizedString(@"Downloaded", "Stats window -> label") stringByAppendingString: @":"]];
|
||||
[fRatioLabelField setStringValue: [NSLocalizedString(@"Ratio", "Stats window -> label") stringByAppendingString: @":"]];
|
||||
[fTimeLabelField setStringValue: [NSLocalizedString(@"Running Time", "Stats window -> label") stringByAppendingString: @":"]];
|
||||
[fNumOpenedLabelField setStringValue: [NSLocalizedString(@"Program Started", "Stats window -> label")
|
||||
stringByAppendingString: @":"]];
|
||||
|
||||
//size all elements
|
||||
float oldWidth = [fUploadedLabelField frame].size.width;
|
||||
|
|
|
@ -928,34 +928,32 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
int totalPeers, i;
|
||||
tr_peer_stat * peers = tr_torrentPeers(fHandle, &totalPeers);
|
||||
|
||||
NSMutableArray * peerDics = [NSMutableArray arrayWithCapacity: totalPeers];
|
||||
NSMutableDictionary * dic;
|
||||
NSMutableArray * peerDicts = [NSMutableArray arrayWithCapacity: totalPeers];
|
||||
|
||||
tr_peer_stat * peer;
|
||||
for (i = 0; i < totalPeers; i++)
|
||||
{
|
||||
peer = &peers[i];
|
||||
tr_peer_stat * peer = &peers[i];
|
||||
NSMutableDictionary * dict = [NSMutableDictionary dictionaryWithCapacity: 9];
|
||||
|
||||
dic = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInt: peer->from], @"From",
|
||||
[NSString stringWithUTF8String: peer->addr], @"IP",
|
||||
[NSNumber numberWithInt: peer->port], @"Port",
|
||||
[NSNumber numberWithFloat: peer->progress], @"Progress",
|
||||
[NSNumber numberWithBool: peer->isEncrypted], @"Encryption",
|
||||
[NSString stringWithUTF8String: peer->client], @"Client",
|
||||
[NSString stringWithUTF8String: peer->flagStr], @"Flags", nil];
|
||||
[dict setObject: [NSNumber numberWithInt: peer->from] forKey: @"From"];
|
||||
[dict setObject: [NSString stringWithUTF8String: peer->addr] forKey: @"IP"];
|
||||
[dict setObject: [NSNumber numberWithInt: peer->port] forKey: @"Port"];
|
||||
[dict setObject: [NSNumber numberWithFloat: peer->progress] forKey: @"Progress"];
|
||||
[dict setObject: [NSNumber numberWithBool: peer->isEncrypted] forKey: @"Encryption"];
|
||||
[dict setObject: [NSString stringWithUTF8String: peer->client] forKey: @"Client"];
|
||||
[dict setObject: [NSString stringWithUTF8String: peer->flagStr] forKey: @"Flags"];
|
||||
|
||||
if (peer->isUploadingTo)
|
||||
[dic setObject: [NSNumber numberWithFloat: peer->uploadToRate] forKey: @"UL To Rate"];
|
||||
[dict setObject: [NSNumber numberWithFloat: peer->uploadToRate] forKey: @"UL To Rate"];
|
||||
if (peer->isDownloadingFrom)
|
||||
[dic setObject: [NSNumber numberWithFloat: peer->downloadFromRate] forKey: @"DL From Rate"];
|
||||
[dict setObject: [NSNumber numberWithFloat: peer->downloadFromRate] forKey: @"DL From Rate"];
|
||||
|
||||
[peerDics addObject: dic];
|
||||
[peerDicts addObject: dict];
|
||||
}
|
||||
|
||||
tr_torrentPeersFree(peers, totalPeers);
|
||||
|
||||
return peerDics;
|
||||
return peerDicts;
|
||||
}
|
||||
|
||||
- (NSString *) progressString
|
||||
|
@ -1073,11 +1071,12 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
if ([self isActive] && ![self isChecking])
|
||||
{
|
||||
if (fStat->status == TR_STATUS_DOWNLOAD)
|
||||
string = [string stringByAppendingFormat: NSLocalizedString(@" - DL: %@, UL: %@", "Torrent -> status string"),
|
||||
[NSString stringForSpeed: [self downloadRate]], [NSString stringForSpeed: [self uploadRate]]];
|
||||
string = [string stringByAppendingFormat: @" - %@: %@, %@: %@",
|
||||
NSLocalizedString(@"DL", "Torrent -> status string"), [NSString stringForSpeed: [self downloadRate]],
|
||||
NSLocalizedString(@"UL", "Torrent -> status string"), [NSString stringForSpeed: [self uploadRate]]];
|
||||
else
|
||||
string = [string stringByAppendingFormat: NSLocalizedString(@" - UL: %@", "Torrent -> status string"),
|
||||
[NSString stringForSpeed: [self uploadRate]]];
|
||||
string = [string stringByAppendingFormat: @" - %@: %@",
|
||||
NSLocalizedString(@"UL", "Torrent -> status string"), [NSString stringForSpeed: [self uploadRate]]];
|
||||
}
|
||||
|
||||
return string;
|
||||
|
@ -1112,14 +1111,16 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
break;
|
||||
|
||||
case TR_STATUS_DOWNLOAD:
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"DL: %@, UL: %@", "Torrent -> status string"),
|
||||
[NSString stringForSpeed: [self downloadRate]], [NSString stringForSpeed: [self uploadRate]]];
|
||||
string = [NSString stringWithFormat: @"%@: %@, %@: %@",
|
||||
NSLocalizedString(@"DL", "Torrent -> status string"), [NSString stringForSpeed: [self downloadRate]],
|
||||
NSLocalizedString(@"UL", "Torrent -> status string"), [NSString stringForSpeed: [self uploadRate]]];
|
||||
break;
|
||||
|
||||
case TR_STATUS_SEED:
|
||||
case TR_STATUS_DONE:
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"Ratio: %@, UL: %@", "Torrent -> status string"),
|
||||
[NSString stringForRatio: [self ratio]], [NSString stringForSpeed: [self uploadRate]]];
|
||||
string = [NSString stringWithFormat: @"%@: %@, %@: %@",
|
||||
NSLocalizedString(@"Ratio", "Torrent -> status string"), [NSString stringForRatio: [self ratio]],
|
||||
NSLocalizedString(@"UL", "Torrent -> status string"), [NSString stringForSpeed: [self uploadRate]]];
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue