diff options
-rw-r--r-- | po/en.po | 139 | ||||
-rw-r--r-- | res/lang/en.bin | bin | 11916 -> 15248 bytes | |||
-rw-r--r-- | src/gmutil.c | 107 |
3 files changed, 185 insertions, 61 deletions
@@ -1076,3 +1076,142 @@ msgstr "Next tab" | |||
1076 | 1076 | ||
1077 | msgid "keys.hoverurl" | 1077 | msgid "keys.hoverurl" |
1078 | msgstr "Toggle show URL on hover" | 1078 | msgstr "Toggle show URL on hover" |
1079 | |||
1080 | msgid "error.badstatus" | ||
1081 | msgstr "Unknown Status Code" | ||
1082 | |||
1083 | msgid "error.badstatus.msg" | ||
1084 | msgstr "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 | |||
1086 | msgid "error.openfile" | ||
1087 | msgstr "Failed to Open File" | ||
1088 | |||
1089 | msgid "error.openfile.msg" | ||
1090 | msgstr "The requested file does not exist or is inaccessible. Please check the file path." | ||
1091 | |||
1092 | msgid "error.badresource" | ||
1093 | msgstr "Invalid Resource" | ||
1094 | |||
1095 | msgid "error.badresource.msg" | ||
1096 | msgstr "The requested resource does not exist." | ||
1097 | |||
1098 | msgid "error.unsupported.media" | ||
1099 | msgstr "Unsupported Content Type" | ||
1100 | |||
1101 | msgid "error.unsupported.media.msg" | ||
1102 | msgstr "The received content cannot be viewed with this application." | ||
1103 | |||
1104 | msgid "error.unsupported.protocol" | ||
1105 | msgstr "Unsupported Protocol" | ||
1106 | |||
1107 | msgid "error.unsupported.protocol.msg" | ||
1108 | msgstr "The requested protocol is not supported by this application." | ||
1109 | |||
1110 | msgid "error.badheader" | ||
1111 | msgstr "Invalid Header" | ||
1112 | |||
1113 | msgid "error.badheader.msg" | ||
1114 | msgstr "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 | |||
1116 | msgid "error.badredirect" | ||
1117 | msgstr "Invalid Redirect" | ||
1118 | |||
1119 | msgid "error.badredirect.msg" | ||
1120 | msgstr "The server responded with a redirect but did not provide a valid destination URL. Perhaps the server is malfunctioning." | ||
1121 | |||
1122 | msgid "error.schemeredirect" | ||
1123 | msgstr "Scheme-Changing Redirect" | ||
1124 | |||
1125 | msgid "error.schemeredirect.msg" | ||
1126 | msgstr "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 | |||
1128 | msgid "error.manyredirects" | ||
1129 | msgstr "Too Many Redirects" | ||
1130 | |||
1131 | msgid "error.manyredirects.msg" | ||
1132 | msgstr "You may be stuck in a redirection loop. The next redirected URL is below if you want to continue manually." | ||
1133 | |||
1134 | msgid "error.tls" | ||
1135 | msgstr "Network/TLS Failure" | ||
1136 | |||
1137 | msgid "error.tls.msg" | ||
1138 | msgstr "Failed to communicate with the server. Here is the error message:" | ||
1139 | |||
1140 | msgid "error.temporary" | ||
1141 | msgstr "Temporary Failure" | ||
1142 | |||
1143 | msgid "error.temporary.msg" | ||
1144 | msgstr "The request has failed, but may succeed if you try again in the future." | ||
1145 | |||
1146 | msgid "error.unavail" | ||
1147 | msgstr "Server Unavailable" | ||
1148 | |||
1149 | msgid "error.unavail.msg" | ||
1150 | msgstr "The server is unavailable due to overload or maintenance. Check back later." | ||
1151 | |||
1152 | msgid "error.cgi" | ||
1153 | msgstr "CGI Error" | ||
1154 | |||
1155 | msgid "error.cgi.msg" | ||
1156 | msgstr "Failure during dynamic content generation on the server. This may be due to malfunctioning serverside software." | ||
1157 | |||
1158 | msgid "error.proxy" | ||
1159 | msgstr "Proxy Error" | ||
1160 | |||
1161 | msgid "error.proxy.msg" | ||
1162 | msgstr "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 | |||
1164 | msgid "error.slowdown" | ||
1165 | msgstr "Slow Down" | ||
1166 | |||
1167 | msgid "error.slowdown.msg" | ||
1168 | msgstr "The server is rate limiting requests. Please wait..." | ||
1169 | |||
1170 | msgid "error.permanent" | ||
1171 | msgstr "Permanent Failure" | ||
1172 | |||
1173 | msgid "error.permanent.msg" | ||
1174 | msgstr "Your request has failed and will fail in the future as well if repeated." | ||
1175 | |||
1176 | msgid "error.notfound" | ||
1177 | msgstr "Not Found" | ||
1178 | |||
1179 | msgid "error.notfound.msg" | ||
1180 | msgstr "The requested resource could not be found at this time." | ||
1181 | |||
1182 | msgid "error.gone" | ||
1183 | msgstr "Gone" | ||
1184 | |||
1185 | msgid "error.gone.msg" | ||
1186 | msgstr "The requested resource is no longer available." | ||
1187 | |||
1188 | msgid "error.proxyrefusal" | ||
1189 | msgstr "Proxy Request Refused" | ||
1190 | |||
1191 | msgid "error.proxyrefusal.msg" | ||
1192 | msgstr "The request was for a resource at a domain not served by the server and the server does not accept proxy requests." | ||
1193 | |||
1194 | msgid "error.badrequest" | ||
1195 | msgstr "Bad Request" | ||
1196 | |||
1197 | msgid "error.badrequest.msg" | ||
1198 | msgstr "The server did not understand your request." | ||
1199 | |||
1200 | msgid "error.cert.needed" | ||
1201 | msgstr "Certificate Required" | ||
1202 | |||
1203 | msgid "error.cert.needed.msg" | ||
1204 | msgstr "Access to the requested resource requires identification via a client certificate." | ||
1205 | |||
1206 | msgid "error.cert.auth" | ||
1207 | msgstr "Certificate Not Authorized" | ||
1208 | |||
1209 | msgid "error.cert.auth.msg" | ||
1210 | msgstr "The provided client certificate is valid but is not authorized for accessing the requested resource." | ||
1211 | |||
1212 | msgid "error.cert.invalid" | ||
1213 | msgstr "Invalid Certificate" | ||
1214 | |||
1215 | msgid "error.cert.invalid.msg" | ||
1216 | msgstr "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 | ||
551 | iBool isDefined_GmError(enum iGmStatusCode code) { | 536 | iBool isDefined_GmError(enum iGmStatusCode code) { |