Closed shahednasser closed 2 years ago
you mean tafseer, right?
yes. I think we just need to add the Arabic option from this endpoint:
http://api.alquran.cloud/v1/edition/type/translation
to the array returned in getTranslationLanguageIdentifier
in options.js
.
the _locale string is not displayed even though I added a message in messages.json
for the arabic language. I am attaching related screenshots!
You need to refresh your extension from chrome://extensions in order for localized strings to update.
the tafsir is available only in arabic language! check it out at this endpoint :- https://api.alquran.cloud/v1/edition/type/tafsir
You just need to add the identifier from this endpoint to the select list. Then, when it is selected in the options the tafsir will be fetched based on the identifier.
yes, but the tafsir is only available in arabic, so it will not be visible for any other language
It doesn't matter. The endpoint that retrieves the translation will work for both.
umm... sorry, I don't get it. Can you elaborate?
In the options, the user only needs to choose the language for the translation. The value of the language is the identifier used to retrieve the translation from the endpoint https://api.alquran.cloud/v1/ayah/<VERSE_NUMBER>/editions/quran-uthmani-min,<TRANSLATION_IDENTIFIER>
Where <VERSE_NUMBER>
is the number of the verse to be translated and <TRANSLATION_IDENTIFIER>
is the identifier for either the translations which we already support, or the new tafsir we're adding with the identifier ar.muyassar
. For example: https://api.alquran.cloud/v1/ayah/255/editions/quran-uthmani-min,ar.muyassar
So, we just need to add the new option in the options with the identifier ar.muyassar
. Then, when it's selected the tafsir will be shown on the new tab page under "Quran Translation". The same will apply for other languages.
got it and done! I am making a pull request!
Based on feedback from a user, we should add explanations for Ayah in Arabic.