Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

WIP: Default translations in app #39

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

beausmith
Copy link
Contributor

@beausmith beausmith commented Jun 30, 2020

This is a WIP which does not fully implement the solution.

Problem

Election Manager should have the default strings it needs without requiring them to be in the election definition.

Solution

@eventualbuddha and I discussed that this may be better achieved with an update to the ballot-encoder method withLocale() where we update it to accept an additional defaultStrings param:

const spanishElection = withLocale(election, 'es-US', defaultStrings)

The withLocale fallback logic should be:

  1. election definition: target locale value
  2. app default: target locale value
  3. election definition: primary locale value
  4. app default: primary locale value

Status… want to discuss with @eventualbuddha to ensure this is the most solid solution.

@beausmith beausmith changed the title Default translations in app WIP: Default translations in app Jun 30, 2020
@beausmith beausmith removed the request for review from eventualbuddha September 10, 2020 16:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant