Ame commited on
Commit ·
d3b6aaf
1
Parent(s): 81814e8
fix(validation): restore Naga adjective and filter sea zones
Browse filesAdd the missing Chinese and English adjective for province 4400. Restrict unowned-land warnings to provinces with trade goods so sea zones do not obscure actionable findings.
- localisation/prov_names_adj_l_english.yml +2 -2
- localisation_english_provenance.json +1 -1
- localisation_english_source/ab_manual_l_english.yml +1 -0
- localisation_manifest.json +2 -2
- localisation_source/prov_names_adj_l_english.yml +2 -1
- tools/eu4_clausewitz/registry/provinces.rules.mjs +5 -4
- tools/eu4_clausewitz/test/validate.test.mjs +7 -1
localisation/prov_names_adj_l_english.yml
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fed13128339d48fc20c2b8b665b1f9a7afa20aedb70cb642723eb5b4e9532e3
|
| 3 |
+
size 115565
|
localisation_english_provenance.json
CHANGED
|
@@ -49,7 +49,7 @@
|
|
| 49 |
},
|
| 50 |
"ab_manual_l_english.yml": {
|
| 51 |
"type": "manual",
|
| 52 |
-
"source": "English names absent from the installed English files: official music titles, language display names,
|
| 53 |
},
|
| 54 |
"ab_india_culture_names_l_english.yml": {
|
| 55 |
"type": "manual",
|
|
|
|
| 49 |
},
|
| 50 |
"ab_manual_l_english.yml": {
|
| 51 |
"type": "manual",
|
| 52 |
+
"source": "English names absent from the installed English files: official music titles, language display names, Qizilbash Cavalry from qizilbash_cavalry_unit, and the Naga province adjective."
|
| 53 |
},
|
| 54 |
"ab_india_culture_names_l_english.yml": {
|
| 55 |
"type": "manual",
|
localisation_english_source/ab_manual_l_english.yml
CHANGED
|
@@ -16,3 +16,4 @@ l_english:
|
|
| 16 |
l_spanish: "Spanish"
|
| 17 |
l_english_tag: ""
|
| 18 |
qizilbash_cavalry: "Qizilbash Cavalry"
|
|
|
|
|
|
| 16 |
l_spanish: "Spanish"
|
| 17 |
l_english_tag: ""
|
| 18 |
qizilbash_cavalry: "Qizilbash Cavalry"
|
| 19 |
+
PROV_ADJ4400: "Naga"
|
localisation_manifest.json
CHANGED
|
@@ -448,8 +448,8 @@
|
|
| 448 |
"encodedSha256": "277f3ad8c620811a43c30c65ea3b1dec074f90eece54b6f1b84cd312e724bf33"
|
| 449 |
},
|
| 450 |
"prov_names_adj_l_english.yml": {
|
| 451 |
-
"sourceSha256": "
|
| 452 |
-
"encodedSha256": "
|
| 453 |
},
|
| 454 |
"prov_names_l_english.yml": {
|
| 455 |
"sourceSha256": "0702f775a2053401438fa842513cbcd6a453431131ab23a837d6168b5cb6bce7",
|
|
|
|
| 448 |
"encodedSha256": "277f3ad8c620811a43c30c65ea3b1dec074f90eece54b6f1b84cd312e724bf33"
|
| 449 |
},
|
| 450 |
"prov_names_adj_l_english.yml": {
|
| 451 |
+
"sourceSha256": "b3c4b416c16a41fad965aeccec2bad7a6d40067a580034b052bfec937836275d",
|
| 452 |
+
"encodedSha256": "2fed13128339d48fc20c2b8b665b1f9a7afa20aedb70cb642723eb5b4e9532e3"
|
| 453 |
},
|
| 454 |
"prov_names_l_english.yml": {
|
| 455 |
"sourceSha256": "0702f775a2053401438fa842513cbcd6a453431131ab23a837d6168b5cb6bce7",
|
localisation_source/prov_names_adj_l_english.yml
CHANGED
|
@@ -3341,6 +3341,7 @@ l_english:
|
|
| 3341 |
PROV_ADJ4397:0 "永贵"
|
| 3342 |
PROV_ADJ4398:0 "茂梅"
|
| 3343 |
PROV_ADJ4399:0 "大光"
|
|
|
|
| 3344 |
PROV_ADJ4404:0 "敏辛"
|
| 3345 |
PROV_ADJ4405:0 "杰沙"
|
| 3346 |
PROV_ADJ4406:0 "孟贡"
|
|
@@ -3589,4 +3590,4 @@ l_english:
|
|
| 3589 |
PROV_ADJ4647:0 "塞科拉"
|
| 3590 |
PROV_ADJ4648:0 "阿卡塞"
|
| 3591 |
PROV_ADJ4649:0 "马约"
|
| 3592 |
-
PROV_ADJ4650:0 "奥帕塔"
|
|
|
|
| 3341 |
PROV_ADJ4397:0 "永贵"
|
| 3342 |
PROV_ADJ4398:0 "茂梅"
|
| 3343 |
PROV_ADJ4399:0 "大光"
|
| 3344 |
+
PROV_ADJ4400:0 "那加"
|
| 3345 |
PROV_ADJ4404:0 "敏辛"
|
| 3346 |
PROV_ADJ4405:0 "杰沙"
|
| 3347 |
PROV_ADJ4406:0 "孟贡"
|
|
|
|
| 3590 |
PROV_ADJ4647:0 "塞科拉"
|
| 3591 |
PROV_ADJ4648:0 "阿卡塞"
|
| 3592 |
PROV_ADJ4649:0 "马约"
|
| 3593 |
+
PROV_ADJ4650:0 "奥帕塔"
|
tools/eu4_clausewitz/registry/provinces.rules.mjs
CHANGED
|
@@ -13,10 +13,11 @@ import { refFieldRules } from '../src/validate.mjs';
|
|
| 13 |
export const provinceRefRules = refFieldRules(provincesRegistry);
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* "unowned-land" — warn only when a province has NO owner AND NO
|
| 17 |
* native_size AND NO add_core. A province with no owner is very often
|
| 18 |
* correct on its own (uncolonized New World land, or land with natives
|
| 19 |
-
* but no owner) — it's only worth a human's attention when
|
|
|
|
| 20 |
* native_size (so it's not native land) and no add_core (so nothing is
|
| 21 |
* about to claim it either). The Wild Fields Dnieper provinces (282
|
| 22 |
* Yedisan, 283 Zaporozhia, 2406 Ingil, 5355 Ochakov, 5365 Sicheslav, 5538
|
|
@@ -31,10 +32,10 @@ export const provinceRefRules = refFieldRules(provincesRegistry);
|
|
| 31 |
export const unownedLandRule = {
|
| 32 |
id: 'unowned-land',
|
| 33 |
level: 'warn',
|
| 34 |
-
when: () =>
|
| 35 |
check: (record) => record.node.has('owner') || record.node.has('native_size') || record.node.all('add_core').length > 0,
|
| 36 |
message: (record) => `province ${record.id}: no owner, no native_size, and no add_core — likely-abandoned land, verify intent`,
|
| 37 |
-
note: 'A province with no owner is often correct (uncolonized, or deliberately unowned native '
|
| 38 |
+ 'land such as the Wild Fields Dnieper provinces which carry add_core instead). This must '
|
| 39 |
+ 'only ever warn under the narrow AND-of-three-absences condition, never flag a province '
|
| 40 |
+ 'that has native_size or add_core, and never rise to error level.',
|
|
|
|
| 13 |
export const provinceRefRules = refFieldRules(provincesRegistry);
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* "unowned-land" — warn only when a land province has NO owner AND NO
|
| 17 |
* native_size AND NO add_core. A province with no owner is very often
|
| 18 |
* correct on its own (uncolonized New World land, or land with natives
|
| 19 |
+
* but no owner) — it's only worth a human's attention when it has a trade
|
| 20 |
+
* good and there's also no
|
| 21 |
* native_size (so it's not native land) and no add_core (so nothing is
|
| 22 |
* about to claim it either). The Wild Fields Dnieper provinces (282
|
| 23 |
* Yedisan, 283 Zaporozhia, 2406 Ingil, 5355 Ochakov, 5365 Sicheslav, 5538
|
|
|
|
| 32 |
export const unownedLandRule = {
|
| 33 |
id: 'unowned-land',
|
| 34 |
level: 'warn',
|
| 35 |
+
when: (record) => record.node.has('trade_goods'),
|
| 36 |
check: (record) => record.node.has('owner') || record.node.has('native_size') || record.node.all('add_core').length > 0,
|
| 37 |
message: (record) => `province ${record.id}: no owner, no native_size, and no add_core — likely-abandoned land, verify intent`,
|
| 38 |
+
note: 'Sea zones have no trade_goods and are deliberately excluded. A land province with no owner is often correct (uncolonized, or deliberately unowned native '
|
| 39 |
+ 'land such as the Wild Fields Dnieper provinces which carry add_core instead). This must '
|
| 40 |
+ 'only ever warn under the narrow AND-of-three-absences condition, never flag a province '
|
| 41 |
+ 'that has native_size or add_core, and never rise to error level.',
|
tools/eu4_clausewitz/test/validate.test.mjs
CHANGED
|
@@ -32,13 +32,19 @@ function makeNode(text) {
|
|
| 32 |
// --- unowned-land ---------------------------------------------------------
|
| 33 |
|
| 34 |
test('unowned-land: no owner, no native_size, no add_core -> warn', () => {
|
| 35 |
-
const node = makeNode('base_tax = 1\n');
|
| 36 |
const findings = runRules([unownedLandRule], [{ node, id: '9001' }], {});
|
| 37 |
assert.equal(findings.length, 1);
|
| 38 |
assert.equal(findings[0].level, 'warn');
|
| 39 |
assert.equal(findings[0].id, 'unowned-land');
|
| 40 |
});
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
test('unowned-land: Wild-Fields shape (no owner, add_core present) -> no finding', () => {
|
| 43 |
const node = makeNode('add_core = CRI\nculture = crimean\nreligion = sunni\nnative_size = 5\n');
|
| 44 |
const findings = runRules([unownedLandRule], [{ node, id: '282' }], {});
|
|
|
|
| 32 |
// --- unowned-land ---------------------------------------------------------
|
| 33 |
|
| 34 |
test('unowned-land: no owner, no native_size, no add_core -> warn', () => {
|
| 35 |
+
const node = makeNode('base_tax = 1\ntrade_goods = grain\n');
|
| 36 |
const findings = runRules([unownedLandRule], [{ node, id: '9001' }], {});
|
| 37 |
assert.equal(findings.length, 1);
|
| 38 |
assert.equal(findings[0].level, 'warn');
|
| 39 |
assert.equal(findings[0].id, 'unowned-land');
|
| 40 |
});
|
| 41 |
|
| 42 |
+
test('unowned-land: sea zone without trade_goods -> no finding', () => {
|
| 43 |
+
const node = makeNode('base_tax = 1\n');
|
| 44 |
+
const findings = runRules([unownedLandRule], [{ node, id: '1250' }], {});
|
| 45 |
+
assert.equal(findings.length, 0);
|
| 46 |
+
});
|
| 47 |
+
|
| 48 |
test('unowned-land: Wild-Fields shape (no owner, add_core present) -> no finding', () => {
|
| 49 |
const node = makeNode('add_core = CRI\nculture = crimean\nreligion = sunni\nnative_size = 5\n');
|
| 50 |
const findings = runRules([unownedLandRule], [{ node, id: '282' }], {});
|