Rails gives us a shortcut here:

When calling the `t` method with a key starting with a `.`, like <%= t '.key' %>, the key gets prefixed with a path computes out of the current template path. So in this example we're in the template `pages/formatting.html.erb`, the extensions get stripped, underscores in front of the filename get stripped and and slashes (`/`) get replaced by dots (`.`). So it would generate `pages.formatting` as prefix. If you now just wrote `<%= t '.lists_code2' %>` it would therefore be expanded to `<%= t 'pages.formatting.lists_code2' %>`, exactly what you have here already.