diff --git a/db/pages/accessibility.rb b/db/pages/accessibility.rb
index 663196505..661a82412 100644
--- a/db/pages/accessibility.rb
+++ b/db/pages/accessibility.rb
@@ -28,10 +28,12 @@ def generate_content(page)
"
I18n.t("pages.accessibility.keyboard_shortcuts.navigation_table.rows").each do |row|
- content << "
+ if row.present?
+ content << "
| #{row[:key_column]} |
#{row[:page_column]} |
"
+ end
end
content << "
@@ -52,10 +54,12 @@ def generate_content(page)
"
I18n.t("pages.accessibility.keyboard_shortcuts.browser_table.rows").each do |row|
- content << "
+ if row.present?
+ content << "
| #{row[:browser_column]} |
#{row[:key_column]} |
"
+ end
end
content << "
@@ -74,17 +78,21 @@ def generate_content(page)
"
I18n.t("pages.accessibility.textsize.browser_settings_table.rows").each do |row|
- content << "
+ if row.present?
+ content << "
| #{row[:browser_column]} |
#{row[:action_column]} |
"
+ end
end
content << "
"
content << "#{I18n.t("pages.accessibility.textsize.browser_shortcuts_table.description")}
"
I18n.t("pages.accessibility.textsize.browser_shortcuts_table.rows").each do |row|
- content << "- #{row[:shortcut_column]} #{row[:description_column]}
"
+ if row.present?
+ content << "- #{row[:shortcut_column]} #{row[:description_column]}
"
+ end
end
content << "
#{I18n.t("pages.accessibility.compatibility.title")}
@@ -98,9 +106,8 @@ if SiteCustomization::Page.find_by(slug: "accessibility").nil?
page = SiteCustomization::Page.new(slug: "accessibility", status: "published")
generate_content(page)
I18n.available_locales.each do |locale|
- I18n.locale = locale
+ I18n.locale = locale
translation = page.translations.build(locale: locale)
- # Not generating content for :fa, :id and it translations, as they are causing error in line 32
- generate_content(translation) unless locale == :fa or locale == :id or locale == :it
+ generate_content(translation)
end
end