[FEATURE] Extend Maithili exception translations (ZeroDivisionError, IndentationError, ImportError, ...)

未关闭 适合新手
#37 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
半天
新手友好度
66/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
冷清
技术栈
python
领域
localization

调研方向

从 maithili_dsl/transpiler/linter.py(约第 14 行)中的 translate_exception_to_maithili 开始,阅读现有的 translations 字典以匹配其格式。为列出的异常添加条目,然后在 tests/test_linter.py 中为每个条目添加一个测试,该测试抛出该异常并断言迈蒂利语文本。完成标准是每个新类型都返回准确的迈蒂利语文本且其测试通过;措辞需要迈蒂利语母语者审阅。

由索引模型根据 Issue 内容生成。

描述

area:linter enhancement good first issue P3 translation

translate_exception_to_maithili (maithili_dsl/transpiler/linter.py:14) translates only 7 exception types (SyntaxError, NameError, TypeError, ValueError, AttributeError, IndexError, KeyError). Common learner-facing exceptions fall through to the generic English-ish fallback.

Add translations for at least:

  • ZeroDivisionError (dividing by ०)
  • IndentationError
  • ImportError / ModuleNotFoundError
  • RecursionError
  • StopIteration
  • OverflowError
  • FileNotFoundError

Steps: extend the translations dict; one test per new entry in tests/test_linter.py (raise the exception, assert the Maithili text is returned).

Good first issue — pure data + tests, and a perfect task for Maithili speakers: accurate, natural phrasing matters more than code here.

主要语言
Python
星标
1
派生
4
平均合并
12 天 21 小时
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

alphacrack/python-maithili-dsl 的其他 Issue

查看 alphacrack/python-maithili-dsl 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。