* Fix unpractical translation string in AboutSystem.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37693 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1691,9 +1691,16 @@ MemSizeToString(char string[], size_t size, system_info* info)
|
|||||||
int inaccessibleMemory = int(info->ignored_pages
|
int inaccessibleMemory = int(info->ignored_pages
|
||||||
* (B_PAGE_SIZE / 1048576.0f) + 0.5f);
|
* (B_PAGE_SIZE / 1048576.0f) + 0.5f);
|
||||||
if (inaccessibleMemory > 0) {
|
if (inaccessibleMemory > 0) {
|
||||||
snprintf(string, size, B_TRANSLATE("%d MiB total, %d MiB inaccessible"),
|
BString message(B_TRANSLATE("%total MiB total, %inaccessible MiB "
|
||||||
int((info->max_pages + info->ignored_pages)
|
"inacessible"));
|
||||||
* (B_PAGE_SIZE / 1048576.0f) + 0.5f), inaccessibleMemory);
|
|
||||||
|
snprintf(string, size, "%d", int((info->max_pages
|
||||||
|
+ info->ignored_pages) * (B_PAGE_SIZE / 1048576.0f) + 0.5f));
|
||||||
|
message.ReplaceFirst("%total", string);
|
||||||
|
|
||||||
|
snprintf(string, size, "%d", inaccessibleMemory);
|
||||||
|
message.ReplaceFirst("%inaccessible", string);
|
||||||
|
strncpy(string, message.String(), size);
|
||||||
} else {
|
} else {
|
||||||
snprintf(string, size, B_TRANSLATE("%d MiB total"),
|
snprintf(string, size, B_TRANSLATE("%d MiB total"),
|
||||||
int(info->max_pages * (B_PAGE_SIZE / 1048576.0f) + 0.5f));
|
int(info->max_pages * (B_PAGE_SIZE / 1048576.0f) + 0.5f));
|
||||||
@@ -1721,7 +1728,7 @@ UptimeToString(char string[], size_t size)
|
|||||||
BString str;
|
BString str;
|
||||||
|
|
||||||
formatter.Format(system_time() / 1000000, &str);
|
formatter.Format(system_time() / 1000000, &str);
|
||||||
str.CopyInto(string,0,size);
|
str.CopyInto(string, 0, size);
|
||||||
string[str.Length()] = '\0';
|
string[str.Length()] = '\0';
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
|
|||||||
Reference in New Issue
Block a user