SMC-Connect SMS is San Mateo County's customized version of Ohana SMS, a Ruby on Rails application that allows people in need who lack access to the internet to find human services via SMS.
You can try the service by sending a 5-digit ZIP code to these numbers:
English: 650-227-9909
Spanish: 650-802-8934
- Ruby version 2.5.7
- Rails version 5.2.0
- Testing Frameworks: MiniTest
You'll need a Ruby development environment on your computer, and a Twilio account.
If you're on a Mac, the easiest way to get up and running is to run @monfresh's laptop script. On Linux, you'll need to install Build tools, Ruby with RVM, and Node.js.
Once your environment is ready to go, install the app:
git clone [email protected]:smcgov/ohana-sms-smc.git && cd ohana-sms-smc
bin/setup
If you're a maintainer of the San Mateo County version of Ohana SMS, you will need access to San Mateo County's Twilio account. Otherwise, if you're interested in deploying your own version of Ohana SMS, please refer to the Ohana SMS instructions.
- Once logged in to your Twilio account, visit the Account Settings page.
- Copy your AuthToken and paste it in
config/application.yml
next totwilio_auth_token
.
SMC-Connect SMS is already deployed to Heroku. If you're a maintainer of SMC-Connect SMS, please request access to San Mateo County's Heroku account.
Currently, what can be translated are the greetings and instructions. The search results content, such as the Location names, or the short descriptions, are not translated.
To modify the existing translations, you can edit them directly on GitHub if you have write access to this repo. Here are the edit links for the English and Spanish text.
To translate the messages into a new language, copy and paste the contents of
config/locales/en.yml
into a new file in config/locales
with a filename
corresponding to the language's two-character code, and with a .yml
extension. Then translate the text from English into your desired language.
See config/locales/es.yml
as an example. For more details, read the
Rails Internationalization Guide.
Once your translations are in place, buy a new number in your Twilio account that will be used for a particular language. Then follow these instructions:
-
Go to the Twilio Manage Numbers page and click on your number.
-
Under
Messaging
, inRequest URL
, enterhttps://ohana-sms-smc.herokuapp.com/locations/reply?locale=[language_code]
, where[language_code]
is the 2-letter code for your desired language. For example, French would be?locale=fr
. -
Select
HTTP GET
from the dropdown, and clickSave
.
Run tests locally with this command:
script/test
To see the actual tests, browse through the test directory.
Created by Moncef Belyamani.
Inspired by and built upon the work of Mark Silverberg.
This project is dedicated to the public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.