Address format conversion warnings in localizations (#3059)

This commit is contained in:
Antoine Cœur
2022-05-14 13:31:24 +08:00
committed by GitHub
parent 659969a436
commit 5d52da8726
43 changed files with 581 additions and 551 deletions

View File

@@ -85,8 +85,7 @@ OSStatus GeneratePreviewForURL(void* thisInterface, QLPreviewRequestRef preview,
if (is_multifile)
{
NSString* fileCountString = [NSString
stringWithFormat:NSLocalizedStringFromTableInBundle(@"%@ files", nil, bundle, "quicklook file count"),
[NSString formattedUInteger:n_files]];
stringWithFormat:NSLocalizedStringFromTableInBundle(@"%lu files", nil, bundle, "quicklook file count"), n_files];
fileSizeString = [NSString stringWithFormat:@"%@, %@", fileCountString, fileSizeString];
}
[htmlString appendFormat:@"<p>%@</p>", fileSizeString];
@@ -143,8 +142,7 @@ OSStatus GeneratePreviewForURL(void* thisInterface, QLPreviewRequestRef preview,
NSString* headerTitleString = n_webseeds == 1 ?
NSLocalizedStringFromTableInBundle(@"1 Web Seed", nil, bundle, "quicklook web seed header") :
[NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%@ Web Seeds", nil, bundle, "quicklook web seed header"),
[NSString formattedUInteger:n_webseeds]];
[NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%lu Web Seeds", nil, bundle, "quicklook web seed header"), n_webseeds];
[listSection appendFormat:@"<tr><th>%@</th></tr>", headerTitleString];
for (size_t i = 0; i < n_webseeds; ++i)
@@ -166,8 +164,7 @@ OSStatus GeneratePreviewForURL(void* thisInterface, QLPreviewRequestRef preview,
auto const n = std::size(announce_list);
NSString* headerTitleString = n == 1 ?
NSLocalizedStringFromTableInBundle(@"1 Tracker", nil, bundle, "quicklook tracker header") :
[NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%@ Trackers", nil, bundle, "quicklook tracker header"),
[NSString formattedUInteger:n]];
[NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%lu Trackers", nil, bundle, "quicklook tracker header"), n];
[listSection appendFormat:@"<tr><th>%@</th></tr>", headerTitleString];
#warning handle tiers?
@@ -187,8 +184,7 @@ OSStatus GeneratePreviewForURL(void* thisInterface, QLPreviewRequestRef preview,
[listSection appendString:@"<table>"];
NSString* fileTitleString = [NSString
stringWithFormat:NSLocalizedStringFromTableInBundle(@"%@ Files", nil, bundle, "quicklook file header"),
[NSString formattedUInteger:n_files]];
stringWithFormat:NSLocalizedStringFromTableInBundle(@"%lu Files", nil, bundle, "quicklook file header"), n_files];
[listSection appendFormat:@"<tr><th>%@</th></tr>", fileTitleString];
#warning display size?