Gettext usage with cariable in the middle of a sentence

You need to pass substitutions as keyword list to the gettext function. It does not magically know about variables like #{} does.

title = obj.title
gettext("Location and date for %{title} has changed!", title: title)
4 Likes