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