1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 15:34:41 +00:00

Cleanup translation comments (#924)

* `// Translates to:` -> `//`

* `// Translation: ([^"].*)` -> `// "$1"`

* Manual cleanup

* Manual cleanup in `src/code/`

* Use more lowercase for some all caps translations

* Move translations to end of lines where it fits under 100 bytes

* Move one translation to end of line manually

* Run formatter

* Cleanup in EnHeishi1 as suggested by Roman

* Update src/code/z_play.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Dragorn421 2021-09-04 15:33:19 +02:00 committed by GitHub
parent 9b840ad842
commit 81830a6e8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 348 additions and 440 deletions

View file

@ -574,13 +574,13 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
} else {
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
if (newSize == node->size) {
// Does nothing because the memory block size does not change
// "Does nothing because the memory block size does not change"
osSyncPrintf("メモリブロックサイズが変わらないためなにもしません\n");
} else if (node->size < newSize) {
next = ArenaImpl_GetNextBlock(node);
sizeDiff = newSize - node->size;
if ((u32)next == ((u32)node + node->size + sizeof(ArenaNode)) && next->isFree && next->size >= sizeDiff) {
// Merge because there is a free block after the current memory block
// "Merge because there is a free block after the current memory block"
osSyncPrintf("現メモリブロックの後ろにフリーブロックがあるので結合します\n");
next->size -= sizeDiff;
overNext = ArenaImpl_GetNextBlock(next);
@ -592,7 +592,7 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
node->size = newSize;
func_801068B0(newNext, next, sizeof(ArenaNode)); // memcpy
} else {
// Allocate a new memory block and move the contents
// "Allocate a new memory block and move the contents"
osSyncPrintf("新たにメモリブロックを確保して内容を移動します\n");
newAlloc = __osMalloc_NoLock(arena, newSize);
if (newAlloc != NULL) {
@ -605,7 +605,7 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
next2 = ArenaImpl_GetNextBlock(node);
if (next2 != NULL && next2->isFree) {
blockSize = ALIGN16(newSize) + sizeof(ArenaNode);
// Increased free block behind current memory block
// "Increased free block behind current memory block"
osSyncPrintf("現メモリブロックの後ろのフリーブロックを大きくしました\n");
newNext2 = (ArenaNode*)((u32)node + blockSize);
localCopy = *next2;
@ -619,7 +619,7 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
}
} else if (newSize + sizeof(ArenaNode) < node->size) {
blockSize = ALIGN16(newSize) + sizeof(ArenaNode);
// Generated because there is no free block after the current memory block
// "Generated because there is no free block after the current memory block"
osSyncPrintf("現メモリブロックの後ろにフリーブロックがないので生成します\n");
newNext2 = (ArenaNode*)((u32)node + blockSize);
newNext2->next = ArenaImpl_GetNextBlock(node);
@ -634,7 +634,7 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
overNext2->prev = newNext2;
}
} else {
// There is no room to generate free blocks
// "There is no room to generate free blocks"
osSyncPrintf("フリーブロック生成するだけの空きがありません\n");
ptr = NULL;
}
@ -683,8 +683,7 @@ void __osDisplayArena(Arena* arena) {
ArenaNode* next;
if (!__osMallocIsInitalized(arena)) {
// Arena is not initalized
osSyncPrintf("アリーナは初期化されていません\n");
osSyncPrintf("アリーナは初期化されていません\n"); // "Arena is not initalized"
return;
}
@ -694,9 +693,8 @@ void __osDisplayArena(Arena* arena) {
freeSize = 0;
allocatedSize = 0;
// Arena contents (0x%08x)
osSyncPrintf("アリーナの内容 (0x%08x)\n", arena);
// Memory node range status size [time s ms us ns: TID: src: line]
osSyncPrintf("アリーナの内容 (0x%08x)\n", arena); // "Arena contents (0x%08x)"
// "Memory node range status size [time s ms us ns: TID: src: line]"
osSyncPrintf("メモリブロック範囲 status サイズ [時刻 s ms us ns: TID:src:行]\n");
iter = arena->head;
@ -730,9 +728,12 @@ void __osDisplayArena(Arena* arena) {
iter = next;
}
osSyncPrintf("確保ブロックサイズの合計 0x%08x バイト\n", allocatedSize); // Total reserved node size 0x%08x bytes
osSyncPrintf("空きブロックサイズの合計 0x%08x バイト\n", freeSize); // Total free node size 0x%08x bytes
osSyncPrintf("最大空きブロックサイズ 0x%08x バイト\n", maxFree); // Maximum free node size 0x%08x bytes
// "Total reserved node size 0x%08x bytes"
osSyncPrintf("確保ブロックサイズの合計 0x%08x バイト\n", allocatedSize);
// "Total free node size 0x%08x bytes"
osSyncPrintf("空きブロックサイズの合計 0x%08x バイト\n", freeSize);
// "Maximum free node size 0x%08x bytes"
osSyncPrintf("最大空きブロックサイズ 0x%08x バイト\n", maxFree);
ArenaImpl_Unlock(arena);
}
@ -792,12 +793,12 @@ u32 __osCheckArena(Arena* arena) {
u32 error = 0;
ArenaImpl_Lock(arena);
// Checking the contents of the arena. . (%08x)
// "Checking the contents of the arena. . (%08x)"
osSyncPrintf("アリーナの内容をチェックしています... (%08x)\n", arena);
iter = arena->head;
while (iter != NULL) {
if (iter && iter->magic == NODE_MAGIC) {
// Oops!! (%08x %08x)
// "Oops!! (%08x %08x)"
osSyncPrintf(VT_COL(RED, WHITE) "おおっと!! (%08x %08x)\n" VT_RST, iter, iter->magic);
error = 1;
break;
@ -805,8 +806,7 @@ u32 __osCheckArena(Arena* arena) {
iter = ArenaImpl_GetNextBlock(iter);
}
if (error == 0) {
// The arena is still going well
osSyncPrintf("アリーナはまだ、いけそうです\n");
osSyncPrintf("アリーナはまだ、いけそうです\n"); // "The arena is still going well"
}
ArenaImpl_Unlock(arena);