getScript/getDir/isRtl return incorrect data for unrecognised codes containing a script tag

Open
#333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
localization

Research direction

Locate the implementations of getScript, getDir, and isRtl in the language-data codebase and inspect how they handle codes that are not defined. Use the issue's mis-arab example as the starting case. Done means these functions derive the Arabic script and right-to-left direction from the script tag, returning Arab, rtl, and true respectively.

Written by the indexing model from the issue text.

Description

If a language code contains a script tag, getScript, getDir and isRtl should not need the code to be defined, because it already contains the information they need.

e.g. For mis-arab (uncoded language, Arabic script):

$.uls.data.getScript("mis-arab"); currently returns Zyyy instead of Arab.

$.uls.data.getDir("mis-arab"); currently returns ltr instead of rtl.

$.uls.data.isRtl("mis-arab"); currently returns false instead of true.

Dominant language
PHP
Stars
18
Forks
37
Avg merge
1d 5h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wikimedia/language-data

All issues in wikimedia/language-data

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.