codeforboston / maple

MAPLE makes it easy for anyone to view and submit testimony to the Massachusetts Legislature about the bills that will shape our future.
https://mapletestimony.org
MIT License
42 stars 110 forks source link

Extract text to translation-ready files -- Learn Testimony Components #946

Open sashamaryl opened 1 year ago

sashamaryl commented 1 year ago

Move user-visible text from this section into json files in the public/locales/en folder in the components, use the next-i18next 'useTranslation' hook to connect the text from the json files

you'll decide how to group and name your text in a way that makes sense for your section by default, make separate json files following the structure of the project pages/folders, but feel free to diverge from that

make sure to get titles, headers, buttons, labels, and alt text put common words, labels, etc in the common.json file

some pages have already been extracted more or less into files next to or near the component files, usually with the same file name with 'content' on the end. That text needs to be moved as above, and it's up to you what to do with the content file.

mardelvalle commented 1 year ago

@sashamaryl I would be interested in this issue. Could I be assigned to it?

mardelvalle commented 1 year ago

Also will the items in BasicsContent need translation as well? I imagine if that is the case we need to move that variable into the component body to have useTranslation work right?

timblais commented 1 year ago

Still needed as of 06/06 review