Open naveed-ahmad opened 6 years ago
More fields usually aren't an issue; parsers just have to not make too many assumptions. This is especially true if we mark fields as required or optional.
author: {
name: 'name in native language',
email: 'email',
url: 'url',
translatedNames: {
en: 'name in english',
ur: 'name in urdu'
},
bio: {
en: 'bio in english',
ur: 'bio is urdu'
}
}
👍
I like the idea of structuring the data instead of it being flat.
How we can see the previous version of translations?
I don't think this is too important. Yes, it may be useful at times, but it does't seem to be worth the added complexity.
Aassalamu alaikum wa rahmatullah wa barakatuh!
archive
which will contain all versions.By the way, how about combining meta data with translation in one JSON? Like one translation - one JSON file. That would be more convenient to maintain.
Good idea, I initially thought that the translations will be in XML or JSON format. But no way in CSV. However, CSV also has an advantage - it is also a good option for [relatively] large flat data. But I for JSON opinion. Still more structured and standardized than CSV
I thought that we could discuss here format of translations, since we decided to combine meta data and text in one JSON. That's why I renamed to question. But then I decided to separate them back because I would become messy. So, I'll create another issue where format of translation text will be discussed.
Talking abut meta data format. Can we agree on following format?
"meta":{
{
"name": "क़ुरआन मजीदको अर्थको नेपाली अनुवाद",
"nameTranslations":{
"en": "Nepali Translation of the Meaning of The Quran Majeed"
},
"language": {
"original": "नेपाली",
"english": "Nepali",
"iso1": "ne",
"iso3": "nep"
},
"author": {
"email": "isanghnp@gmail.com",
"name": "इस्लामी संघ नेपाल",
"bio": null,
"nameTranslations": {
"en": "Islami Sangh Nepal"
},
"bioTranslations":{
"en": "Islami Sangh Nepal..."
}
},
"about": null,
"aboutTranslations":{
"en": null
},
"version":"1.0",
"firstPublished": "2018-05-09",
"lastUpdated": "2018-05-09",
"license": "https://creativecommons.org/licenses/by-nc-nd/4.0/",
"licenseSpecialConditions": null,
"reviewer": {"name":"Azizullah Ansari", "email":"aziznepali@gmail.com"},
"approver": {"name":"Azizullah Ansari", "email": "aziznepali@gmail.com}",
"dataPreparer":{"name":"quranacademy.org", "email":"hqaweb@gmail.com"},
"latestVersionSrc":"https://ne.quranacademy.org/quran",
"latestVersionSrcAlt":"https://github.com/alquran-foundation/translations",
"contactEmails": ["aziznepali@gmail.com", "isanghnp@gmail.com", "themessagektm@gmail.com", "hqaweb@gmail.com"],
}
First I wanted to suggest to structure values like:
"name":{
"original":"क़ुरआन मजीदको अर्थको नेपाली अनुवाद",
"en":"Nepali Translation of the Meaning of The Quran Majeed"
},
It seems more structured. But it is not convenient, taking into account that values in original language usually are most used.
It looks more beautiful in structure, IMHO
@Al-Muhandis do you mean the second one?
I agree, it is a way more beautiful. But let's not forget about people using it. In most cases text in original language is needed. So, I thought that it's not that convenient to type .original
each time.
Two items which come to mind:
riwayah
, since some translations will likely be based on a riwayah other than Hafs (e.g. the Berber translation is likely based on Warsh or Qaloon). If this is not set then Hafs is assumed.suwar
, an array of the translated surah names, since each translation usually has its own translation of them.@rguliev I know what you mean. And I'm now questioning what's best.
@mustafa0x
riwayah, since some translations will likely be based on a riwayah other than Hafs (e.g. the Berber translation is likely based on Warsh or Qaloon). If this is not set then Hafs is assumed.
+ yes kira'ah/riwayah can be an optional field in the translation metadata structure
suwar, an array of the translated surah names, since each translation usually has its own translation of them.
+ and I think an array of the surah names should be placed in the translation part of JSON structure (no in the metadata structure) that is where the text of the ayah translation and of the basmallah translation is stored
and I think an array of the surah names should be placed in the translation part of JSON structure (no in the metadata structure)
This makes sense, but the problem with it is that it forces the developer to do string manipulation, because he will want to display the surah title in a place other than the place where he shows the ayah.
E.g.
<h1>The Opener</h1>
<p class="ayah">بسم الله الرحمن الرحيم</p>
<p class="translation">In the name of Allah</p>
@mustafa0x In the sense that it is inefficient to load the data of the translation text, for example, in the surahs index page?
Current format have some issues, what if we've author bio in many languages? How we can see the previous version of translations? We can add more fields, but it will break the parsers. We ( who are parsing languages to save them into database ) have to change the parsers whenever we add more fileds in meta data. What about following schema ? it will solve these problems, and backword compatiable.
Here is current format for meta data for your reference.