MotherTongues / mothertongues-UI

1 stars 2 forks source link

Mother Tongues Dictionaries UI (MTD-UI)

:construction: This repo is under construction and could change drastically in the coming months with breaking changes. :construction:

license standard-readme compliant

MTD is an open-source tool that allow language communities and developers to quickly and inexpensively make their dictionary data digitally accessible. MTD-UI is a tool that visualizes dictionary data that is prepared with MTD.

Please visit the website or docs for more information.

Table of Contents

Background

This is a basic Ionic app for displaying Mother Tongues Dictionaries data. Other frontends are in development.

Note - Just because you can make an online dictionary does not mean you should. Before making a dictionary, you must have clear consent from the language community in order to publish a dictionary. For some background on why this is important, please read sections 1 and 2.1 here

Installation

You must have Node 16+ installed to run this app.

  1. Install dependencies npm install
  2. Serve app: npx nx serve mtd-mobile-ui (note you have to have some dictionary data generated from MTD for this to work)
  3. Build app: npx nx build mtd-mobile-ui

Usage

In order to use MTD-UI you must have generated dictionary data from MTD. Then, either fork or clone this repo and put the dictionary_data.json file in the packages/mtd-mobile-ui/src/assets folder. You can then run the app by running npx nx serve mtd-mobile-ui.

Advanced

Part of how all MTD-UI's work is by following a statically typed format of what the data and configurations look like. If you change the type definitions in MTD you will have to update them here as well. To do that, after you make your changes to the Pydantic type definitions in MTD, you can export them using mothertongues schema main packages/schemas/mtd.json. Then run npx nx run-many -t pre-build to generate the TypeScript modules from the JSON schemas. You may have to update the UI and/or search library following these changes.

Unfortunately, json-schema-to-typescript does not support prefixItems, so we annoyingly manually change, change prefixItems to items in the schema until the issue is fixed. See https://github.com/bcherny/json-schema-to-typescript/issues/543

Contributing

PRs accepted. If you would like to create more MTD-UIs those are also accepted.

Acknowledgements

MTD-UI has had significant help from a huge number of people including but not limited to Patrick Littell, Mark Turin, & Lisa Matthewson.

As well as institutional support from the First Peoples' Cultural Council and SSHRC Insight Grant 435-2016-1694, ‘Enhancing Lexical Resources for BC First Nations Languages’.

License

MIT © Aidan Pine.