Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 29 additions & 9 deletions content/glossary/_create_glossaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'EN': 'english',
'AR': 'arabic',
'DE': 'german',
'TR': 'turkish',
}

# Configuration
Expand Down Expand Up @@ -71,10 +72,16 @@ def process_references(references_text, apa_lookup, missing_refs_log=None):
if key in apa_lookup:
formatted_refs.append(apa_lookup[key])
else:
# Log missing reference but don't include in output
if missing_refs_log is not None:
missing_refs_log.add(original_key)
print(f"Warning: Missing reference key '{original_key}' (cleaned: '{key}') - skipping")
# Try case-insensitive match
key_lower = key.lower()
ci_match = next((k for k in apa_lookup if k.lower() == key_lower), None)
if ci_match:
formatted_refs.append(apa_lookup[ci_match])
else:
# Log missing reference but don't include in output
if missing_refs_log is not None:
missing_refs_log.add(original_key)
print(f"Warning: Missing reference key '{original_key}' (cleaned: '{key}') - skipping")

return list(dict.fromkeys(formatted_refs))

Expand All @@ -87,14 +94,18 @@ def safe_get(row, column, default=""):
except Exception:
return default

def clean_filename(title):
def clean_filename(title, max_length=200):
"""Clean title for use as filename"""
# Extract main title (before parentheses)
file_name = title.split(" (")[0].strip()
# Extract main title (before English title in square brackets)
file_name = title.split(" [")[0].strip()
# Replace spaces and special characters
file_name = re.sub(r'[^\w\s]', '_', file_name.replace(" ", "_"))
# Convert to lowercase and clean up multiple underscores
return file_name.lower().strip().replace("__", "_")
file_name = file_name.lower().strip().replace("__", "_")
# Truncate to avoid filesystem limits
if len(file_name) > max_length:
file_name = file_name[:max_length].rstrip("_")
return file_name

# Process languages
formatted_data = {}
Expand Down Expand Up @@ -130,7 +141,16 @@ def clean_filename(title):
title = en_title
else:
localized_title = safe_get(row, f"{language_code}_title")
title = f"{localized_title} ({en_title})" if localized_title else en_title
if localized_title:
# Check if all English title words are already in the localized title
en_words = set(re.sub(r'[^\w\s]', '', en_title).lower().split())
local_words = set(re.sub(r'[^\w\s]', '', localized_title).lower().split())
if en_words <= local_words:
title = localized_title
else:
title = f"{localized_title} [{en_title}]"
else:
title = en_title

# Process references
raw_references = safe_get(row, "Reference")
Expand Down
8,551 changes: 8,032 additions & 519 deletions content/glossary/_glossaries.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion content/glossary/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Click one of the buttons to open the Glossary. Further translations are already

<div class="btn-group flex-wrap text-center"><a href="/glossary/english" class="btn btn-primary py-2 m-1 btn-lg active" style="line-height:1;border-radius:6px">English</a>
<a href="/glossary/german" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px">Deutsch (German)</a>
<a href="/glossary/arabic" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px"> عربي (Arabic)</a></div>
<a href="/glossary/arabic" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px"> عربي (Arabic)</a>
<a href="/glossary/turkish" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px">Türkçe (Turkish)</a></div>

## Background

Expand Down
7 changes: 6 additions & 1 deletion content/glossary/arabic/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ type: "glossary"

<div class="btn-group flex-wrap text-center"><a href="/glossary/english" class="btn btn-primary py-2 m-1 btn-lg active" style="line-height:1;border-radius:6px">English</a>
<a href="/glossary/german" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px">Deutsch (German)</a>
<a href="/glossary/arabic" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px"> عربي (Arabic)</a></div>
<a href="/glossary/arabic" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px"> عربي (Arabic)</a>
<a href="/glossary/turkish" class="btn btn-primary py-2 m-1 btn-lg" style="line-height:1;border-radius:6px">Türkçe (Turkish)</a></div>

### لمحة عامّة

Expand Down Expand Up @@ -78,4 +79,8 @@ type: "glossary"

بعد النّجاح الذي حقّقته المرحلة الأولى، ندعوكم للمساهمة في تحسين هذا المرجع. نحن نسعى للحصول على مساهمات متنوّعة تشمل تحسين التّعريفات الحاليّة، وتوسيع نطاق المصطلحات، بالإضافة إلى ترجمة المصطلحات لتعزيز سهولة الوصول.

---

يمكن الاطلاع على قائمة المراجع الكاملة للقاموس [هنا](/glossary/references).

</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "glossary",
"title": "**ا**لانحياز التَّوكيديّ (Confirmation bias)",
"title": "**ا**لانحياز التَّوكيديّ [Confirmation bias]",
"definition": "The tendency to seek out, interpret, favor and recall information in a way that supports one’s prior values, beliefs, expectations, or hypothesis. **الميل للبحث عن المعلومات، وتفسيرها، وتمييزها، واسترجاعها بطريقة تدعم قيم الشَّخص ومعتقداته، وتوقعاته، أو فرضياته. **المصطلحات ذات الصِّلة:** الانحياز التَّأكيدي، الانحياز الاجتماعيّ (المتوافق)، التَّحيُّز الشَّخصي",
"related_terms": [
"Confirmatory bias",
Expand Down
28 changes: 0 additions & 28 deletions content/glossary/arabic/abstract_bias.md

This file was deleted.

28 changes: 0 additions & 28 deletions content/glossary/arabic/academic_impact.md

This file was deleted.

36 changes: 0 additions & 36 deletions content/glossary/arabic/accessibility.md

This file was deleted.

25 changes: 0 additions & 25 deletions content/glossary/arabic/ad_hominem_bias.md

This file was deleted.

26 changes: 0 additions & 26 deletions content/glossary/arabic/adversarial.md

This file was deleted.

29 changes: 0 additions & 29 deletions content/glossary/arabic/adversarial_collaboration.md

This file was deleted.

24 changes: 0 additions & 24 deletions content/glossary/arabic/affiliation_bias.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "glossary",
"title": "aka Replicability or replication crisis أزمة إعادة الإنتاج أو أزمة التِّكرار (Reproducibility crisis (aka Replicability or replication crisis))",
"title": "aka Replicability or replication crisis أزمة إعادة الإنتاج أو أزمة التِّكرار [Reproducibility crisis (aka Replicability or replication crisis)]",
"definition": "هي اكتشاف، وما تتعلق بها من تحوُّل في التَّفكير، والثَّقافة الأكاديميَّة، إنَّ نسبة كبيرة من الدِّراسات العلميَّة المنشورة في مختلف التَّخصُّصات غير قابلة للتِّكرار (Open Science Collaboration, 2015). ويعزى ذلك للافتقار إلى النَّزاهة، ونقص جودة وسلامة ممارسات البحث والنَّشر- مثل تحيُّز النَّشر- وممارسات البحث المشكوك فيها، والافتقار إلى الشَّفافيَّة؛ ممَّا يؤدِّي إلى تضخم معدَّل النّتائج الإيجابيَّة الخاطئة. ووصف آخرون هذه العمليَّة بأنَّها \"ثورة المصداقيَّة\" نحو تحسين هذه الممارسات. **المصطلحات ذات الصِّلة**: أزمة المصداقيَّة، تحيُّز النَّشر (مشكلة درج الملفَّات) ، ممارسات البحث المشكوك فيها،أو ممارسات إعداد التَّقارير المشكوك فيها، قابليَّة التِّكرار، قابليَّة إعادة الإنتاج.",
"related_terms": [
"Credibility crisis",
Expand Down
Loading