diff options
-rw-r--r-- | Source/CMTextView.m | 4 | ||||
-rw-r--r-- | Source/SPAppController.m | 4 | ||||
-rw-r--r-- | Source/SPEditSheetTextView.m | 4 | ||||
-rw-r--r-- | Source/SPStringAdditions.m | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m index 18059059..94e5a2bb 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -3094,8 +3094,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) NSAlert *alert = [[NSAlert alloc] init]; [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"cancel button")]; - [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to proceed with %.1f MB of data?", @"message of panel asking for confirmation for inserting large text from dragging action"), - [filesize unsignedLongValue]/1048576.0]]; + [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to proceed with %@ of data?", @"message of panel asking for confirmation for inserting large text from dragging action"), + [NSString stringForByteSize:[filesize longLongValue]]]]; [alert setHelpAnchor:filepath]; [alert setMessageText:NSLocalizedString(@"Warning",@"warning")]; [alert setAlertStyle:NSWarningAlertStyle]; diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 69fcca80..b80e0680 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -224,8 +224,8 @@ [alert addButtonWithTitle:NSLocalizedString(@"Import", @"import button")]; - [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to load a SQL file with %.1f MB of data into the Query Editor?", @"message of panel asking for confirmation for loading large text into the query editor"), - [filesize unsignedLongValue]/1048576.0]]; + [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to load a SQL file with %@ of data into the Query Editor?", @"message of panel asking for confirmation for loading large text into the query editor"), + [NSString stringForByteSize:[filesize longLongValue]]]]; [alert setHelpAnchor:filename]; [alert setMessageText:NSLocalizedString(@"Warning",@"warning")]; [alert setAlertStyle:NSWarningAlertStyle]; diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m index 776d000e..3e22614d 100644 --- a/Source/SPEditSheetTextView.m +++ b/Source/SPEditSheetTextView.m @@ -173,8 +173,8 @@ NSAlert *alert = [[NSAlert alloc] init]; [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"cancel button")]; - [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to proceed with %.1f MB of data?", @"message of panel asking for confirmation for inserting large text from dragging action"), - [filesize unsignedLongValue]/1048576.0]]; + [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to proceed with %@ of data?", @"message of panel asking for confirmation for inserting large text from dragging action"), + [NSString stringForByteSize:[filesize longLongValue]]]]; [alert setHelpAnchor:filepath]; [alert setMessageText:NSLocalizedString(@"Warning", @"warning")]; [alert setAlertStyle:NSWarningAlertStyle]; diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index 09d80b9a..c36e55c1 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -54,7 +54,7 @@ size = (size / 1024); if (size < 1023) { - [numberFormatter setFormat:@"#,##0.0 KB"]; + [numberFormatter setFormat:@"#,##0.0 KiB"]; return [numberFormatter stringFromNumber:[NSNumber numberWithDouble:size]]; } @@ -62,7 +62,7 @@ size = (size / 1024); if (size < 1023) { - [numberFormatter setFormat:@"#,##0.0 MB"]; + [numberFormatter setFormat:@"#,##0.0 MiB"]; return [numberFormatter stringFromNumber:[NSNumber numberWithDouble:size]]; } @@ -70,14 +70,14 @@ size = (size / 1024); if (size < 1023) { - [numberFormatter setFormat:@"#,##0.0 GB"]; + [numberFormatter setFormat:@"#,##0.0 GiB"]; return [numberFormatter stringFromNumber:[NSNumber numberWithDouble:size]]; } size = (size / 1024); - [numberFormatter setFormat:@"#,##0.0 TB"]; + [numberFormatter setFormat:@"#,##0.0 TiB"]; return [numberFormatter stringFromNumber:[NSNumber numberWithDouble:size]]; } |