summaryrefslogtreecommitdiff
path: root/src/gmrequest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r--src/gmrequest.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c
index cdf4e582..1a7c37df 100644
--- a/src/gmrequest.c
+++ b/src/gmrequest.c
@@ -696,25 +696,28 @@ void submit_GmRequest(iGmRequest *d) {
696 } 696 }
697 else { 697 else {
698 /* The root directory. */ 698 /* The root directory. */
699 appendFormat_String(page, "=> %s " close_Icon " Exit the archive\n", 699 appendFormat_String(page, "=> %s " close_Icon " ${archive.exit}\n",
700 cstr_String(containerUrl)); 700 cstr_String(containerUrl));
701 appendFormat_String(page, "# %s\n\n" 701 appendFormat_String(page, "# %s\n\n", cstr_Rangecc(containerName));
702 "This archive contains %zu items and its compressed " 702 appendFormat_String(page,
703 "size is %.1f MB.\n\n", 703 cstrCount_Lang("archive.summary.n", numEntries_Archive(arch)),
704 cstr_Rangecc(containerName),
705 numEntries_Archive(arch), 704 numEntries_Archive(arch),
706 (double) sourceSize_Archive(arch) / 1.0e6); 705 (double) sourceSize_Archive(arch) / 1.0e6);
706 appendCStr_String(page, "\n\n");
707 } 707 }
708 iStringSet *contents = iClob(listDirectory_Archive(arch, entryPath)); 708 iStringSet *contents = iClob(listDirectory_Archive(arch, entryPath));
709 if (!isRoot) { 709 if (!isRoot) {
710 if (isEmpty_StringSet(contents)) { 710 if (isEmpty_StringSet(contents)) {
711 appendCStr_String(page, "This directory is empty.\n"); 711 appendCStr_String(page, "${dir.empty}\n");
712 } 712 }
713 else if (size_StringSet(contents) > 1) { 713 else if (size_StringSet(contents) > 1) {
714 appendFormat_String(page, "This directory contains %zu items.\n\n", 714 appendFormat_String(page, cstrCount_Lang("dir.summary.n",
715 size_StringSet(contents)),
715 size_StringSet(contents)); 716 size_StringSet(contents));
717 appendCStr_String(page, "\n\n");
716 } 718 }
717 } 719 }
720 translate_Lang(page);
718 iConstForEach(StringSet, e, contents) { 721 iConstForEach(StringSet, e, contents) {
719 const iString *subPath = e.value; 722 const iString *subPath = e.value;
720 iRangecc relSub = range_String(subPath); 723 iRangecc relSub = range_String(subPath);