Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #606 from quran/master
Browse files Browse the repository at this point in the history
Merge master into production
  • Loading branch information
ahmedre authored Jan 20, 2017
2 parents 032f278 + 73f8120 commit 782dbc6
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 35 deletions.
11 changes: 3 additions & 8 deletions src/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,6 @@ const Footer = () => (
</Col>

<Col md={4} sm={12} xs={12} className={styles.links}>
<p className={styles.header}>
<LocaleFormattedMessage
id="local.selectLabel"
defaultMessage="Site Language"
/>
</p>

<div className={styles.list}>
<p className="monserrat">
<LocaleFormattedMessage
Expand All @@ -150,7 +143,9 @@ const Footer = () => (
/>
</p>

<p className="monserrat">&copy; QURAN.COM. ALL RIGHTS RESERVED 2016</p>
<p className="monserrat">
&copy; 2016 Quran.com. <LocaleFormattedMessage id="nav.rightsReserved" defaultMessage="All Rights Reserved" />.
</p>
</div>
</Col>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/components/GlobalSidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,16 @@ class GlobalSidebar extends Component {
className="navbar-text"
onClick={() => handleOpen(false)}
>
<LocaleFormattedMessage id="setting.title" defaultMessage="Quran" />
<LocaleFormattedMessage id="nav.title" defaultMessage="Quran" />
</p>
</NavbarHeader>
</Navbar>
<ul className={styles.list}>
{children}
<li>
<a tabIndex="-1" className="pointer" onClick={() => this.setState({ settingsModalOpen: true }, handleOpen(false))}>
<i className="ss-icon ss-settings vertical-align-middle" />{' '}Settings
<i className="ss-icon ss-settings vertical-align-middle" />{' '}
<LocaleFormattedMessage id="nav.settings" defaultMessage="Settings" />
</a>
</li>
<li>
Expand Down
21 changes: 12 additions & 9 deletions src/components/Line/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ export default class Line extends React.Component {
isPlaying: PropTypes.bool
};

shouldComponentUpdate(nextProps) {
const conditions = [
this.props.currentAyah !== nextProps.currentAyah,
this.props.line !== nextProps.line,
this.props.isPlaying !== nextProps.isPlaying
];

return conditions.some(condition => condition);
}
// NOTE: this is commented out as it caused problems with 55:31 with missing text.
// shouldComponentUpdate(nextProps) {
// const conditions = [
// this.props.currentAyah !== nextProps.currentAyah,
// this.props.line !== nextProps.line,
// this.props.isPlaying !== nextProps.isPlaying
// ];
//
// console.log(conditions, conditions.some(condition => condition));
//
// return conditions.some(condition => condition);
// }

renderText() {
const { tooltip, currentAyah, audioActions, isPlaying, line } = this.props;
Expand Down
15 changes: 11 additions & 4 deletions src/components/SettingsModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import Modal from 'react-bootstrap/lib/Modal';

import LocaleFormattedMessage from 'components/LocaleFormattedMessage';
import ReciterDropdown from 'components/ReciterDropdown';
import ContentDropdown from 'components/ContentDropdown';
import TooltipDropdown from 'components/TooltipDropdown';
Expand Down Expand Up @@ -37,26 +38,32 @@ const SettingsModal = ({
<Modal show={open} onHide={handleHide}>
<ModalHeader closeButton>
<ModalTitle className="montserrat">
Settings
<LocaleFormattedMessage id="setting.title" defaultMessage="Settings" />
</ModalTitle>
</ModalHeader>
<ModalBody>
<div className="form-group">
<h5 className="text-black">Reciters</h5>
<h5 className="text-black">
<LocaleFormattedMessage id="setting.reciters.title" defaultMessage="Reciters" />
</h5>
<ReciterDropdown
onOptionChange={handleOptionChange}
audio={options.audio}
/>
</div>
<div className="form-group">
<h5 className="text-black">Translations</h5>
<h5 className="text-black">
<LocaleFormattedMessage id="setting.translations.title" defaultMessage="Translations" />
</h5>
<ContentDropdown
onOptionChange={handleOptionChange}
content={options.content}
/>
</div>
<div className="form-group">
<h5 className="text-black">Tooltip Content</h5>
<h5 className="text-black">
<LocaleFormattedMessage id="setting.tooltip.title" defaultMessage="Tooltip Content" />
</h5>
<TooltipDropdown
tooltip={options.tooltip}
onOptionChange={setOption}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Word/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class Word extends React.Component {
const className = `${word.className} ${highlight} ${word.highlight ? word.highlight : ''}`;

if (word.charTypeId === CHAR_TYPE_WORD) {
id = `word-${word.ayahKey.replace(/:/, '-')}-${audioPosition}`;
id = `word-${word.ayahKey.replace(/:/, '-')}-${audioPosition || word.position}`;
}

return (
Expand Down
5 changes: 2 additions & 3 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ module.exports = Object.assign({
{ rel: 'apple-touch-icon', sizes: '152x152', href: '/apple-touch-icon-152x152.png' },
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon-180x180.png' },
{ rel: 'preconnect', href: 'https://quran-1f14.kxcdn.com', crossOrigin: '' },
{ rel: 'preconnect', href: 'https://assets-1f14.kxcdn.com', crossOrigin: '' },
{ rel: 'stylesheet', href: 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' }
{ rel: 'preconnect', href: 'https://assets-1f14.kxcdn.com', crossOrigin: '' }
],
/* SEO: https://developers.google.com/structured-data/slsb-overview#markup_examples */
/* SEO: https://developers.google.com/structured-data/site-name#markup_requirements */
script: [
{ src: 'https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.en' },
{ src: 'https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.en', async: '', defer: '' },
{
type: 'application/ld+json',
innerHTML: `{
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/Html.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ const Html = ({ store, component, assets }) => {
{Object.keys(assets.javascript).map((script, i) =>
<script src={assets.javascript[script]} key={i} />
)}
{
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
}
</body>
</html>
);
Expand Down
6 changes: 4 additions & 2 deletions src/locale/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ export default {
'local.changeLocal': 'اختر اللغة التي تود عرض الموقع بها',
'local.navtiveName': 'العربية',
'local.selectLabel': 'اللغة',
'setting.options': 'خيارات',
'setting.title': 'خيارات',
'setting.surahs': 'السورة',
'setting.verses': 'الذهاب إلى الآية',
'setting.reciters': 'القراء',
'setting.reciters.title': 'القراء',
'setting.translations.title': 'الترجمات',
'setting.translations.removeAll': 'حذف الكل',
'setting.translations.english': 'الإنجليزية',
Expand Down Expand Up @@ -61,6 +60,8 @@ export default {
'actions.play': 'لعب',
'actions.pause': 'وقفة',

'nav.title': 'القرآن',
'nav.settings': 'خيارات',
'nav.contribute': 'يساهم',
'nav.aboutUs': 'معلومات عنا',
'nav.developers': 'المطورين',
Expand All @@ -69,6 +70,7 @@ export default {
'nav.contactUs': 'اتصل بنا',
'nav.help': 'مساعدة وتعليقات',
'nav.aboutQuranProject': 'Quran.com المعروف أيضا باسم القرآن الكريم، قناة القرآن الكريم، القرآن الكريم، القرآن الكريم) هو مشروع خيري)', // eslint-disable-line max-len
'nav.rightsReserved': 'كل الحقوق محفوظة',
'nav.mobile': 'التليفون المحمول',
'nav.navigate': 'انتقل',
'nav.legacySite': 'الموقع القديم',
Expand Down
8 changes: 5 additions & 3 deletions src/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ export default {
'local.changeLocal': 'Choose the language you want the site to display with',
'local.navtiveName': 'English',
'local.selectLabel': 'Language',
'setting.options': 'Options',
'setting.title': 'Quran',
'setting.title': 'Settings',
'setting.surahs': 'Surahs',
'setting.verses': 'Go to verse',
'setting.reciters': 'Reciters',
'setting.reciters.title': 'Reciters',
'setting.translations.title': 'Translations',
'setting.translations.removeAll': 'Remove all',
'setting.translations.english': 'English',
Expand Down Expand Up @@ -61,6 +60,8 @@ export default {
'actions.play': 'Play',
'actions.pause': 'Pause',

'nav.title': 'Quran',
'nav.settings': 'Settings',
'nav.contribute': 'Contribute',
'nav.aboutUs': 'About us',
'nav.developers': 'Developers',
Expand All @@ -69,6 +70,7 @@ export default {
'nav.contactUs': 'Contact us',
'nav.help': 'Help & feedback',
'nav.aboutQuranProject': 'Quran.com (also known as The Noble Quran, Al Quran, Holy Quran, Koran) is a pro bono project.', // eslint-disable-line max-len
'nav.rightsReserved': 'All Rights Reserved',
'nav.mobile': 'Mobile Apps',
'nav.navigate': 'Navigate',
'nav.legacySite': 'Legacy Quran.com',
Expand Down
6 changes: 4 additions & 2 deletions src/locale/ur.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ export default {
'local.changeLocal': 'جس زبان میں سایٹ دیکہنا چاہتے ہیں اس زبان کا انتخاب کریں',
'local.navtiveName': 'اردو',
'local.selectLabel': 'زبان',
'setting.options': 'اختیارات',
'setting.title': 'اختیارات',
'setting.surahs': 'سورة',
'setting.verses': 'آیت منتخب کریں',
'setting.reciters': 'قاری منتخب کریں',
'setting.reciters.title': 'قاری منتخب کریں',
'setting.translations.title': 'ترجمے',
'setting.translations.removeAll': 'سب کو ہٹا دیں',
'setting.translations.english': 'انگریزی',
Expand Down Expand Up @@ -61,6 +60,8 @@ export default {
'actions.play': 'چلاو',
'actions.pause': 'روک دیں',

'nav.title': 'قرآن',
'nav.settings': 'اختیارات',
'nav.contribute': 'تعاون کریں',
'nav.aboutUs': 'ہمارے متعلق',
'nav.developers': 'ڈویلپرز',
Expand All @@ -69,6 +70,7 @@ export default {
'nav.contactUs': 'ہم سے رابطہ',
'nav.help': 'مدد اور تاثرات',
'nav.aboutQuranProject': 'قرآن کریم ایک فلاں عامہ (عوامی بہبود کے لئے) منصوبہ ہے',
'nav.rightsReserved': 'جملہ حقوق محفوظ ہیں',
'nav.mobile': 'موبائل',
'nav.navigate': 'تشریف لے جائیں',
'nav.legacySite': 'پرانی سائٹ',
Expand Down
1 change: 0 additions & 1 deletion src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ $tracker-height-hundred-boolean: false;

$font-family-sans-serif: 'Montserrat', sans-serif;
$font-montserrat: $font-family-sans-serif;
$font-awesome: 'FontAwesome', serif;
$icon-font-path: "bootstrap-sass/assets/fonts";

@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/variables";

0 comments on commit 782dbc6

Please sign in to comment.