Skip to content

Commit

Permalink
docs(i18n): add instructions for agency-specific copy
Browse files Browse the repository at this point in the history
  • Loading branch information
machikoyasuda committed Aug 9, 2023
1 parent a586202 commit e84ac70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/development/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Add English copy to templates directly first. Then, run the helper script, `bin/

Find the English copy in the Spanish `django.po` file as a `msgid`, and add the corresponding Spanish translation as the `msgstr`. Again, run the helper script for formatting and `bin/init.sh` to confirm the translation is rendered properly.

### Adding agency-specific copy

When templates have different copy per agency, create a new template for that agency-specific copy to live in. See the example of the MST-specific agency index page file, named [`index--mst.html`](https://github.com/cal-itp/benefits/blob/dev/benefits/core/templates/core/index--mst.html). Include the agency-specific template file name in the migration object, as done here for [MST](https://github.com/cal-itp/benefits/blob/dev/benefits/core/migrations/0002_data.py#L260), with `eligibility_index_template="eligibility/index--mst.html"`.

### Fuzzy strings

From [Django docs](https://docs.djangoproject.com/en/4.0/topics/i18n/translation/#message-files):
Expand Down

0 comments on commit e84ac70

Please sign in to comment.