changed ch to zh
This commit is contained in:
@@ -14,7 +14,7 @@ foreignthon/
|
||||
│ └── langs/
|
||||
│ ├── es/ # foreignthon-es (Spanish)
|
||||
│ └── ta/ # foreignthon-ta (Tamil)
|
||||
| |__ ch/
|
||||
| |__ zh/ # foreignthon-zh (Chinese)
|
||||
├── docs/
|
||||
└── .gitea/workflows/
|
||||
├── ci.yml # runs tests + lint on every push
|
||||
@@ -34,7 +34,7 @@ python -m venv .venv && source .venv/bin/activate
|
||||
pip install -e "packages/foreignthon[dev]"
|
||||
pip install -e packages/langs/es
|
||||
pip install -e packages/langs/ta
|
||||
pip install -e packages/langs/ch
|
||||
pip install -e packages/langs/zh
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
pip install foreignthon
|
||||
pip install foreignthon-es # add Spanish
|
||||
pip install foreignthon-ta # add Tamil
|
||||
pip install foreignthon-ch # add Chinese
|
||||
pip install foreignthon-zh # add Chinese
|
||||
```
|
||||
|
||||
For CLI use across projects, prefer pipx:
|
||||
@@ -77,6 +77,6 @@ python -m venv .venv && source .venv/bin/activate
|
||||
pip install -e "packages/foreignthon[dev]"
|
||||
pip install -e packages/langs/es
|
||||
pip install -e packages/langs/ta
|
||||
pip install -e packages/langs/ch
|
||||
pip install -e packages/langs/zh
|
||||
pytest packages/foreignthon/tests/ -v
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ A language pack is a JSON file that maps foreign tokens to Python equivalents, p
|
||||
|---|---|---|
|
||||
| `foreignthon-es` | Spanish | `pip install foreignthon-es` |
|
||||
| `foreignthon-ta` | Tamil | `pip install foreignthon-ta` |
|
||||
| `foreignthon-ch` | Chinese | `pip install foreignthon-ch` |
|
||||
| `foreignthon-zh` | Chinese | `pip install foreignthon-zh` |
|
||||
|
||||
## JSON schema
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# foreignthon-ch
|
||||
1
packages/langs/zh/README.md
Normal file
1
packages/langs/zh/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# foreignthon-zh
|
||||
@@ -3,9 +3,9 @@ requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "foreignthon-ch"
|
||||
name = "foreignthon-zh"
|
||||
version = "0.1.0"
|
||||
description = "Mandarin Chinese language pack for ForeignThon."
|
||||
description = "Chinese language pack for ForeignThon."
|
||||
license = { text = "GPL v3" }
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
@@ -16,7 +16,7 @@ keywords = ["foreignthon", "chinese", "中文", "mandarin"]
|
||||
dependencies = ["foreignthon>=0.4.1"]
|
||||
|
||||
[project.entry-points."foreignthon.langs"]
|
||||
es = "foreignthon_es"
|
||||
zh = "foreignthon_zh"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/foreignthon_ch"]
|
||||
packages = ["src/foreignthon_zh"]
|
||||
@@ -2,4 +2,4 @@ from importlib.resources import files
|
||||
|
||||
|
||||
def get_pack_path():
|
||||
return files(__name__) / "ch.json"
|
||||
return files(__name__) / "zh.json"
|
||||
@@ -2,16 +2,16 @@
|
||||
"meta": {
|
||||
"name": "Chinese",
|
||||
"native_name": "中文",
|
||||
"code": "ch",
|
||||
"code": "zh",
|
||||
"version": "0.1.0",
|
||||
"authors": []
|
||||
},
|
||||
"keywords": {
|
||||
"si": "if",
|
||||
"如果": "if",
|
||||
"sino": "else",
|
||||
"osi": "elif",
|
||||
"para": "for",
|
||||
"mientras": "while",
|
||||
"的时候": "while",
|
||||
"def": "def",
|
||||
"clase": "class",
|
||||
"importar": "import",
|
||||
@@ -27,10 +27,10 @@
|
||||
"lanzar": "raise",
|
||||
"con": "with",
|
||||
"en": "in",
|
||||
"es": "is",
|
||||
"y": "and",
|
||||
"o": "or",
|
||||
"no": "not",
|
||||
"是": "is",
|
||||
"和": "and",
|
||||
"或": "or",
|
||||
"不": "not",
|
||||
"elim": "del",
|
||||
"global": "global",
|
||||
"nolocal": "nonlocal",
|
||||
@@ -44,7 +44,7 @@
|
||||
"Nada": "None"
|
||||
},
|
||||
"builtins": {
|
||||
"escribir": "print",
|
||||
"写": "print",
|
||||
"imprimir": "print",
|
||||
"entrada": "input",
|
||||
"lon": "len",
|
||||
Reference in New Issue
Block a user