diff --git a/nanoc/rules/random.rules b/nanoc/rules/random.rules index 4ec994c..f81c9fd 100644 --- a/nanoc/rules/random.rules +++ b/nanoc/rules/random.rules @@ -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 diff --git a/src/html/random.html.erb b/src/html/random.html.erb index 83fbb5f..450dcc6 100644 --- a/src/html/random.html.erb +++ b/src/html/random.html.erb @@ -1,7 +1,7 @@ - + - <%= title %> + <%= t(context.locale, "TheNobleQuran") %> <%= inline_json("/slugs.json") %> diff --git a/src/html/redirect.html.erb b/src/html/redirect.html.erb index 9fe2f57..0126903 100644 --- a/src/html/redirect.html.erb +++ b/src/html/redirect.html.erb @@ -1,8 +1,10 @@ + - Al-Quran + <%= t("en", "TheNobleQuran") %> - + +