From e5cc2e2feb2a2627defb03b336db0c282cea0123 Mon Sep 17 00:00:00 2001 From: CT Date: Sun, 17 May 2026 12:41:09 -0500 Subject: [PATCH] changed ch to zh --- docs/contributing.md | 4 ++-- docs/getting-started.md | 4 ++-- docs/language-packs.md | 2 +- packages/langs/ch/README.md | 1 - packages/langs/zh/README.md | 1 + packages/langs/{ch => zh}/pyproject.toml | 8 ++++---- .../src/foreignthon_zh}/__init__.py | 2 +- .../ch.json => zh/src/foreignthon_zh/zh.json} | 16 ++++++++-------- 8 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 packages/langs/ch/README.md create mode 100644 packages/langs/zh/README.md rename packages/langs/{ch => zh}/pyproject.toml (69%) rename packages/langs/{ch/src/foreignthon_ch => zh/src/foreignthon_zh}/__init__.py (58%) rename packages/langs/{ch/src/foreignthon_ch/ch.json => zh/src/foreignthon_zh/zh.json} (92%) diff --git a/docs/contributing.md b/docs/contributing.md index 206888e..7afc66b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -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 diff --git a/docs/getting-started.md b/docs/getting-started.md index 928a67e..5f27600 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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 ``` diff --git a/docs/language-packs.md b/docs/language-packs.md index 238d6ab..e2bf515 100644 --- a/docs/language-packs.md +++ b/docs/language-packs.md @@ -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 diff --git a/packages/langs/ch/README.md b/packages/langs/ch/README.md deleted file mode 100644 index 9ba7b06..0000000 --- a/packages/langs/ch/README.md +++ /dev/null @@ -1 +0,0 @@ -# foreignthon-ch diff --git a/packages/langs/zh/README.md b/packages/langs/zh/README.md new file mode 100644 index 0000000..9bcf1fb --- /dev/null +++ b/packages/langs/zh/README.md @@ -0,0 +1 @@ +# foreignthon-zh diff --git a/packages/langs/ch/pyproject.toml b/packages/langs/zh/pyproject.toml similarity index 69% rename from packages/langs/ch/pyproject.toml rename to packages/langs/zh/pyproject.toml index b1a7a3b..2573e25 100644 --- a/packages/langs/ch/pyproject.toml +++ b/packages/langs/zh/pyproject.toml @@ -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"] diff --git a/packages/langs/ch/src/foreignthon_ch/__init__.py b/packages/langs/zh/src/foreignthon_zh/__init__.py similarity index 58% rename from packages/langs/ch/src/foreignthon_ch/__init__.py rename to packages/langs/zh/src/foreignthon_zh/__init__.py index eb5752b..c2943d4 100644 --- a/packages/langs/ch/src/foreignthon_ch/__init__.py +++ b/packages/langs/zh/src/foreignthon_zh/__init__.py @@ -2,4 +2,4 @@ from importlib.resources import files def get_pack_path(): - return files(__name__) / "ch.json" + return files(__name__) / "zh.json" diff --git a/packages/langs/ch/src/foreignthon_ch/ch.json b/packages/langs/zh/src/foreignthon_zh/zh.json similarity index 92% rename from packages/langs/ch/src/foreignthon_ch/ch.json rename to packages/langs/zh/src/foreignthon_zh/zh.json index 73b730a..68e2f9a 100644 --- a/packages/langs/ch/src/foreignthon_ch/ch.json +++ b/packages/langs/zh/src/foreignthon_zh/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",