localize statsOverlay
This commit is contained in:
1 parent
b25f2d0916
commit
d427270699
2 files changed
+56
-3
No files matched your search
@@ -1,6 +1,29 @@
|
|||||||
{
|
{
|
||||||
"sourceLanguage" : "en",
|
"sourceLanguage" : "en",
|
||||||
"strings" : {
|
"strings" : {
|
||||||
|
"\nHost processing latency min/max/avg: %.1f/%.1f/%.1f ms" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "\n处理延迟 最小/最大/平均: %.1f/%.1f/%.1f ms"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "\n处理延迟 最小/最大/平均: %.1f/%.1f/%.1f ms"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "\n处理延迟 最小/最大/平均: %.1f/%.1f/%.1f ms"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"!ML_TEST_RESULT_INCONCLUSIVE" : {
|
"!ML_TEST_RESULT_INCONCLUSIVE" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
@@ -2148,6 +2171,35 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Video stream: %dx%d %.2f FPS (Codec: %@)\nFrames dropped by your network connection: %.2f%%\nAverage network latency: %@%@" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Video stream: %dx%d %.2f FPS (Codec: %@)\nFrames dropped by your network connection: %.2f%%\nAverage network latency: %@%@"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "视频流: %dx%d %.2f FPS (编码格式: %@)\n网络造成的丢帧: %.2f%%\n平均网络延迟: %@%@"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "视频流: %dx%d %.2f FPS (编码格式: %@)\n网络造成的丢帧: %.2f%%\n平均网络延迟: %@%@"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "视频流: %dx%d %.2f FPS (编码格式: %@)\n网络造成的丢帧: %.2f%%\n平均网络延迟: %@%@"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Video Width" : {
|
"Video Width" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#import "HttpResponse.h"
|
#import "HttpResponse.h"
|
||||||
#import "HttpRequest.h"
|
#import "HttpRequest.h"
|
||||||
#import "IdManager.h"
|
#import "IdManager.h"
|
||||||
|
#import "LocalizationHelper.h"
|
||||||
|
|
||||||
#include <Limelight.h>
|
#include <Limelight.h>
|
||||||
|
|
||||||
@@ -161,7 +162,7 @@
|
|||||||
uint32_t rtt, variance;
|
uint32_t rtt, variance;
|
||||||
NSString* latencyString;
|
NSString* latencyString;
|
||||||
if (LiGetEstimatedRttInfo(&rtt, &variance)) {
|
if (LiGetEstimatedRttInfo(&rtt, &variance)) {
|
||||||
latencyString = [NSString stringWithFormat:@"%u ms (variance: %u ms)", rtt, variance];
|
latencyString = [LocalizationHelper localizedStringForKey:@"%u ms (variance: %u ms)", rtt, variance];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
latencyString = @"N/A";
|
latencyString = @"N/A";
|
||||||
@@ -169,7 +170,7 @@
|
|||||||
|
|
||||||
NSString* hostProcessingString;
|
NSString* hostProcessingString;
|
||||||
if (stats.framesWithHostProcessingLatency != 0) {
|
if (stats.framesWithHostProcessingLatency != 0) {
|
||||||
hostProcessingString = [NSString stringWithFormat:@"\nHost processing latency min/max/avg: %.1f/%.1f/%.1f ms",
|
hostProcessingString = [LocalizationHelper localizedStringForKey:@"\nHost processing latency min/max/avg: %.1f/%.1f/%.1f ms",
|
||||||
stats.minHostProcessingLatency / 10.f,
|
stats.minHostProcessingLatency / 10.f,
|
||||||
stats.maxHostProcessingLatency / 10.f,
|
stats.maxHostProcessingLatency / 10.f,
|
||||||
(float)stats.totalHostProcessingLatency / stats.framesWithHostProcessingLatency / 10.f];
|
(float)stats.totalHostProcessingLatency / stats.framesWithHostProcessingLatency / 10.f];
|
||||||
@@ -179,7 +180,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
float interval = stats.endTime - stats.startTime;
|
float interval = stats.endTime - stats.startTime;
|
||||||
return [NSString stringWithFormat:@"Video stream: %dx%d %.2f FPS (Codec: %@)\nFrames dropped by your network connection: %.2f%%\nAverage network latency: %@%@",
|
return [LocalizationHelper localizedStringForKey:@"Video stream: %dx%d %.2f FPS (Codec: %@)\nFrames dropped by your network connection: %.2f%%\nAverage network latency: %@%@",
|
||||||
_config.width,
|
_config.width,
|
||||||
_config.height,
|
_config.height,
|
||||||
stats.totalFrames / interval,
|
stats.totalFrames / interval,
|
||||||
|
|||||||
Reference in new issue
Block a user