summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/en.po139
-rw-r--r--res/lang/en.binbin11916 -> 15248 bytes
-rw-r--r--src/gmutil.c107
3 files changed, 185 insertions, 61 deletions
diff --git a/po/en.po b/po/en.po
index 44f3de9b..0e36fb3d 100644
--- a/po/en.po
+++ b/po/en.po
@@ -1076,3 +1076,142 @@ msgstr "Next tab"
1076 1076
1077msgid "keys.hoverurl" 1077msgid "keys.hoverurl"
1078msgstr "Toggle show URL on hover" 1078msgstr "Toggle show URL on hover"
1079
1080msgid "error.badstatus"
1081msgstr "Unknown Status Code"
1082
1083msgid "error.badstatus.msg"
1084msgstr "The server responded with a status code that is not in the Gemini protocol specification. Maybe the server is from the future? Or just malfunctioning."
1085
1086msgid "error.openfile"
1087msgstr "Failed to Open File"
1088
1089msgid "error.openfile.msg"
1090msgstr "The requested file does not exist or is inaccessible. Please check the file path."
1091
1092msgid "error.badresource"
1093msgstr "Invalid Resource"
1094
1095msgid "error.badresource.msg"
1096msgstr "The requested resource does not exist."
1097
1098msgid "error.unsupported.media"
1099msgstr "Unsupported Content Type"
1100
1101msgid "error.unsupported.media.msg"
1102msgstr "The received content cannot be viewed with this application."
1103
1104msgid "error.unsupported.protocol"
1105msgstr "Unsupported Protocol"
1106
1107msgid "error.unsupported.protocol.msg"
1108msgstr "The requested protocol is not supported by this application."
1109
1110msgid "error.badheader"
1111msgstr "Invalid Header"
1112
1113msgid "error.badheader.msg"
1114msgstr "The received header does not conform to the Gemini protocol specification. Perhaps the server is malfunctioning, or you tried to contact a non-Gemini server."
1115
1116msgid "error.badredirect"
1117msgstr "Invalid Redirect"
1118
1119msgid "error.badredirect.msg"
1120msgstr "The server responded with a redirect but did not provide a valid destination URL. Perhaps the server is malfunctioning."
1121
1122msgid "error.schemeredirect"
1123msgstr "Scheme-Changing Redirect"
1124
1125msgid "error.schemeredirect.msg"
1126msgstr "The server attempted to redirect us to a URL whose scheme is different than the originating URL's scheme. Here is the link so you can open it manually if appropriate."
1127
1128msgid "error.manyredirects"
1129msgstr "Too Many Redirects"
1130
1131msgid "error.manyredirects.msg"
1132msgstr "You may be stuck in a redirection loop. The next redirected URL is below if you want to continue manually."
1133
1134msgid "error.tls"
1135msgstr "Network/TLS Failure"
1136
1137msgid "error.tls.msg"
1138msgstr "Failed to communicate with the server. Here is the error message:"
1139
1140msgid "error.temporary"
1141msgstr "Temporary Failure"
1142
1143msgid "error.temporary.msg"
1144msgstr "The request has failed, but may succeed if you try again in the future."
1145
1146msgid "error.unavail"
1147msgstr "Server Unavailable"
1148
1149msgid "error.unavail.msg"
1150msgstr "The server is unavailable due to overload or maintenance. Check back later."
1151
1152msgid "error.cgi"
1153msgstr "CGI Error"
1154
1155msgid "error.cgi.msg"
1156msgstr "Failure during dynamic content generation on the server. This may be due to malfunctioning serverside software."
1157
1158msgid "error.proxy"
1159msgstr "Proxy Error"
1160
1161msgid "error.proxy.msg"
1162msgstr "A proxy request failed because the server was unable to successfully complete a transaction with the remote host. Perhaps there are difficulties with network connectivity."
1163
1164msgid "error.slowdown"
1165msgstr "Slow Down"
1166
1167msgid "error.slowdown.msg"
1168msgstr "The server is rate limiting requests. Please wait..."
1169
1170msgid "error.permanent"
1171msgstr "Permanent Failure"
1172
1173msgid "error.permanent.msg"
1174msgstr "Your request has failed and will fail in the future as well if repeated."
1175
1176msgid "error.notfound"
1177msgstr "Not Found"
1178
1179msgid "error.notfound.msg"
1180msgstr "The requested resource could not be found at this time."
1181
1182msgid "error.gone"
1183msgstr "Gone"
1184
1185msgid "error.gone.msg"
1186msgstr "The requested resource is no longer available."
1187
1188msgid "error.proxyrefusal"
1189msgstr "Proxy Request Refused"
1190
1191msgid "error.proxyrefusal.msg"
1192msgstr "The request was for a resource at a domain not served by the server and the server does not accept proxy requests."
1193
1194msgid "error.badrequest"
1195msgstr "Bad Request"
1196
1197msgid "error.badrequest.msg"
1198msgstr "The server did not understand your request."
1199
1200msgid "error.cert.needed"
1201msgstr "Certificate Required"
1202
1203msgid "error.cert.needed.msg"
1204msgstr "Access to the requested resource requires identification via a client certificate."
1205
1206msgid "error.cert.auth"
1207msgstr "Certificate Not Authorized"
1208
1209msgid "error.cert.auth.msg"
1210msgstr "The provided client certificate is valid but is not authorized for accessing the requested resource."
1211
1212msgid "error.cert.invalid"
1213msgstr "Invalid Certificate"
1214
1215msgid "error.cert.invalid.msg"
1216msgstr "The provided client certificate is expired or invalid."
1217
diff --git a/res/lang/en.bin b/res/lang/en.bin
index 5841ddf8..7a88cc90 100644
--- a/res/lang/en.bin
+++ b/res/lang/en.bin
Binary files differ
diff --git a/src/gmutil.c b/src/gmutil.c
index b7ddfa21..bc302bef 100644
--- a/src/gmutil.c
+++ b/src/gmutil.c
@@ -441,111 +441,96 @@ static const struct {
441} errors_[] = { 441} errors_[] = {
442 { unknownStatusCode_GmStatusCode, /* keep this as the first one (fallback return value) */ 442 { unknownStatusCode_GmStatusCode, /* keep this as the first one (fallback return value) */
443 { 0x1f4ab, /* dizzy */ 443 { 0x1f4ab, /* dizzy */
444 "Unknown Status Code", 444 "${error.badstatus}",
445 "The server responded with a status code that is not in the Gemini specification. " 445 "${error.badstatus.msg}" } },
446 "Maybe the server is from the future? Or just malfunctioning." } },
447 { failedToOpenFile_GmStatusCode, 446 { failedToOpenFile_GmStatusCode,
448 { 0x1f4c1, /* file folder */ 447 { 0x1f4c1, /* file folder */
449 "Failed to Open File", 448 "${error.openfile}",
450 "The requested file does not exist or is inaccessible. " 449 "${error.openfile.msg}" } },
451 "Please check the file path." } },
452 { invalidLocalResource_GmStatusCode, 450 { invalidLocalResource_GmStatusCode,
453 { 0, 451 { 0,
454 "Invalid Resource", 452 "${error.badresource}",
455 "The requested resource does not exist." } }, 453 "${error.badresource.msg}" } },
456 { unsupportedMimeType_GmStatusCode, 454 { unsupportedMimeType_GmStatusCode,
457 { 0x1f47d, /* alien */ 455 { 0x1f47d, /* alien */
458 "Unsupported Content Type", 456 "${error.unsupported.media}",
459 "The received content cannot be viewed with this application." } }, 457 "${error.unsupported.media.msg}" } },
460 { unsupportedProtocol_GmStatusCode, 458 { unsupportedProtocol_GmStatusCode,
461 { 0x1f61e, /* disappointed */ 459 { 0x1f61e, /* disappointed */
462 "Unsupported Protocol", 460 "${error.unsupported.protocol}",
463 "The requested protocol is not supported by this application." }, 461 "${error.unsupported.protocol.msg}" } },
464 },
465 { invalidHeader_GmStatusCode, 462 { invalidHeader_GmStatusCode,
466 { 0x1f4a9, /* pile of poo */ 463 { 0x1f4a9, /* pile of poo */
467 "Invalid Header", 464 "${error.badheader}",
468 "The received header did not conform to the Gemini specification. " 465 "${error.badheader.msg}" } },
469 "Perhaps the server is malfunctioning or you tried to contact a "
470 "non-Gemini server." } },
471 { invalidRedirect_GmStatusCode, 466 { invalidRedirect_GmStatusCode,
472 { 0x27a0, /* dashed arrow */ 467 { 0x27a0, /* dashed arrow */
473 "Invalid Redirect", 468 "${error.badredirect}",
474 "The server responded with a redirect but did not provide a valid destination URL. " 469 "${error.badredirect.msg}" } },
475 "Perhaps the server is malfunctioning." } },
476 { schemeChangeRedirect_GmStatusCode, 470 { schemeChangeRedirect_GmStatusCode,
477 { 0x27a0, /* dashed arrow */ 471 { 0x27a0, /* dashed arrow */
478 "Scheme-Changing Redirect", 472 "${error.schemeredirect}",
479 "The server attempted to redirect us to a URL whose scheme is different than the " 473 "${error.schemeredirect.msg}"} },
480 "originating URL's scheme. Here is the link so you can open it manually if appropriate."} },
481 { tooManyRedirects_GmStatusCode, 474 { tooManyRedirects_GmStatusCode,
482 { 0x27a0, /* dashed arrow */ 475 { 0x27a0, /* dashed arrow */
483 "Too Many Redirects", 476 "${error.manyredirects}",
484 "You may be stuck in a redirection loop. The next redirected URL is below if you " 477 "${error.manyredirects.msg}"} },
485 "want to continue manually."} },
486 { tlsFailure_GmStatusCode, 478 { tlsFailure_GmStatusCode,
487 { 0x1f5a7, /* networked computers */ 479 { 0x1f5a7, /* networked computers */
488 "Network/TLS Failure", 480 "${error.tls}",
489 "Failed to communicate with the host. Here is the error message:" } }, 481 "${error.tls.msg}" } },
490 { temporaryFailure_GmStatusCode, 482 { temporaryFailure_GmStatusCode,
491 { 0x1f50c, /* electric plug */ 483 { 0x1f50c, /* electric plug */
492 "Temporary Failure", 484 "${error.temporary}",
493 "The request has failed, but may succeed if you try again in the future." } }, 485 "${error.temporary.msg}" } },
494 { serverUnavailable_GmStatusCode, 486 { serverUnavailable_GmStatusCode,
495 { 0x1f525, /* fire */ 487 { 0x1f525, /* fire */
496 "Server Unavailable", 488 "${error.unavail}",
497 "The server is unavailable due to overload or maintenance. Check back later." } }, 489 "${error.unavail.msg}" } },
498 { cgiError_GmStatusCode, 490 { cgiError_GmStatusCode,
499 { 0x1f4a5, /* collision */ 491 { 0x1f4a5, /* collision */
500 "CGI Error", 492 "${error.cgi}",
501 "Failure during dynamic content generation on the server. This may be due " 493 "${error.cgi.msg}" } },
502 "to buggy serverside software." } },
503 { proxyError_GmStatusCode, 494 { proxyError_GmStatusCode,
504 { 0x1f310, /* globe */ 495 { 0x1f310, /* globe */
505 "Proxy Error", 496 "${error.proxy}",
506 "A proxy request failed because the server was unable to successfully " 497 "${error.proxy.msg}" } },
507 "complete a transaction with the remote host. Perhaps there are difficulties "
508 "with network connectivity." } },
509 { slowDown_GmStatusCode, 498 { slowDown_GmStatusCode,
510 { 0x1f40c, /* snail */ 499 { 0x1f40c, /* snail */
511 "Slow Down", 500 "${error.slowdown}",
512 "The server is rate limiting requests. Please wait..." } }, 501 "${error.slowdown.msg}" } },
513 { permanentFailure_GmStatusCode, 502 { permanentFailure_GmStatusCode,
514 { 0x1f6ab, /* no entry */ 503 { 0x1f6ab, /* no entry */
515 "Permanent Failure", 504 "${error.permanent}",
516 "Your request has failed and will fail in the future as well if repeated." } }, 505 "${error.permanent.msg}" } },
517 { notFound_GmStatusCode, 506 { notFound_GmStatusCode,
518 { 0x1f50d, /* magnifying glass */ 507 { 0x1f50d, /* magnifying glass */
519 "Not Found", 508 "${error.notfound}",
520 "The requested resource could not be found at this time." } }, 509 "${error.notfound.msg}" } },
521 { gone_GmStatusCode, 510 { gone_GmStatusCode,
522 { 0x1f47b, /* ghost */ 511 { 0x1f47b, /* ghost */
523 "Gone", 512 "${error.gone}",
524 "The resource requested is no longer available and will not be available again." } }, 513 "${error.gone.msg}" } },
525 { proxyRequestRefused_GmStatusCode, 514 { proxyRequestRefused_GmStatusCode,
526 { 0x1f6c2, /* passport control */ 515 { 0x1f6c2, /* passport control */
527 "Proxy Request Refused", 516 "${error.proxyrefusal}",
528 "The request was for a resource at a domain not served by the server and the " 517 "${error.proxyrefusal.msg}" } },
529 "server does not accept proxy requests." } },
530 { badRequest_GmStatusCode, 518 { badRequest_GmStatusCode,
531 { 0x1f44e, /* thumbs down */ 519 { 0x1f44e, /* thumbs down */
532 "Bad Request", 520 "${error.badrequest}",
533 "The server was unable to parse your request, presumably due to the " 521 "${error.badrequest.msg}" } },
534 "request being malformed." } },
535 { clientCertificateRequired_GmStatusCode, 522 { clientCertificateRequired_GmStatusCode,
536 { 0x1f511, /* key */ 523 { 0x1f511, /* key */
537 "Certificate Required", 524 "${error.cert.needed}",
538 "Access to the requested resource requires identification via " 525 "${error.cert.needed.msg}" } },
539 "a client certificate." } },
540 { certificateNotAuthorized_GmStatusCode, 526 { certificateNotAuthorized_GmStatusCode,
541 { 0x1f512, /* lock */ 527 { 0x1f512, /* lock */
542 "Certificate Not Authorized", 528 "${error.cert.auth}",
543 "The provided client certificate is valid but is not authorized for accessing " 529 "${error.cert.auth.msg}" } },
544 "the requested resource. " } },
545 { certificateNotValid_GmStatusCode, 530 { certificateNotValid_GmStatusCode,
546 { 0x1f6a8, /* revolving light */ 531 { 0x1f6a8, /* revolving light */
547 "Invalid Certificate", 532 "${error.cert.invalid}",
548 "The provided client certificate is expired or invalid." } }, 533 "${error.cert.invalid.msg}" } },
549}; 534};
550 535
551iBool isDefined_GmError(enum iGmStatusCode code) { 536iBool isDefined_GmError(enum iGmStatusCode code) {