Add translation json_query vars to error pages thanks to @l29utp0

This commit is contained in:
Thomas Lynch
2023-06-04 12:51:34 +10:00
parent 22b6b4795e
commit fa4680aaa6
11 changed files with 68 additions and 21 deletions

View File

@ -21,10 +21,12 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">Bad Request.</h3>
<h3 class="pt">
%[var(txn.lang_json),json_query($.Bad Request\.)]
</h3>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -16,10 +16,12 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">You look like a robot.</h3>
<h3 class="pt">
%[var(txn.lang_json),json_query($.You look like a robot\.)]
</h3>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -16,10 +16,12 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">Request Time-out.</h3>
<h3 class="pt">
%[var(txn.lang_json),json_query($.Request Time-out\.)]
</h3>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -16,10 +16,12 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">Slow down, you look like a robot.</h3>
<h3 class="pt">
%[var(txn.lang_json),json_query($."Slow down, you look like a robot.")]
</h3>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -16,10 +16,12 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">Internal Server Error, please try again later.</h3>
<h3 class="pt">
%[var(txn.lang_json),json_query($."Internal Server Error, please try again later\.")]
</h3>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -16,10 +16,12 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">Bad Gateway.</h3>
<h3 class="pt">
%[var(txn.lang_json),json_query($.Bad Gateway\.)]
</h3>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -16,11 +16,15 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">Service Unavailable.</h3>
<p>Sorry, the backend is unreachable or down for essential maintenance. Try again soon!</p>
<h3 class="pt">
%[var(txn.lang_json),json_query($.Service Unavailable\.)]
</h3>
<p>
%[var(txn.lang_json),json_query($."Sorry, the backend is unreachable or down for essential maintenance\. Try again soon!")]
</p>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -16,11 +16,15 @@ footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-t
</style>
</head>
<body>
<h3 class="pt">Gateway Time-out.</h3>
<p>Sorry, the backend is unreachable or down for essential maintenance. Try again soon!</p>
<h3 class="pt">
%[var(txn.lang_json),json_query($.Gateway Time-out\.)]
</h3>
<p>
%[var(txn.lang_json),json_query($."Sorry, the backend is unreachable or down for essential maintenance\. Try again soon!")]
</p>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>
<p>%[var(txn.lang_json),json_query($.Performance & security by BasedFlare)]</p>
</footer>
</body>
</html>

View File

@ -19,5 +19,14 @@
"Run this in a linux terminal (requires <code>argon2</code> package installed):": "Run this in a linux terminal (requires <code>argon2</code> package installed):",
"Run this in a linux terminal (requires <code>perl</code>):": "Run this in a linux terminal (requires <code>perl</code>):",
"Paste the script output into the box and submit:": "Paste the script output into the box and submit:",
"submit": "submit"
"submit": "submit",
"Bad Request.": "Bad Request.",
"You look like a robot.": "You look like a robot.",
"Request Time-out.": "Request Time-out.",
"Slow down, you look like a robot.": "Slow down, you look like a robot.",
"Internal Server Error, please try again later.": "Internal Server Error, please try again later.",
"Bad Gateway.": "Bad Gateway.",
"Service Unavailable.": "Service Unavailable.",
"Sorry, the backend is unreachable or down for essential maintenance. Try again soon!": "Sorry, the backend is unreachable or down for essential maintenance. Try again soon!",
"Gateway Time-out.": "Gateway Time-out."
}

View File

@ -19,5 +19,14 @@
"Run this in a linux terminal (requires <code>argon2</code> package installed):": "Corre isto num terminal linux (requer package <code>argon2</code> instalada):",
"Run this in a linux terminal (requires <code>perl</code>):": "Corre isto num terminal linux (requer <code>perl</code>):",
"Paste the script output into the box and submit:": "Cola o output do script na caixa e envia:",
"submit": "enviar"
"submit": "enviar",
"Bad Request.": "Mau Pedido.",
"You look like a robot.": "Pareces um robô.",
"Request Time-out.": "Time-out de pedido.",
"Slow down, you look like a robot.": "Devagar, pareces um robô.",
"Internal Server Error, please try again later.": "Erro Interno do Servidor, por favor tenta outra vez mais tarde.",
"Bad Gateway.": "Má Porta",
"Service Unavailable.": "Serviço Indisponível",
"Sorry, the backend is unreachable or down for essential maintenance. Try again soon!": "Desculpa, o servidor não está acessível ou está em manutenção. Tenta outra vez em breve!",
"Gateway Time-out.": "Time-out de Porta"
}

View File

@ -19,5 +19,14 @@
"Run this in a linux terminal (requires <code>argon2</code> package installed):": "Corre isto num terminal linux (requer package <code>argon2</code> instalada):",
"Run this in a linux terminal (requires <code>perl</code>):": "Corre isto num terminal linux (requer <code>perl</code>):",
"Paste the script output into the box and submit:": "Cola o output do script na caixa e envia:",
"submit": "enviar"
"submit": "enviar",
"Bad Request.": "Mau Pedido.",
"You look like a robot.": "Pareces um robô.",
"Request Time-out.": "Time-out de pedido.",
"Slow down, you look like a robot.": "Devagar, pareces um robô.",
"Internal Server Error, please try again later.": "Erro Interno do Servidor, por favor tenta outra vez mais tarde.",
"Bad Gateway.": "Má Porta",
"Service Unavailable.": "Serviço Indisponível",
"Sorry, the backend is unreachable or down for essential maintenance. Try again soon!": "Desculpa, o servidor não está acessível ou está em manutenção. Tenta outra vez em breve!",
"Gateway Time-out.": "Time-out de Porta"
}