Use I18n texts for image dimensions

This way it'll be possible to customize the text in languages not using
parenthesis or not using an "x" to define dimensions.
This commit is contained in:
Javi Martín
2024-10-11 21:56:53 +02:00
parent b82d7032ba
commit 8213f23629
3 changed files with 5 additions and 1 deletions

View File

@@ -20,6 +20,8 @@ class Admin::SiteCustomization::Images::IndexComponent < ApplicationComponent
end
def image_hint(image)
"(#{image.required_width}x#{image.required_height})"
t("admin.site_customization.images.index.dimensions",
width: image.required_width,
height: image.required_height)
end
end

View File

@@ -1615,6 +1615,7 @@ en:
subnavigation_right: Main Navigation Right
images:
index:
dimensions: "(%{width}x%{height})"
title: Custom images
update: Update
image: Image

View File

@@ -1615,6 +1615,7 @@ es:
subnavigation_right: Navegación principal derecha
images:
index:
dimensions: "(%{width}x%{height})"
title: Personalizar imágenes
update: Actualizar
image: Imagen