Twin-Cities-Mutual-Aid / twin-cities-aid-distribution-locations

A webapp to coordinate aid and care in the Twin Cities.
43 stars 32 forks source link

Create new bash script for generating language translations #280

Closed Dthurow closed 3 years ago

Dthurow commented 3 years ago

Background/The Problem When working on #264, I was pulling from a google spreadsheet that lists all language translations (https://docs.google.com/spreadsheets/d/1XH6Nd4cnP6Ul5oU7vRzJYoB80_V56FzWwa0Vfc2Tabk/edit#gid=0) but the Language_Translation documentation assumes you're pulling from a spreadsheet that is for an individual language only. This means the script used to generate the JSON file for the website only works if you have an individual language spreadsheet, or make your own. This was time consuming and confusing for a newbie (me), and it seems simpler to have a script that lets you get info directly from the spreadsheet that contains all the translations.

Work for this issue Make a script that lets you do this:

  1. Download the translation spreadsheet as a TSV
  2. run the script and pass in the location of the spreadsheet on your computer, and the column number of the language you want to translate
  3. it will spit out a json object you can drop in the website to support translations in that language