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 #849 from korabh/master
Browse files Browse the repository at this point in the history
Add .sq locale
  • Loading branch information
naveed-ahmad authored Sep 16, 2017
2 parents 212e60a + 5fe4446 commit 71c52d6
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 17 deletions.
31 changes: 19 additions & 12 deletions src/components/Verse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ class Verse extends Component {
const { verse, match } = this.props;
const array = match || verse.translations || [];

return array.map(translation => (
return array.map(translation =>
<Translation
translation={translation}
index={translation.id}
key={translation.id}
/>
));
);
}

renderMedia() {
Expand All @@ -78,7 +78,7 @@ class Verse extends Component {

return (
<div>
{verse.mediaContents.map((content, index) => (
{verse.mediaContents.map((content, index) =>
<div className={`${styles.translation} translation`} key={index}>
<h2 className="text-translation times-new">
<small>
Expand All @@ -100,7 +100,7 @@ class Verse extends Component {
</small>
</h2>
</div>
))}
)}
</div>
);
}
Expand All @@ -118,7 +118,7 @@ class Verse extends Component {
let wordAudioPosition = -1;
const renderText = false; // userAgent.isBot;

const text = verse.words.map((word) => ( // eslint-disable-line
const text = verse.words.map(word =>
<Word
word={word}
key={`${word.position}-${word.code}-${word.lineNum}`}
Expand All @@ -132,7 +132,7 @@ class Verse extends Component {
isSearched={isSearched}
useTextFont={renderText}
/>
));
);

return (
<h1 className={`${styles.font} text-right text-arabic`}>
Expand All @@ -157,9 +157,10 @@ class Verse extends Component {
className="text-muted"
>
<i
className={`ss-icon ${playing ? 'ss-pause' : 'ss-play'} vertical-align-middle`}
/>
{' '}
className={`ss-icon ${playing
? 'ss-pause'
: 'ss-play'} vertical-align-middle`}
/>{' '}
<LocaleFormattedMessage
id={playing ? 'actions.pause' : 'actions.play'}
defaultMessage={playing ? 'Pause' : 'Play'}
Expand All @@ -178,10 +179,16 @@ class Verse extends Component {
<a
tabIndex="-1"
className="text-muted"
onClick={() => this.props.loadTafsirs(verse)}
onClick={() =>
this.props.loadTafsirs(
verse,
<LocaleFormattedMessage
id="tafsir.select"
defaultMessage={'Select a tafsir'}
/>
)}
>
<i className="ss-book vertical-align-middle" />
{' '}
<i className="ss-book vertical-align-middle" />{' '}
<LocaleFormattedMessage
id={'actions.tafsir'}
defaultMessage={'Tafsir'}
Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const locales = {
ar: 'العربية',
ur: 'اردو',
id: 'Bahasa Indonesia',
sq: 'Shqip',
tr: 'Türkçe',
fr: 'Français',
nl: 'Dutch'
Expand Down
97 changes: 97 additions & 0 deletions src/locale/sq.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// jscs:disable disallowQuotedKeysInObjects
export default {
messages: {
local: 'shqip',
'local.siteLocale': 'Gjuha e Faqes',
'local.changeLocal': 'Zgjidhni gjuhën në të cilën doni ta shihni këtë faqe',
'local.nativeName': 'Shqip',
'local.selectLabel': 'Gjuha',
'setting.title': 'Opsionet',
'setting.chapters': 'Suret',
'setting.verses': 'Shkoni te ajeti',
'setting.reciters.title': 'Recituesit',
'setting.translations.title': 'Perkthimet',
'setting.translations.removeAll': 'Fshini të gjitha',
'setting.translations.english': 'Anglisht',
'setting.translations.other': 'Gjuhë të tjera',
'setting.fontSize': 'Madhësia e shkronjave',
'setting.fontSize.arabic': 'Arabisht',
'setting.reading': 'Duke lexuar',
'setting.tooltip': 'Përmbajtja sqaruese',
'setting.tooltip.title': 'Paraqitja e sqarimit',
'setting.tooltip.translation': 'Përkthimi',
'setting.tooltip.transliteration': 'Transliterimi',
'setting.nightMode': 'Stili i natës',
'setting.nightMode.dayTip': 'Kaloni në stilin e ditës',
'setting.nightMode.nightTip': 'Kaloni në stilin e natës',

'ayah.media.lectureFrom': 'Shikoni video komentimin nga {from}',
'ayah.bookmarked': 'E ruajtur',
'ayah.bookmark': 'Ruaj',
'ayah.notFound': 'Ajeti nuk u gjet',

'search.placeholder': 'Kërko "Nuh"',
'search.resultHeading':
'{from}-{to} OF <span> {total} </span> REZULTATET E KËRKIMIT PËR <span>{query}</span>', // eslint-disable-line max-len
'search.error': 'Na vjen keq, ndodhi një problem me kërkimin tuaj.',
'search.nothing': 'Nuk keni shkruar ndonjë gjë për të filluar kërkimin.',
'search.noResult': 'Nuk u gjet ndonjë rezultat.',

'surah.next': 'VAZHDONI',
'surah.previous': 'KTHEHUNI',
'surah.info': 'Informacione për Suren',
'surah.index.heading': 'SURET (KAPITUJT)',
'surah.index.continue': 'Vazhdoni',
'surah.index.quickLinks': 'Lidhje të Shpejta',
'surah.goToBeginning': 'Fillimi i Sures',
'surah.read': 'Lexoni Suren e plotë',

'player.currentVerse': 'Ajeti',
'player.nextAyah': 'Ajeti i Ardhshëm',
'player.previousAyah': 'Ajeti i Kaluar',
'player.repeat.title': 'PËRSËRIT',
'player.repeat.single': 'Single',
'player.repeat.range': 'Intervali',
'player.repeat.rangeStart': 'Nga',
'player.repeat.rangeEnd': 'Deri',
'player.repeat.times': 'Herë',
'player.repeat.loop': 'përsërit',
'player.scrollButtonTip':
'Zhvendoset automatikisht te ajeti që është duke u lexuar momentalisht', // eslint-disable-line max-len

'app.loading': 'Duke u hapur...',
'actions.copy': 'Kopjoni',
'actions.copied': 'U kopjua!',
'actions.play': 'Lëshojeni',
'actions.pause': 'Ndaleni',
'actions.tafsir': 'Tefsir',

tafsirs: 'Tefsir',
'tafsir.select': 'Zgjidhni një tefsir',

'nav.title': 'Kurani',
'nav.settings': 'Opsionet',
'nav.contribute': 'Kontribuoni',
'nav.aboutUs': 'Rreth nesh',
'nav.developers': 'Zhvilluesit',
'nav.usefulSites': 'Faqe të dobishme',
'nav.otherLinks': 'Lidhje të tjera',
'nav.contactUs': 'Na kontaktoni',
'nav.help': 'Ndihma & këshillimet',
'nav.aboutQuranProject':
"Quran.com (i njohur ndryshe si Kurani Fisnik, Kurani, Kur'ani) është një projekt vullnetar.", // eslint-disable-line max-len
'nav.rightsReserved': 'Të Gjitha të Drejtat e Rezervuara.',
'nav.mobile': 'Aplikacionet Mobile',
'nav.navigate': 'Navigoni',
'nav.legacySite': 'Legacy Quran.com',

'juz.index.heading': 'Xhuzi',

'login.message':
'Kyçuni në Quran.com për të ruajtur tv gjitha memorizimet, shënimet dhe aktivitetet tuaja',
'error.invalid-surah':
"Surja është jashtë intervalit. Ju lutemi, shkoni te <a href='/'> faqja fillestare </a> dhe zgjidhni një Sure.",
'error.invalid-ayah':
"Ajeti është jashtë intervalit. Ju lutemi, shkloni te <a href='/'> faqja fillestare </a> dhe zgjidhni një Sure/Ajet."
}
};
5 changes: 3 additions & 2 deletions src/redux/actions/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ export const removeMedia = () => ({
type: REMOVE_MEDIA
});

export const loadTafsirs = verse => ({
export const loadTafsirs = (verse, title) => ({
types: [LOAD_TAFISRS, LOAD_TAFISRS_SUCCESS],
promise: client => client.get('/api/v3/options/tafsirs'),
verse
verse,
title
});

export const loadFootNote = footNoteId => ({
Expand Down
7 changes: 4 additions & 3 deletions src/redux/modules/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function reducer(state = initialState, action = {}) {
size: 'small',
wrapperClass: '',
content: {
title: 'Select a tafsir'
title: action.title
}
};
}
Expand All @@ -55,7 +55,7 @@ export default function reducer(state = initialState, action = {}) {
loading: false,
content: {
body: buildTafsirList(action.result.tafsirs, action.verse),
title: 'Select a tafsir'
title: action.title
}
};
}
Expand All @@ -76,7 +76,8 @@ export default function reducer(state = initialState, action = {}) {
size: 'large',
wrapperClass: 'text-translation foote-note-text',
content: {
body: `<small class='${action.result.footNote.languageName}'>${action.result.footNote.text}</small>`,
body: `<small class='${action.result.footNote.languageName}'>${action
.result.footNote.text}</small>`,
title: 'Foot note'
}
};
Expand Down

0 comments on commit 71c52d6

Please sign in to comment.