Skip to content

feat: add built-in Arabic localization - #14389

Merged
cderv merged 5 commits into
quarto-dev:mainfrom
ezAldinWaez:feat/add-arabic-localization
Nov 5, 2026
Merged

cderv merged 5 commits into
quarto-dev:mainfrom
ezAldinWaez:feat/add-arabic-localization

Conversation

@ezAldinWaez

@ezAldinWaez ezAldinWaez commented Apr 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds the built-in Arabic (ar) localization file following the BCP 47 IETF language tag standard.

Changes:

  1. Created src/resources/language/_language-ar.yml duplicating all keys from the _language.yml default.
  2. Verified exact key count parity (111 keys) with the English fallback to ensure flawless UI operations.
  3. Used standard formal Arabic Technical terms (MSA) for both scientific/manuscript contexts (e.g., references, appendices, footnotes) and programming/UI components (e.g., source code, listings, callouts etc.).
  4. Added _language-ar.yml directly to the supported language table in src/resources/language/README.md.

Testing

  • Locally rendered a .qmd sample file with lang: ar to ensure the correct application of key translations across callouts, categories, and cross-references.

Checklist

Copilot AI review requested due to automatic review settings April 19, 2026 06:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds built-in Arabic (ar) localization resources to Quarto’s bundled language pack, and documents Arabic as a supported built-in translation.

Changes:

  • Added src/resources/language/_language-ar.yml with Arabic translations for the default language keys.
  • Updated src/resources/language/README.md to include Arabic in the built-in translations table.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/resources/language/_language-ar.yml Introduces Arabic translations for Quarto UI/crossref strings.
src/resources/language/README.md Documents Arabic as a built-in localization option.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/resources/language/_language-ar.yml Resolved
Comment thread src/resources/language/_language-ar.yml Resolved
Comment thread src/resources/language/README.md Resolved
@cscheid

cscheid commented Apr 20, 2026

Copy link
Copy Markdown
Member

Thanks for the PR. I would like to avoid LLM-generated localizations, and I get the sense that your PR was opened with LLM help, especially given the unrelated change to Korean:

image

Can you please review this manually before we go any further?

@ezAldinWaez

Copy link
Copy Markdown
Contributor Author

Can you please review this manually before we go any further?

honestly i did use some LLM help, but I did manually review every value in its context.

e.g: in Arabic, both 'الملاحق' and 'الملحقات' are acceptable translations for 'Appendices' (section-title-appendices), but 'الملاحق' is the most used in the academic context.

for the Korean change i'm not sure if it belongs here. happy to drop it if that’s cleaner.

@cscheid

cscheid commented Apr 20, 2026

Copy link
Copy Markdown
Member

Yes, please either drop the Korean change or move it to a separate request.

For localization changes we try to get at least one independent review before merging. I'll get back to you on this.

@ezAldinWaez
ezAldinWaez force-pushed the feat/add-arabic-localization branch from cb70332 to 2a6e362 Compare April 23, 2026 17:27
@posit-snyk-bot

posit-snyk-bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv cderv left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

_language-ar.yml is missing 8 keys that exist in the base _language.yml on main. They were added recently, after the file was written, so they need an Arabic translation added to _language-ar.yml.

  • skip-to-content
  • navigation-site-label
  • navigation-section-label
  • navigation-toolbar-label
  • navigation-page-label
  • navigation-breadcrumbs-label
  • scrollable-code-label
  • scrollable-output-label

Could you add them ? For the five navigation-*-label ones, the translator rules are in the comment right above them in the base file, mainly that the value should not contain the word for "navigation" because screen readers already announce the landmark role.

# Landmark labels. Two rules for translators:
# 1. Do not include the word "navigation". Screen readers announce the role after
# the label (https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).
# 2. Use a noun, not a bare adjective. In several languages the adjective cannot
# stand alone without the noun it agrees with.
navigation-site-label: "Site"
navigation-section-label: "Section"
navigation-toolbar-label: "Toolbar"
navigation-page-label: "Page"
navigation-breadcrumbs-label: "Breadcrumbs"

I also have one question on a value. I don't speak Arabic, so I used AI tooling (Lara MCP) to help me review the file. We do that to be sure everything is fine. So I want to be upfront about that.

Everything else looked consistent to it, but it raised crossref-lem-title ("التوطئة"). It reads it back as "Preamble", while a direct translation of "Lemma" gave something closer to "sub-theorem" (مبرهنة فرعية). Is "التوطئة" the term usually used for a lemma in Arabic math writing ? It also noted that environment-remark-title ("الملاحظة") is the same word as callout-note-title ("ملاحظة"), so Remark and Note end up with the same label. That may well be fine, I just can't judge it.

These are questions only, not requests to change anything. I will ask a native speaker to do a final review of the translations before we merge.

Reviewing means verifying translatation makes sense with there English counterpart in https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/language/_language.yml

Comment thread src/resources/language/_language-ar.yml Resolved
Comment thread src/resources/language/_language-ar.yml Resolved
cderv added 2 commits November 5, 2026 15:56
…alization

# Conflicts:
#	src/resources/language/README.md
The language parity test fails on any key missing from a language
file, and 11 keys were added to _language.yml after this file was
written. Their values are machine translations made with each key's
translator note as context, then checked by two independent AI
reviewers that agreed on every value: the same process as the other
languages in quarto-dev#14822. Native-speaker review is requested on the PR.

Also adds the changelog entry.
@cderv

cderv commented Nov 5, 2026

Copy link
Copy Markdown
Member

Thanks for your patience on this one. I updated the branch with main and added the 11 keys that were added to _language.yml since the PR was opened, so that the new language parity test passes. I also added the changelog entry, and we'll merge this for 1.12.

These 11 values are AI-generated: a machine translation using the translator notes in _language.yml, then checked by two independent AI reviewers, same process we used for the other languages in #14822.

Key Value
skip-to-content الانتقال إلى المحتوى الرئيسي
navigation-site-label الموقع
navigation-section-label القسم
navigation-toolbar-label شريط الأدوات
navigation-page-label الصفحة
navigation-breadcrumbs-label مسار الصفحات
scrollable-code-label كود قابل للتمرير
scrollable-output-label إخراج قابل للتمرير
link-external-newwindow-label (يفتح في علامة تبويب جديدة)
announcement-dismiss-label إغلاق الإعلان
revealjs-menu-button-label قائمة الشرائح

For my earlier questions, "التوطئة" is the term Arabic Wikipedia uses for named lemmas (Euclid's lemma, Borel–Cantelli lemma), and many of the other languages also use the same word for Remark and Note, so I kept the values as they are.

If anything needs a change after this, in these values or others like section-title-citation suggested by @omar-rs, a new PR on top of this one is very welcome.

@cderv cderv mentioned this pull request Nov 5, 2026
Suggested by a native speaker in the review of this PR. The section
heads "For attribution, please cite this work as:", which this word
(attribution) fits.

Co-authored-by: omar-rs <55405342+omar-rs@users.noreply.github.com>
@cderv
cderv merged commit 1a60dcc into quarto-dev:main Nov 5, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants