openoakland / opendisclosure

THIS PROJECT IS UNMAINTAINED - SEE: https://github.com/caciviclab/odca-jekyll AND https://github.com/caciviclab/disclosure-backend-static
http://opendisclosure.io/
49 stars 40 forks source link

Extract hardcoded strings into i18n library #369

Open evanwolf opened 9 years ago

evanwolf commented 9 years ago

We have lots of info hard-coded in our app. Let's 1. make a list of them and 2. spec where to move the data and how to name/describe the variables so C. volunteers can sign up to unhardcode some without promising to unhardcode the entire app.

evanwolf commented 9 years ago

@mikeubell @tdooner Is there a particular way to approach this that works best?

tdooner commented 9 years ago

Uh, most strings are in the views, so here as well as here. As for un-hardcoding them, I haven't put too much thought into it, however the common Ruby pattern is to use some internationalization library to extract them into a configuration file. This would give us better mojo to translate the strings into other languages and also make it easier for other places to customize the copy.