diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-05 06:54:35 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-05 06:54:35 +0300 |
commit | 37755274aa10ae2a2f8e701fe741b64ba28ba1c9 (patch) | |
tree | 5f55561690430d0a353bd69908df7507fabaf0d5 | |
parent | bb1b42eaf7ecb6cd9ea4c531c28513839f443a07 (diff) |
Lang: New strings for directory/archive browsing
-rw-r--r-- | po/en.po | 25 | ||||
-rw-r--r-- | res/lang/de.bin | bin | 20070 -> 20252 bytes | |||
-rw-r--r-- | res/lang/en.bin | bin | 18558 -> 19008 bytes | |||
-rw-r--r-- | res/lang/es.bin | bin | 20648 -> 20830 bytes | |||
-rw-r--r-- | res/lang/fi.bin | bin | 20352 -> 20534 bytes | |||
-rw-r--r-- | res/lang/fr.bin | bin | 21134 -> 21316 bytes | |||
-rw-r--r-- | res/lang/ia.bin | bin | 20542 -> 20724 bytes | |||
-rw-r--r-- | res/lang/ie.bin | bin | 19772 -> 19954 bytes | |||
-rw-r--r-- | res/lang/ru.bin | bin | 30284 -> 30466 bytes | |||
-rw-r--r-- | res/lang/sr.bin | bin | 28749 -> 28931 bytes | |||
-rw-r--r-- | res/lang/tok.bin | bin | 19048 -> 19230 bytes | |||
-rw-r--r-- | res/lang/zh_Hans.bin | bin | 17948 -> 18130 bytes | |||
-rw-r--r-- | res/lang/zh_Hant.bin | bin | 18022 -> 18204 bytes | |||
-rw-r--r-- | src/gmrequest.c | 17 | ||||
-rw-r--r-- | src/ui/documentwidget.c | 11 |
15 files changed, 41 insertions, 12 deletions
@@ -5,6 +5,12 @@ msgstr "Preformatted text without a caption" | |||
5 | msgid "doc.fetching" | 5 | msgid "doc.fetching" |
6 | msgstr "Fetching" | 6 | msgstr "Fetching" |
7 | 7 | ||
8 | msgid "doc.archive" | ||
9 | msgstr "%s is a compressed archive." | ||
10 | |||
11 | msgid "doc.archive.view" | ||
12 | msgstr "View archive contents" | ||
13 | |||
8 | # Inline download status message. | 14 | # Inline download status message. |
9 | msgid "media.download.warnclose" | 15 | msgid "media.download.warnclose" |
10 | msgstr "Download will be cancelled if this tab is closed." | 16 | msgstr "Download will be cancelled if this tab is closed." |
@@ -1239,6 +1245,22 @@ msgstr "Reset to Default" | |||
1239 | msgid "menu.binding.clear" | 1245 | msgid "menu.binding.clear" |
1240 | msgstr "Remove" | 1246 | msgstr "Remove" |
1241 | 1247 | ||
1248 | msgid "archive.exit" | ||
1249 | msgstr "Exit the archive" | ||
1250 | |||
1251 | msgid "archive.summary" | ||
1252 | msgid_plural "archive.summary.n" | ||
1253 | msgstr[0] "This archive contains %zu item and its compressed size is %.1f MB." | ||
1254 | msgstr[1] "This archive contains %zu items and its compressed size is %.1f MB." | ||
1255 | |||
1256 | msgid "dir.empty" | ||
1257 | msgstr "This directory is empty." | ||
1258 | |||
1259 | msgid "dir.summary" | ||
1260 | msgid_plural "dir.summary.n" | ||
1261 | msgstr[0] "This directory contains %zu item." | ||
1262 | msgstr[1] "This directory contains %zu items." | ||
1263 | |||
1242 | msgid "keys.top" | 1264 | msgid "keys.top" |
1243 | msgstr "Jump to top" | 1265 | msgstr "Jump to top" |
1244 | 1266 | ||
@@ -1320,6 +1342,9 @@ msgstr "New tab" | |||
1320 | msgid "keys.tab.close" | 1342 | msgid "keys.tab.close" |
1321 | msgstr "Close tab" | 1343 | msgstr "Close tab" |
1322 | 1344 | ||
1345 | msgid "keys.tab.close.other" | ||
1346 | msgstr "Close other tabs" | ||
1347 | |||
1323 | msgid "keys.tab.prev" | 1348 | msgid "keys.tab.prev" |
1324 | msgstr "Previous tab" | 1349 | msgstr "Previous tab" |
1325 | 1350 | ||
diff --git a/res/lang/de.bin b/res/lang/de.bin index bcefdddc..b2dba753 100644 --- a/res/lang/de.bin +++ b/res/lang/de.bin | |||
Binary files differ | |||
diff --git a/res/lang/en.bin b/res/lang/en.bin index d2fefa4f..f6ccec4b 100644 --- a/res/lang/en.bin +++ b/res/lang/en.bin | |||
Binary files differ | |||
diff --git a/res/lang/es.bin b/res/lang/es.bin index 8626f0a4..7aed45f1 100644 --- a/res/lang/es.bin +++ b/res/lang/es.bin | |||
Binary files differ | |||
diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 383a2ed6..fb2ece8a 100644 --- a/res/lang/fi.bin +++ b/res/lang/fi.bin | |||
Binary files differ | |||
diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 712accd7..ad7e9623 100644 --- a/res/lang/fr.bin +++ b/res/lang/fr.bin | |||
Binary files differ | |||
diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 63bfb72a..c8308d2c 100644 --- a/res/lang/ia.bin +++ b/res/lang/ia.bin | |||
Binary files differ | |||
diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 071a3c66..e51e1c6f 100644 --- a/res/lang/ie.bin +++ b/res/lang/ie.bin | |||
Binary files differ | |||
diff --git a/res/lang/ru.bin b/res/lang/ru.bin index becdc9c7..9d329ad5 100644 --- a/res/lang/ru.bin +++ b/res/lang/ru.bin | |||
Binary files differ | |||
diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 1336b719..b8b609b7 100644 --- a/res/lang/sr.bin +++ b/res/lang/sr.bin | |||
Binary files differ | |||
diff --git a/res/lang/tok.bin b/res/lang/tok.bin index bf7c610e..69330080 100644 --- a/res/lang/tok.bin +++ b/res/lang/tok.bin | |||
Binary files differ | |||
diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 31e6c904..75245b7b 100644 --- a/res/lang/zh_Hans.bin +++ b/res/lang/zh_Hans.bin | |||
Binary files differ | |||
diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 8cf25ad8..8a48e087 100644 --- a/res/lang/zh_Hant.bin +++ b/res/lang/zh_Hant.bin | |||
Binary files differ | |||
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); |
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8d519865..ed38ad0b 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1182,10 +1182,11 @@ static void updateDocument_DocumentWidget_(iDocumentWidget *d, const iGmResponse | |||
1182 | setRange_String(&d->sourceMime, param); | 1182 | setRange_String(&d->sourceMime, param); |
1183 | iString *key = collectNew_String(); | 1183 | iString *key = collectNew_String(); |
1184 | toString_Sym(SDLK_s, KMOD_PRIMARY, key); | 1184 | toString_Sym(SDLK_s, KMOD_PRIMARY, key); |
1185 | format_String(&str, "# %s\n" | 1185 | format_String(&str, "# %s\n", zipPageHeading_(param)); |
1186 | "%s is a compressed archive.\n\n", | 1186 | appendFormat_String(&str, |
1187 | zipPageHeading_(param), | 1187 | cstr_Lang("doc.archive"), |
1188 | cstr_Rangecc(baseName_Path(d->mod.url))); | 1188 | cstr_Rangecc(baseName_Path(d->mod.url))); |
1189 | appendCStr_String(&str, "\n\n"); | ||
1189 | iString *localPath = localFilePathFromUrl_String(d->mod.url); | 1190 | iString *localPath = localFilePathFromUrl_String(d->mod.url); |
1190 | if (!localPath) { | 1191 | if (!localPath) { |
1191 | appendFormat_String(&str, "%s\n\n", | 1192 | appendFormat_String(&str, "%s\n\n", |
@@ -1195,7 +1196,7 @@ static void updateDocument_DocumentWidget_(iDocumentWidget *d, const iGmResponse | |||
1195 | } | 1196 | } |
1196 | delete_String(localPath); | 1197 | delete_String(localPath); |
1197 | if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) { | 1198 | if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) { |
1198 | appendFormat_String(&str, "=> %s/ View archive contents\n", | 1199 | appendFormat_String(&str, "=> %s/ ${doc.archive.view}\n", |
1199 | cstr_String(withSpacesEncoded_String(d->mod.url))); | 1200 | cstr_String(withSpacesEncoded_String(d->mod.url))); |
1200 | } | 1201 | } |
1201 | translate_Lang(&str); | 1202 | translate_Lang(&str); |