Interpolate inside a yaml list?
I know I can do:
开发者_C百科en:
greeting:
hello, %{name}!
t('greeting', {:name => "homie"}) => "hello, homie!"
but how can I do:
en:
greetings:
- Hey, %{name}
- Wassup, %{name}
? It appears that interpolation is not performed on lists... Is there a way to do this?
You have to explicitly tell yaml what is multiline. That's the role of |
en:
greetings: |
- Hey, %{name}
- Wassup, %{name}
精彩评论