Localize random and redirect pages
This commit is contained in:
parent
058fabd46b
commit
f720df5cda
3 changed files with 8 additions and 6 deletions
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
locales.each do |locale|
|
locales.each do |locale|
|
||||||
compile "/html/random.html.erb", rep: "random/#{locale}" do
|
compile "/html/random.html.erb", rep: "random/#{locale}" do
|
||||||
title = i18n[locale].TheNobleQuran
|
context = Ryo.from({locale:})
|
||||||
filter(:erb, locals: {locale:, title:})
|
filter(:erb, locals: {context:})
|
||||||
write("/#{locale}/random/index.html")
|
write("/#{locale}/random/index.html")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="<%= context.locale %>">
|
||||||
<head>
|
<head>
|
||||||
<title><%= title %></title>
|
<title><%= t(context.locale, "TheNobleQuran") %></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%= inline_json("/slugs.json") %>
|
<%= inline_json("/slugs.json") %>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Al-Quran</title>
|
<title><%= t("en", "TheNobleQuran") %></title>
|
||||||
<link rel="icon" href="/favicon.png">
|
<link rel="icon" href="/favicon.png">
|
||||||
<script src="/js/pages/redirect.js"></script>
|
<script src="/js/pages/redirect.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body></body>
|
<body>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue