commit - 7fe298914bbcb0cd81163a8cea0ad58cd052bf4c
commit + d970d54e140e80a272ebbe128ed3052ea907db8b
blob - 78e8e807b34180306bff1e0ef54dfbd1c53ca16e
blob + 31a71fc77f2b3ca6f6ab6687a6a092a097517ad9
--- gtransl.retro
+++ gtransl.retro
~~~
'\r\n s:format 'CRLF s:const
-:vgi:print-line (s-) CRLF s:append s:put ;
+:vgi:print-line (s-) s:put CRLF s:put ;
:vgi:user-input '10_Text_🔁: vgi:print-line #0 unix:exit ;
:vgi:not-found '51_Not_found vgi:print-line #0 unix:exit ;
:vgi:bad-request '59_Bad_request vgi:print-line #0 unix:exit ;
blob - /dev/null
blob + 02bc4a140c1df314015098d60a1d4962eaeaa696 (mode 644)
--- /dev/null
+++ tests/resp_limit-02.html
+<!DOCTYPE html><html dir="ltr" lang="en-US"><head><title>Google Translate</title><meta name="google" content="notranslate"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="//ssl.gstatic.com/translate/favicon.ico" sizes="64x64"><style nonce="iE98ic0uCR_ICj5TCmNqyw">
+ body {
+ font-family: 'Arial', sans-serif;
+ margin: 0;
+ }
+ a:link,
+ a:visited,
+ a:active {
+ color: #1a73e8; /* blue 600 */
+ text-decoration: none;
+ }
+ .header {
+ background-color: #fff;
+ border-bottom: 1px solid #dadce0; /* grey 300 */
+ box-sizing: border-box;
+ color: #5f6368; /* grey 700 */
+ font-size: 18px;
+ line-height: 21px;
+ padding: 14px 16px;
+ }
+ .logo-image {
+ background-image: url('https://ssl.gstatic.com/images/branding/googlelogo/svg/googlelogo_clr_68x28px.svg');
+ background-repeat: no-repeat;
+ height: 48px;
+ width: 68px;
+ position: absolute;
+ }
+ .logo-text {
+ margin-left: 72px;
+ margin-right: 76px;
+ margin-top: 2px;
+ }
+
+ body {
+ background-color: #f1f3f4; /* grey 100 */
+ }
+ .languages-container {
+ background-color: #fff;
+ border-bottom: 1px solid #dadce0; /* grey 300 */
+ box-sizing: border-box;
+ color: #3c4043; /* grey 800 */
+ font-size: 14px;
+ height: 48px;
+ padding: 14px 16px;
+ }
+ .sl-and-tl {
+ display: inline-block;
+ }
+ .swap-container {
+ float: right;
+ }
+ html[dir="rtl"] .swap-container {
+ float: left;
+ }
+ .input-container {
+ background-color: #fff;
+ box-shadow:
+ 0px -1px 5px rgba(128, 134, 139, 0.09),
+ 0px 3px 5px rgba(128, 134, 139, 0.06),
+ 0px 1px 2px rgba(60, 64, 67, 0.3),
+ 0px 1px 3px rgba(60, 64, 67, 0.15);
+ }
+ .input-field {
+ border: 0;
+ color: #3c4043; /* grey 800 */
+ font-size: 18px;
+ line-height: 24px;
+ padding: 18px 16px;
+ width: 100%;
+ }
+ .translate-button-container {
+ padding: 16px;
+ text-align: right;
+ }
+ html[dir="rtl"] .translate-button-container {
+ text-align: left;
+ }
+ .translate-button {
+ background: #1a73e8; /* blue 600 */
+ border-radius: 4px;
+ color: #fff;
+ font-size: 14px;
+ line-height: 20px;
+ padding: 8px 16px;
+ }
+ .result-container {
+ background: #1a73e8; /* blue 600 */
+ box-shadow:
+ 0px -1px 5px rgba(128, 134, 139, 0.09),
+ 0px 3px 5px rgba(128, 134, 139, 0.06),
+ 0px 1px 2px rgba(60, 64, 67, 0.3),
+ 0px 1px 3px rgba(60, 64, 67, 0.15);
+ color: #fff;
+ font-size: 18px;
+ line-height: 24px;
+ margin-bottom: 50px;
+ padding: 16px 16px 40px 16px;
+ }
+ .links-container a {
+ color: #1967d2; /* blue 700 */
+ }
+ .links-container ul {
+ font-size: 12px;
+ line-height: 16px;
+ list-style-type: none;
+ margin: 16px;
+ padding: 0;
+ }
+ .links-container ul li {
+ margin-bottom: 16px;
+ }
+ </style></head><body><div class="header"><div class="logo-image"></div><div class="logo-text">Translate</div></div><div class="languages-container"><div class="sl-and-tl"><a href="./m?sl=en&tl=ru&q=%40Misofist%20has%20pointed%20out%20that%20I%20probably%20misinterpreted%20something%20in%20this%20video%3B%20that%20the%20upload%20is%20done%20after%20you%20pick%20the%20photo%2C%20but%20before%20you%20post.%20I%20think%20the%20Facebook%20UI%20reflects%20this%20by%20putting%20in%20a%20placeholder%20and%20then%20updating%20it%20once%20the%20upload%20is%20done.%20I%20don%27t%20believe%20Instagram%20has%20a%20similar%20indication%2C%20but%20the%20video%20does%20say%20it%20happens%20while%20typing%20the%20caption.%20So%20you%20could%20reasonably%20argue%20that%20you%20have%20given%20implied%20consent%20for%20an%20upload%2C%20even%20if%20the%20convention%20is%20to%20wait%20for%20the%20button%20press.&mui=sl&hl=en-US">English</a> → <a href="./m?sl=en&tl=ru&q=%40Misofist%20has%20pointed%20out%20that%20I%20probably%20misinterpreted%20something%20in%20this%20video%3B%20that%20the%20upload%20is%20done%20after%20you%20pick%20the%20photo%2C%20but%20before%20you%20post.%20I%20think%20the%20Facebook%20UI%20reflects%20this%20by%20putting%20in%20a%20placeholder%20and%20then%20updating%20it%20once%20the%20upload%20is%20done.%20I%20don%27t%20believe%20Instagram%20has%20a%20similar%20indication%2C%20but%20the%20video%20does%20say%20it%20happens%20while%20typing%20the%20caption.%20So%20you%20could%20reasonably%20argue%20that%20you%20have%20given%20implied%20consent%20for%20an%20upload%2C%20even%20if%20the%20convention%20is%20to%20wait%20for%20the%20button%20press.&mui=tl&hl=en-US">Russian</a></div><div class="swap-container"><a href="./m?sl=ru&tl=en&q=%40Misofist%20%D1%83%D0%BA%D0%B0%D0%B7%D0%B0%D0%BB%2C%20%D1%87%D1%82%D0%BE%20%D1%8F%2C%20%D0%B2%D0%B5%D1%80%D0%BE%D1%8F%D1%82%D0%BD%D0%BE%2C%20%D0%BD%D0%B5%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D0%BB%D1%8C%D0%BD%D0%BE%20%D0%BF%D0%BE%D0%BD%D1%8F%D0%BB%20%D1%87%D1%82%D0%BE-%D1%82%D0%BE%20%D0%B2%20%D1%8D%D1%82%D0%BE%D0%BC%20%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE%3B%20%D1%87%D1%82%D0%BE%20%D0%B7%D0%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B0%D1%81%D0%B8%D0%B5%20%D0%BD%D0%B0%20%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BA%D1%83%2C%20%D0%B4%D0%B0%D0%B6%D0%B5%20%D0%B5%D1%81%D0%BB%D0%B8%20%D0%BF%D1%80%D0%B8%D0%BD%D1%8F%D1%82%D0%BE%20%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%20%D0%BD%D0%B0%D0%B6%D0%B0%D1%82%D0%B8%D1%8F%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D0%B8.&hl=en-US">Swap</a></div></div><div class="input-container"><form action="/m"><input type="hidden" name="sl" value="en"><input type="hidden" name="tl" value="ru"><input type="hidden" name="hl" value="en-US"><input type="text" aria-label="Source text" name="q" class="input-field" maxlength="2048" value="@Misofist has pointed out that I probably misinterpreted something in this video; that the upload is done after you pick the photo, but before you post. I think the Facebook UI reflects this by putting in a placeholder and then updating it once the upload is done. I don't believe Instagram has a similar indication, but the video does say it happens while typing the caption. So you could reasonably argue that you have given implied consent for an upload, even if the convention is to wait for the button press."><div class="translate-button-container"><input type="submit" value="Translate" class="translate-button"></div></form></div><div class="result-container">@Misofist указал, что я, вероятно, неправильно понял что-то в этом видео; что загрузка выполняется после того, как вы выбрали фотографию, но до того, как вы ее опубликуете. Я думаю, что пользовательский интерфейс Facebook отражает это, помещая заполнитель и затем обновляя его после завершения загрузки. Я не думаю, что у Instagram есть подобное указание, но в видео говорится, что это происходит во время ввода подписи. Поэтому вы можете обоснованно утверждать, что вы дали подразумеваемое согласие на загрузку, даже если принято ждать нажатия кнопки.</div><div class="links-container"><ul><li><a href="https://www.google.com/m?hl=en-US">Google home</a></li><li><a href="https://www.google.com/tools/feedback/survey/xhtml?productId=95112&hl=en-US">Send feedback</a></li><li><a href="https://www.google.com/intl/en-US/policies">Privacy and terms</a></li><li><a href="./full">Switch to full site</a></li></ul></div></body></html>
\ No newline at end of file
blob - b54dcd8d1b57d2589951c4a9840201c030883327
blob + a6eb007e813eaea53768878b15d566310928a446
--- tests/tests.sh
+++ tests/tests.sh
echo "gemini://any-key.press/vgi/gtransl/auto/ru/?Once%20upon%20a%20midnight%20dreary%2C%0AWhile%20I%20pondered%2C%20weak%20and%20weary%2C%0AOver%20many%20a%20quaint%20and%20curious%0AVolume%20of%20forgotten%20lore%E2%80%94%0AWhile%20I%20nodded%2C%20nearly%20napping%2C%0ASuddenly%20there%20came%20a%20tapping%2C%0AAs%20of%20some%20one%20gently%20rapping%2C%0ARapping%20at%20my%20chamber%20door.%0A%22%27T%20is%20some%20visitor%2C%22%20I%20muttered%2C%0A%22Tapping%20at%20my%20chamber%20door%0AOnly%20this%20and%20nothing%20more.%22%20%0AAh%2C%20distinctly%20I%20remember%2C%0AIt%20was%20in%20the%20bleak%20December%2C%0AAnd%20each%20separate%20dying%20ember%0AWrought%20its%20ghost%20upon%20the%20floor.%0AEagerly%20I%20wished%20the%20morrow%3B%0AVainly%20I%20had%20sought%20to%20borrow%0AFrom%20my%20books%20surcease%20of%20sorrow%0ASorrow%20for%20the%20lost%20Lenore%E2%80%94%0AFor%20the%20rare%20and%20radiant%20maiden%0AWhom%20the%20angels%20name%20Lenore%E2%80%94%0ANameless%20here%20for%20evermore." | \
GTRANSLRESPFILE=tests/resp_limit-01.html ./gtransl.retro | head -n 30 | tail -n 1 | \
grep "^Безымянной здесь навеки." > /dev/null && echo "passed" || echo "FAILED"
+echo "gemini://any-key.press/vgi/gtransl/sl/tl/?query" | \
+ GTRANSLRESPFILE=tests/resp_limit-02.html ./gtransl.retro | tail -n 3 | head -n 1 | \
+ grep "^@Misofist указал," > /dev/null && echo "passed" || echo "FAILED"
+echo "gemini://any-key.press/vgi/gtransl/sl/tl/?query" | \
+ GTRANSLRESPFILE=tests/resp_limit-02.html ./gtransl.retro | tail -n 2 | head -n 1 | \
+ grep "^\`\`\`" > /dev/null && echo "passed" || echo "FAILED"