DigitalCommons / mykomap

A web application for mapping initiatives in the Solidarity Economy
3 stars 0 forks source link

Use Typescript to ensure built-in localised phrases are defined #189

Closed wu-lee closed 1 year ago

wu-lee commented 1 year ago

Currently a Javascript object keyed with identifiers and populated with strings is used for each supported language.

This could use Typescript's type checking to ensure that all languages define all required phrases, but it doesn't.

Let's do that.

We do also need to allow for arbitrary languages, rather than hardwiring in an arbitrary collection. That's for another issue, but for this one, bear in mind how that will be implemented, so that type safety can be maintained as much as possible.

wu-lee commented 1 year ago

This now done, in a7d377