refactor: update weather art descriptions
- Change description to use @weather_art.prompt instead of a translated string with multiple parameters. - Update image_alt method to include the prompt in the descriptive text. These changes simplify the metadata generation for weather art and improve the clarity of the image descriptions by incorporating the prompt, which may provide users with additional context.
This commit is contained in:
parent
7bdf40e176
commit
43ae514242
@ -21,10 +21,11 @@ class WeatherArtsController < ApplicationController
|
|||||||
title: t("meta.weather_arts.show.title",
|
title: t("meta.weather_arts.show.title",
|
||||||
city_name: @city.name,
|
city_name: @city.name,
|
||||||
date: formatted_date),
|
date: formatted_date),
|
||||||
description: t("meta.weather_arts.show.description",
|
description: @weather_art.prompt,
|
||||||
city_name: @city.name,
|
# description: t("meta.weather_arts.show.description",
|
||||||
description: @weather_art.description,
|
# city_name: @city.name,
|
||||||
temperature: @weather_art.temperature),
|
# description: @weather_art.description,
|
||||||
|
# temperature: @weather_art.temperature),
|
||||||
keywords: t("meta.weather_arts.show.keywords",
|
keywords: t("meta.weather_arts.show.keywords",
|
||||||
city_name: @city.name,
|
city_name: @city.name,
|
||||||
country_name: @city.country.name,
|
country_name: @city.country.name,
|
||||||
|
@ -168,7 +168,7 @@ class WeatherArt < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def image_alt
|
def image_alt
|
||||||
"#{self.city.full_name} Weather Art - #{self.description} at #{self.temperature}°C on #{self.formatted_time(:date)}"
|
"#{self.city.full_name} Weather Art - #{self.description} at #{self.temperature}°C on #{self.formatted_time(:date)}, #{self.prompt}"
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
Loading…
Reference in New Issue
Block a user