suttacentral icon indicating copy to clipboard operation
suttacentral copied to clipboard

Set default search document language for new users

Open thesunshade opened this issue 1 year ago • 1 comments

User story

Ulga is excited to use SuttaCentral.net for the first time. Because she has her browser language set to Deutsch, The site interface is in German and German translations are featured.

When she does a search for the first time, she also sees only results in German texts:

image

It's clear that if she wants to search in other documents that she will need to click "Change".

Feature description

  • The document language choice in search should be set by default to the user's chosen browser language.
  • No root texts should be selected by default
  • If their browser language does not exist on SC, then English should be set

Acceptance criteria (the list of things that need to be done for the ticket to be considered finished):

  • [ ] test to make sure that both de-DE and de-AT both result in Deutsch being set
  • [ ] Unless the user clears their browser cache, this should never be reset. For example if someone with the browser language Deutsch actively chooses Pali and English as their language documents for search, it should never change back to Deutsch unless they do it intentionally or their cache is cleared (assuming there is no way to avoid that)
  • [ ] No root languages should be selected by default. Currently all root languages are selected.

Pre milestone planning check:

  • [ ] Small enough to completed in a milestone.
  • [ ] Dependencies marked
  • [ ] No external dependencies block the PBI from being completed.
  • [ ] Details are understood by dev team to decide if the PBI can be completed.

Done check:

  • [ ] Produced code for presumed functionalities
  • [ ] Project builds without errors
  • [ ] Peer Code Review performed/pull request approved x2
  • [ ] Project deployed on the stage environment identical to production platform
  • [ ] Feature is tested against acceptance criteria
  • [ ] Feature ok-ed by Product Owner (moving to Closed on the Board)
  • [ ] Refactoring completed
  • [ ] Any configuration or build changes documented (readme, etc...)

thesunshade avatar Jan 30 '24 23:01 thesunshade

Thanks for proposing this, Bhante @thesunshade, that would indeed be good.

Not sure if this belongs here, but at least on my computer, suttacentral.net still opens in English in an incognito browser. Although now the mixing with German has disappeared.

sabbamitta avatar Jan 31 '24 11:01 sabbamitta