@kolanut/language-packs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +119 -0
- package/LICENSE +17 -0
- package/README.md +237 -0
- package/badges/coverage.json +6 -0
- package/badges/packs.json +6 -0
- package/badges/targets.json +6 -0
- package/badges/tokens.json +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/load-pack.d.ts +6 -0
- package/dist/load-pack.js +31 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.js +1 -0
- package/pack.schema.json +86 -0
- package/package.json +61 -0
- package/packs/PACK_SCOPE.md +68 -0
- package/packs/afrikaans/keywords.json +329 -0
- package/packs/afrikaans/pack.json +361 -0
- package/packs/amharic/keywords.json +329 -0
- package/packs/amharic/pack.json +359 -0
- package/packs/arabic/keywords.json +329 -0
- package/packs/arabic/pack.json +369 -0
- package/packs/bambara/keywords.json +299 -0
- package/packs/bambara/pack.json +332 -0
- package/packs/by-country.json +183 -0
- package/packs/by-region.json +49 -0
- package/packs/coverage-summary.json +424 -0
- package/packs/french/keywords.json +329 -0
- package/packs/french/pack.json +381 -0
- package/packs/fulfulde/keywords.json +299 -0
- package/packs/fulfulde/pack.json +336 -0
- package/packs/hausa/keywords.json +329 -0
- package/packs/hausa/pack.json +363 -0
- package/packs/igbo/keywords.json +329 -0
- package/packs/igbo/pack.json +360 -0
- package/packs/index.json +397 -0
- package/packs/kinyarwanda/keywords.json +329 -0
- package/packs/kinyarwanda/pack.json +359 -0
- package/packs/languages-roadmap.json +28 -0
- package/packs/lingala/keywords.json +329 -0
- package/packs/lingala/pack.json +360 -0
- package/packs/logical-tokens.json +120 -0
- package/packs/luganda/keywords.json +329 -0
- package/packs/luganda/pack.json +359 -0
- package/packs/nigerian-pidgin/keywords.json +332 -0
- package/packs/nigerian-pidgin/pack.json +362 -0
- package/packs/official-target-keywords.json +166 -0
- package/packs/oromo/keywords.json +329 -0
- package/packs/oromo/pack.json +360 -0
- package/packs/portuguese-africa/keywords.json +299 -0
- package/packs/portuguese-africa/pack.json +334 -0
- package/packs/sesotho/keywords.json +299 -0
- package/packs/sesotho/pack.json +330 -0
- package/packs/setswana/keywords.json +299 -0
- package/packs/setswana/pack.json +331 -0
- package/packs/shona/keywords.json +329 -0
- package/packs/shona/pack.json +359 -0
- package/packs/somali/keywords.json +329 -0
- package/packs/somali/pack.json +362 -0
- package/packs/swahili/keywords.json +329 -0
- package/packs/swahili/pack.json +365 -0
- package/packs/target-coverage.json +1083 -0
- package/packs/tigrinya/keywords.json +329 -0
- package/packs/tigrinya/pack.json +360 -0
- package/packs/twi/keywords.json +329 -0
- package/packs/twi/pack.json +360 -0
- package/packs/wolof/keywords.json +329 -0
- package/packs/wolof/pack.json +361 -0
- package/packs/xhosa/keywords.json +329 -0
- package/packs/xhosa/pack.json +360 -0
- package/packs/yoruba/keywords.json +329 -0
- package/packs/yoruba/pack.json +363 -0
- package/packs/zulu/keywords.json +329 -0
- package/packs/zulu/pack.json +360 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Pack scope: language, country, and region
|
|
2
|
+
|
|
3
|
+
Each pack is **one language variant for a defined geographic scope** — not “everything spoken in a country.”
|
|
4
|
+
|
|
5
|
+
Nigeria alone has hundreds of languages. This repo uses **separate packs per language** (Yoruba, Igbo, Hausa, Nigerian Pidgin, …), each with metadata so contributors know exactly what to edit.
|
|
6
|
+
|
|
7
|
+
## Three different codes (do not mix them up)
|
|
8
|
+
|
|
9
|
+
| Field | Example | What it means |
|
|
10
|
+
|-------|---------|---------------|
|
|
11
|
+
| `languageCode` | `pcm` | **Language** (ISO 639). Nigerian Pidgin = `pcm`, not `ng`. |
|
|
12
|
+
| `locale` | `pcm-NG` | **Language + primary country** (BCP-47). Use when a creole or dialect is country-specific. |
|
|
13
|
+
| `countries` | `["NG"]` | **Where this pack applies** (ISO 3166-1). Can list multiple countries for cross-border languages. |
|
|
14
|
+
|
|
15
|
+
`ng` is **Nigeria the country**, not a language code. Putting `ng` in `languageCode` would be invalid for tooling and npm consumers.
|
|
16
|
+
|
|
17
|
+
### Nigerian Pidgin vs other pidgins
|
|
18
|
+
|
|
19
|
+
| Pack | `languageCode` | `locale` | Notes |
|
|
20
|
+
|------|----------------|----------|-------|
|
|
21
|
+
| `nigerian-pidgin` | `pcm` | `pcm-NG` | Naija / Nigerian Pidgin only |
|
|
22
|
+
| *(future)* `cameroon-pidgin` | `wes` | `wes-CM` | Kamtok — separate pack when added |
|
|
23
|
+
| *(future)* Ghanaian Pidgin | TBD | TBD | Separate pack when added |
|
|
24
|
+
|
|
25
|
+
Do **not** edit `nigerian-pidgin` with Cameroon or Ghana phrases — open a new pack instead.
|
|
26
|
+
|
|
27
|
+
## Fields on every pack
|
|
28
|
+
|
|
29
|
+
| Field | Required | Purpose |
|
|
30
|
+
|-------|----------|---------|
|
|
31
|
+
| `name` | yes | Folder slug, e.g. `yoruba`, `nigerian-pidgin` |
|
|
32
|
+
| `languageCode` | yes | ISO 639 language subtag |
|
|
33
|
+
| `locale` | yes | BCP-47 tag, usually `{lang}-{CC}` |
|
|
34
|
+
| `countries` | yes | ISO country codes where this variant is intended |
|
|
35
|
+
| `regions` | yes | Browse group, e.g. `West Africa` |
|
|
36
|
+
| `scopeNote` | no | Extra guidance for contributors and reviewers |
|
|
37
|
+
| `displayName` | no | Human label in UI and docs |
|
|
38
|
+
|
|
39
|
+
See `packs/index.json` for a quick directory of all packs with country and region columns.
|
|
40
|
+
|
|
41
|
+
## Choosing the right pack to contribute to
|
|
42
|
+
|
|
43
|
+
1. **Find your language** in `packs/index.json` (sort by `countries` or `regions`).
|
|
44
|
+
2. **Read `scopeNote`** in that pack’s `pack.json` — especially for languages spoken in many countries (Swahili, Arabic, French, Hausa).
|
|
45
|
+
3. **One language variant per PR** — do not mix Nigerian and Ghanaian Twi in the same pack.
|
|
46
|
+
4. **New country-specific variant?** Copy an existing pack, set a new `name` and `locale`, and add it to `index.json`.
|
|
47
|
+
|
|
48
|
+
## Languages spoken in many countries
|
|
49
|
+
|
|
50
|
+
Some packs intentionally list **multiple** `countries`:
|
|
51
|
+
|
|
52
|
+
- **Swahili** — `KE`, `TZ`, `UG`, … — Kenya/Tanzania baseline; note dialect differences in PRs.
|
|
53
|
+
- **Hausa** — `NG`, `NE`, `GH`, … — prefer aliases over forcing one national form.
|
|
54
|
+
- **Arabic / French** — lingua franca packs; `scopeNote` explains MSA / international French baseline.
|
|
55
|
+
|
|
56
|
+
When in doubt, mention your country and dialect in the PR so a native reviewer from that region can approve.
|
|
57
|
+
|
|
58
|
+
## Adding a new pack
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
cp -r packs/hausa packs/your-pack-name
|
|
62
|
+
# Edit pack.json: name, languageCode, locale, countries, regions, scopeNote, keywords
|
|
63
|
+
# Edit keywords.json to match
|
|
64
|
+
# Add entry to packs/index.json
|
|
65
|
+
npm run validate
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Or extend `scripts/bootstrap-packs.mjs` and run `npm run bootstrap`.
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
{
|
|
2
|
+
"IF": [
|
|
3
|
+
"as",
|
|
4
|
+
"if"
|
|
5
|
+
],
|
|
6
|
+
"ELSE": [
|
|
7
|
+
"anders",
|
|
8
|
+
"else"
|
|
9
|
+
],
|
|
10
|
+
"FOR": [
|
|
11
|
+
"vir",
|
|
12
|
+
"for"
|
|
13
|
+
],
|
|
14
|
+
"WHILE": [
|
|
15
|
+
"terwyl",
|
|
16
|
+
"while"
|
|
17
|
+
],
|
|
18
|
+
"BREAK": [
|
|
19
|
+
"breek",
|
|
20
|
+
"break"
|
|
21
|
+
],
|
|
22
|
+
"CONTINUE": [
|
|
23
|
+
"gaan voort",
|
|
24
|
+
"continue"
|
|
25
|
+
],
|
|
26
|
+
"SWITCH": [
|
|
27
|
+
"kies",
|
|
28
|
+
"switch"
|
|
29
|
+
],
|
|
30
|
+
"CASE": [
|
|
31
|
+
"geval",
|
|
32
|
+
"case"
|
|
33
|
+
],
|
|
34
|
+
"DEFAULT": [
|
|
35
|
+
"verstek",
|
|
36
|
+
"default"
|
|
37
|
+
],
|
|
38
|
+
"FUNCTION": [
|
|
39
|
+
"funksie",
|
|
40
|
+
"function"
|
|
41
|
+
],
|
|
42
|
+
"RETURN": [
|
|
43
|
+
"gee terug",
|
|
44
|
+
"return"
|
|
45
|
+
],
|
|
46
|
+
"ASYNC": [
|
|
47
|
+
"async",
|
|
48
|
+
"async"
|
|
49
|
+
],
|
|
50
|
+
"AWAIT": [
|
|
51
|
+
"wag",
|
|
52
|
+
"await"
|
|
53
|
+
],
|
|
54
|
+
"TRY": [
|
|
55
|
+
"probeer",
|
|
56
|
+
"try"
|
|
57
|
+
],
|
|
58
|
+
"CATCH": [
|
|
59
|
+
"vang",
|
|
60
|
+
"catch"
|
|
61
|
+
],
|
|
62
|
+
"FINALLY": [
|
|
63
|
+
"uiteindelik",
|
|
64
|
+
"finally"
|
|
65
|
+
],
|
|
66
|
+
"THROW": [
|
|
67
|
+
"gooi",
|
|
68
|
+
"throw"
|
|
69
|
+
],
|
|
70
|
+
"LET": [
|
|
71
|
+
"laat",
|
|
72
|
+
"let"
|
|
73
|
+
],
|
|
74
|
+
"CONST": [
|
|
75
|
+
"konstant",
|
|
76
|
+
"const"
|
|
77
|
+
],
|
|
78
|
+
"CLASS": [
|
|
79
|
+
"klas",
|
|
80
|
+
"class"
|
|
81
|
+
],
|
|
82
|
+
"EXTENDS": [
|
|
83
|
+
"brei uit",
|
|
84
|
+
"extends"
|
|
85
|
+
],
|
|
86
|
+
"NEW": [
|
|
87
|
+
"nuut",
|
|
88
|
+
"new"
|
|
89
|
+
],
|
|
90
|
+
"THIS": [
|
|
91
|
+
"hierdie",
|
|
92
|
+
"this"
|
|
93
|
+
],
|
|
94
|
+
"IMPORT": [
|
|
95
|
+
"voer in",
|
|
96
|
+
"import"
|
|
97
|
+
],
|
|
98
|
+
"EXPORT": [
|
|
99
|
+
"voer uit",
|
|
100
|
+
"export"
|
|
101
|
+
],
|
|
102
|
+
"PRINT": [
|
|
103
|
+
"druk",
|
|
104
|
+
"print"
|
|
105
|
+
],
|
|
106
|
+
"TRUE": [
|
|
107
|
+
"waar",
|
|
108
|
+
"true"
|
|
109
|
+
],
|
|
110
|
+
"FALSE": [
|
|
111
|
+
"onwaar",
|
|
112
|
+
"false"
|
|
113
|
+
],
|
|
114
|
+
"NULL": [
|
|
115
|
+
"leeg",
|
|
116
|
+
"null"
|
|
117
|
+
],
|
|
118
|
+
"UNDEFINED": [
|
|
119
|
+
"ongedefinieerd",
|
|
120
|
+
"undefined"
|
|
121
|
+
],
|
|
122
|
+
"ELIF": [
|
|
123
|
+
"else"
|
|
124
|
+
],
|
|
125
|
+
"LOOP": [
|
|
126
|
+
"loop"
|
|
127
|
+
],
|
|
128
|
+
"MATCH": [
|
|
129
|
+
"match"
|
|
130
|
+
],
|
|
131
|
+
"GOTO": [
|
|
132
|
+
"goto"
|
|
133
|
+
],
|
|
134
|
+
"FALLTHROUGH": [
|
|
135
|
+
"fallthrough"
|
|
136
|
+
],
|
|
137
|
+
"SELECT": [
|
|
138
|
+
"select"
|
|
139
|
+
],
|
|
140
|
+
"RANGE": [
|
|
141
|
+
"range"
|
|
142
|
+
],
|
|
143
|
+
"YIELD": [
|
|
144
|
+
"yield"
|
|
145
|
+
],
|
|
146
|
+
"LAMBDA": [
|
|
147
|
+
"lambda"
|
|
148
|
+
],
|
|
149
|
+
"DEFER": [
|
|
150
|
+
"defer"
|
|
151
|
+
],
|
|
152
|
+
"GO": [
|
|
153
|
+
"go"
|
|
154
|
+
],
|
|
155
|
+
"VAR": [
|
|
156
|
+
"var"
|
|
157
|
+
],
|
|
158
|
+
"MUT": [
|
|
159
|
+
"mut"
|
|
160
|
+
],
|
|
161
|
+
"GLOBAL": [
|
|
162
|
+
"global"
|
|
163
|
+
],
|
|
164
|
+
"NONLOCAL": [
|
|
165
|
+
"nonlocal"
|
|
166
|
+
],
|
|
167
|
+
"STRUCT": [
|
|
168
|
+
"struct"
|
|
169
|
+
],
|
|
170
|
+
"TRAIT": [
|
|
171
|
+
"trait"
|
|
172
|
+
],
|
|
173
|
+
"IMPL": [
|
|
174
|
+
"impl"
|
|
175
|
+
],
|
|
176
|
+
"INTERFACE": [
|
|
177
|
+
"interface"
|
|
178
|
+
],
|
|
179
|
+
"ENUM": [
|
|
180
|
+
"enum"
|
|
181
|
+
],
|
|
182
|
+
"TYPE": [
|
|
183
|
+
"type"
|
|
184
|
+
],
|
|
185
|
+
"IMPLEMENTS": [
|
|
186
|
+
"implements"
|
|
187
|
+
],
|
|
188
|
+
"SELF": [
|
|
189
|
+
"self"
|
|
190
|
+
],
|
|
191
|
+
"SUPER": [
|
|
192
|
+
"super"
|
|
193
|
+
],
|
|
194
|
+
"STATIC": [
|
|
195
|
+
"static"
|
|
196
|
+
],
|
|
197
|
+
"FROM": [
|
|
198
|
+
"from"
|
|
199
|
+
],
|
|
200
|
+
"AS": [
|
|
201
|
+
"as"
|
|
202
|
+
],
|
|
203
|
+
"MODULE": [
|
|
204
|
+
"module"
|
|
205
|
+
],
|
|
206
|
+
"NAMESPACE": [
|
|
207
|
+
"namespace"
|
|
208
|
+
],
|
|
209
|
+
"PACKAGE": [
|
|
210
|
+
"package"
|
|
211
|
+
],
|
|
212
|
+
"USE": [
|
|
213
|
+
"use"
|
|
214
|
+
],
|
|
215
|
+
"PUB": [
|
|
216
|
+
"public"
|
|
217
|
+
],
|
|
218
|
+
"CRATE": [
|
|
219
|
+
"crate"
|
|
220
|
+
],
|
|
221
|
+
"WITH": [
|
|
222
|
+
"with"
|
|
223
|
+
],
|
|
224
|
+
"PASS": [
|
|
225
|
+
"pass"
|
|
226
|
+
],
|
|
227
|
+
"ASSERT": [
|
|
228
|
+
"assert"
|
|
229
|
+
],
|
|
230
|
+
"ASSERTS": [
|
|
231
|
+
"asserts"
|
|
232
|
+
],
|
|
233
|
+
"NIL": [
|
|
234
|
+
"null"
|
|
235
|
+
],
|
|
236
|
+
"UNSAFE": [
|
|
237
|
+
"unsafe"
|
|
238
|
+
],
|
|
239
|
+
"EXTERN": [
|
|
240
|
+
"declare"
|
|
241
|
+
],
|
|
242
|
+
"CHAN": [
|
|
243
|
+
"chan"
|
|
244
|
+
],
|
|
245
|
+
"MAP": [
|
|
246
|
+
"map"
|
|
247
|
+
],
|
|
248
|
+
"AND": [
|
|
249
|
+
"and"
|
|
250
|
+
],
|
|
251
|
+
"OR": [
|
|
252
|
+
"or"
|
|
253
|
+
],
|
|
254
|
+
"NOT": [
|
|
255
|
+
"not"
|
|
256
|
+
],
|
|
257
|
+
"IN": [
|
|
258
|
+
"in"
|
|
259
|
+
],
|
|
260
|
+
"IS": [
|
|
261
|
+
"is"
|
|
262
|
+
],
|
|
263
|
+
"DEL": [
|
|
264
|
+
"del"
|
|
265
|
+
],
|
|
266
|
+
"DO": [
|
|
267
|
+
"do"
|
|
268
|
+
],
|
|
269
|
+
"DEBUGGER": [
|
|
270
|
+
"debugger"
|
|
271
|
+
],
|
|
272
|
+
"TYPEOF": [
|
|
273
|
+
"typeof"
|
|
274
|
+
],
|
|
275
|
+
"VOID": [
|
|
276
|
+
"void"
|
|
277
|
+
],
|
|
278
|
+
"INSTANCEOF": [
|
|
279
|
+
"instanceof"
|
|
280
|
+
],
|
|
281
|
+
"PRIVATE": [
|
|
282
|
+
"private"
|
|
283
|
+
],
|
|
284
|
+
"PROTECTED": [
|
|
285
|
+
"protected"
|
|
286
|
+
],
|
|
287
|
+
"PUBLIC": [
|
|
288
|
+
"public"
|
|
289
|
+
],
|
|
290
|
+
"READONLY": [
|
|
291
|
+
"readonly"
|
|
292
|
+
],
|
|
293
|
+
"ABSTRACT": [
|
|
294
|
+
"abstract"
|
|
295
|
+
],
|
|
296
|
+
"DECLARE": [
|
|
297
|
+
"declare"
|
|
298
|
+
],
|
|
299
|
+
"GET": [
|
|
300
|
+
"get"
|
|
301
|
+
],
|
|
302
|
+
"SET": [
|
|
303
|
+
"set"
|
|
304
|
+
],
|
|
305
|
+
"INFER": [
|
|
306
|
+
"infer"
|
|
307
|
+
],
|
|
308
|
+
"KEYOF": [
|
|
309
|
+
"keyof"
|
|
310
|
+
],
|
|
311
|
+
"UNIQUE": [
|
|
312
|
+
"unique"
|
|
313
|
+
],
|
|
314
|
+
"SATISFIES": [
|
|
315
|
+
"satisfies"
|
|
316
|
+
],
|
|
317
|
+
"DYN": [
|
|
318
|
+
"dyn"
|
|
319
|
+
],
|
|
320
|
+
"MOVE": [
|
|
321
|
+
"move"
|
|
322
|
+
],
|
|
323
|
+
"REF": [
|
|
324
|
+
"ref"
|
|
325
|
+
],
|
|
326
|
+
"WHERE": [
|
|
327
|
+
"where"
|
|
328
|
+
]
|
|
329
|
+
}
|