Migrate languages.py to spec + code generation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, python
- Lĩnh vực
- build-system, internationalization, tooling
Hướng nghiên cứu
Bắt đầu với le_utils/constants/languages.py, resources/languagelookup.json và scripts/generate_from_specs.py, sau đó xem xét tests/test_languages.py và tests/test_getlangs.py. Xác nhận rằng đặc tả chứa tất cả các mục ngôn ngữ và siêu dữ liệu, quá trình tạo sinh các đầu ra Python và JavaScript, các bài kiểm thử đã cập nhật đều đạt và tệp JSON legacy được xóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
languages should be generated from a spec in the format #182 introduces, and scripts/add_language.py should add new languages to that spec. Its public Python API should not change.
Complexity: High
Target branch: main
Context
languagelookup.jsonholds 286 languages; the 17 RTL ones carry"rtl": true, which becomesLanguage.text_direction.Languagehas five fields and three properties (code,id,first_native_name).getlang_by_nameandgetlang_by_native_namealso match aliases built from the;-,,- and()-separated parts of each name.make add-languagerunsscripts/add_language.py, which writes tolanguagelookup.json.languagelookup.jsonis linked from ricecooker's docs, kolibri-library, sample-channels, cookiecutter-chef, andspec/schema-embed_*_request.jsonin this repo.
The Change
js/Languages.jsshould export the language records and the text direction constants.
Acceptance Criteria
-
le_utils/constants/languages.pyandjs/Languages.jsare generated fromspec/constants-languages.json, andmake buildon a clean checkout leaves no diff. - The pinned-API test from #182 passes unchanged for
languages, andgetlang_by_nameandgetlang_by_native_namereturn the same language as before for every name and alias. -
make add-languageadds a language tospec/constants-languages.json. -
le_utils/resources/languagelookup.jsonis a symlink tospec/constants-languages.json.
AI usage
I made the decisions recorded on #181 and #182; Claude Code applied them to this module against the current code and drafted the issue.
- Ngôn ngữ chính
- Python
- Star
- 7
- Fork
- 37
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của learningequality/le-utils
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
learningequality/le-utils#187 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
learningequality/le-utils#185 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
learningequality/le-utils#184 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
learningequality/le-utils#183 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
learningequality/le-utils#182 ·
Tất cả issue của learningequality/le-utils
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Deepak3699/Ai_Mentor#244 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
btclib-org/btclib-node#1880 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handledCó thể đã có người làm @khuisman đã nhận hôm nay. Đang mởv0.9.2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
khuisman/mcp-gee-sweet#941 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pyjanitor-devs/pyjanitor#1758 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ready for review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
odysseus-dev/odysseus#6641 ·
Maintainer thường phản hồi trong vòng 1 ngày