Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal to support alternate translations. #37

Merged
merged 4 commits into from
Aug 18, 2016
Merged

Proposal to support alternate translations. #37

merged 4 commits into from
Aug 18, 2016

Conversation

PaulRashidi
Copy link
Contributor

This is primarily to start discussions about whether this is the correct structure.

@aaronj1335
Copy link
Contributor

Pros: straightforward logic to falling back to english
Cons: every locale gets all translations

Other tradeoffs? Thoughts?

@aaronj1335
Copy link
Contributor

Also, what's our mechanism for observing the change? Specifically, when you change languages and then go to the checklist, how does that activity know that you've changed?

@PaulRashidi
Copy link
Contributor Author

This CL is a proposal to change the underlying FirebaseDB schema. Your question about changing languages is more of a client side switch which would then potentially listen and/or select data from this schema differently.

Pros: This initial proposal forces a relationship between the list items and translations by embedding them underneath as overrides. This makes it easier to update the data in the DB because you simply need to insert it underneath the correct element.
Cons: As initially proposed the alternate language data would be embedded underneath the checklist item. This would result in every client loading all of the alternate language translations when querying for a checklist item.

@aaronj1335
Copy link
Contributor

Those tradeoffs make sense, and I think the proposal is the right way to go.

So if we went with this proposal, given that we're just using a ref of all the checklist items in the activity, how would the activity know to use different strings when the user changes the language?

@PaulRashidi
Copy link
Contributor Author

Client side, the logic needs to look to see whether the user choose a system override in the language screen I'm building. If they did it would load the defaults as well as the override. It would overlay the override values over the default values.

@PaulRashidi
Copy link
Contributor Author

As discussed, Alt2 allows text overrides at the list level. This prevent clients from having to download all of the languages when using an alternate language.

@aaronj1335
Copy link
Contributor

:shipit:

@PaulRashidi PaulRashidi merged commit 947f924 into g11x:master Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants