quran.com-frontend icon indicating copy to clipboard operation
quran.com-frontend copied to clipboard

Unable to turn of all translations

Open azizur opened this issue 8 years ago • 7 comments

It's not possible to remove/turn off all translations.

When you remove Translations using "Remove All" button screen shot 2017-09-15 at 08 40 18

When you choose a translation. screen shot 2017-09-15 at 08 40 39

azizur avatar Sep 15 '17 07:09 azizur

Is this Issue still open ??

bahaa96 avatar Jul 18 '18 09:07 bahaa96

@bahaa96 yes

naveed-ahmad avatar Jul 20 '18 21:07 naveed-ahmad

Haven't had time to fully look at this bug but FYI to anyone looking at it, the issue goes away if you change:

https://github.com/quran/quran.com-frontend/blob/c4e2d9943c980e71ab63f6cf43f82dbc6763c6b4/src/redux/actions/verses.js#L20-L22

from

const defaultOptions = {
  translations: [102]  
};

to

const defaultOptions = {
  translations: []
};

I'm not sure what else breaks when you do this. It seems like an issue in the prepareParams function if translations is empty because it doesn't handle the empty case in the if statement.

aliasaria avatar Aug 12 '18 22:08 aliasaria

But we want to show default translation when user load the page initially.

naveed-ahmad avatar Aug 12 '18 22:08 naveed-ahmad

Yes my note above isn't a fix. Just wanted to jot down a note so that if someone else picks this up they know where to start looking.

aliasaria avatar Aug 13 '18 00:08 aliasaria

I can pick it up soon

mmahalwy avatar Aug 13 '18 18:08 mmahalwy

  • when deactivated, translations defaults back to 'sahih international'
  • on page reload first page is loaded without translations
  • scrolling down loads verses with default 'sahih international' translation
  • behavior is correct if set to another translation as said above seems empty translation setting is only taken into consideration with first loaded page

rdhia avatar Feb 14 '19 11:02 rdhia