Localize random and redirect pages

This commit is contained in:
0x1eef 2023-10-28 06:58:44 -03:00
parent 058fabd46b
commit f720df5cda
3 changed files with 8 additions and 6 deletions

View file

@ -7,8 +7,8 @@
locales.each do |locale|
compile "/html/random.html.erb", rep: "random/#{locale}" do
title = i18n[locale].TheNobleQuran
filter(:erb, locals: {locale:, title:})
context = Ryo.from({locale:})
filter(:erb, locals: {context:})
write("/#{locale}/random/index.html")
end
end

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<html lang="<%= context.locale %>">
<head>
<title><%= title %></title>
<title><%= t(context.locale, "TheNobleQuran") %></title>
</head>
<body>
<%= inline_json("/slugs.json") %>

View file

@ -1,8 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Al-Quran</title>
<title><%= t("en", "TheNobleQuran") %></title>
<link rel="icon" href="/favicon.png">
<script src="/js/pages/redirect.js"></script>
</head>
<body></body>
<body>
</body>
</html>