From 61dcb894f8aba33290fc94da24ab4eaac9c8e41c Mon Sep 17 00:00:00 2001 From: cesnimda Date: Thu, 19 Nov 2026 21:04:49 +0100 Subject: [PATCH] docs(i18n): trace document and discovery language boundaries --- docs/i18n/00/B06_DOCUMENT_DISCOVERY.md | 15 +++++ .../00/B06_DOCUMENT_DISCOVERY_FRONTIER.csv | 24 ++++++++ docs/i18n/00/B06_document_tests.py | 61 +++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 docs/i18n/00/B06_DOCUMENT_DISCOVERY.md create mode 100644 docs/i18n/00/B06_DOCUMENT_DISCOVERY_FRONTIER.csv create mode 100644 docs/i18n/00/B06_document_tests.py diff --git a/docs/i18n/00/B06_DOCUMENT_DISCOVERY.md b/docs/i18n/00/B06_DOCUMENT_DISCOVERY.md new file mode 100644 index 00000000..d7f893b1 --- /dev/null +++ b/docs/i18n/00/B06_DOCUMENT_DISCOVERY.md @@ -0,0 +1,15 @@ +# B06 document and discovery string boundaries + +This I18N-00 increment dispositions 124 of the 559 remaining quoted source lines from B03. It covers eight owners with byte-identical source at the frozen census and application checkpoint `245f2fea`. The [line register](B06_DOCUMENT_DISCOVERY_FRONTIER.csv) records each line exactly once. Combined with B05, 273 of 708 lines have now been reviewed; 435 lines across 11 owners remain. Several lines can refer to the same term. + +| Boundary | Finding | Requirement for subsequent implementation | +| --- | --- | --- | +| Submitted document snapshot | The application-assets controller supplies the literal **Your Name** when it has no usable account name. It passes that render person to package capture. | Keep user-entered names intact. Decide how to handle absent names in the document's language. Preserve frozen packages and their bytes. | +| Public CV | **Candidate** appears in two fallback branches. The public render receives the resolved person, and the JSON response exposes the fallback name. | Qualify the fallback for HTML, public name display and PDF. Keep a real name unchanged when switching interface language. | +| Cover letter | Accessibility labels and the visual kicker use the document-language label. The CSS contains a display path for that label. The renderer currently chooses English or Bokmål for the underlying terms. | Preserve escaping, the document language attribute and print layout. The four binding lines refer to an existing label or language setting and do not require four new keys. | +| Attachments | Filename heuristics recognise selected terms such as “resume” and “résumé”. They produce stable purpose IDs used by package-completeness flags. | Review multilingual naming behaviour separately from UI translation. Retain stored purpose IDs, file bytes, original display names and explicit user choices. | +| Document catalogue and discovery | Filter enums, route segments, MIME types, cache directives, ownership sentinels and imported URLs are protocol data. | Localise the displayed filter labels through their presenters. Preserve the values sent over the API, ownership checks, saved-search input and provider URLs. | + +The two distinct English fallback-name literals occur at three reviewed lines. Actual visibility depends on source data and the render path. This is a static trace. No translator, native speaker, provider, model or PDF renderer was invoked. No language was activated, and the existing 24-EU-language and wider 60-candidate scope remains in force. + +Run `python -B docs/i18n/00/B06_document_tests.py` at the research checkout to check complete and disjoint coverage, source identity, and the name, document-language and classifier paths. The next census owners are CV variants and the three Profile CV controller partials, followed by the remaining administration and account owners. diff --git a/docs/i18n/00/B06_DOCUMENT_DISCOVERY_FRONTIER.csv b/docs/i18n/00/B06_DOCUMENT_DISCOVERY_FRONTIER.csv new file mode 100644 index 00000000..019ed403 --- /dev/null +++ b/docs/i18n/00/B06_DOCUMENT_DISCOVERY_FRONTIER.csv @@ -0,0 +1,24 @@ +owner,role,lines +ApplicationAssetsController,route-policy,18 19 40 49 58 67 76 91 105 124 137 146 162 171 +ApplicationAssetsController,transport,116 +ApplicationAssetsController,user-content-composition,184 +ApplicationAssetsController,render-name-fallback,188 +DocumentsController,route-policy,8 9 +DocumentsController,stable-filter-identifier,17 18 19 21 28 29 30 31 +PublicCvController,route-policy,13 28 43 44 +PublicCvController,transport,39 56 +PublicCvController,render-name-fallback,61 65 +PublicCvController,user-content-composition,62 +CareerProfileController,route-policy,17 49 78 88 100 101 +CareerProfileController,revision-source-identifier,64 +AttachmentsController,route-policy,13 14 87 103 125 170 +AttachmentsController,transport,21 53 118 293 +AttachmentsController,filename-classification,59 60 61 62 63 64 +AttachmentsController,stable-purpose-identifier,81 82 83 84 +JobDiscoveryController,route-policy,13 14 37 50 68 85 96 109 129 +JobDiscoveryController,empty-input-or-owner-sentinel,72 73 74 144 +JobImportController,route-policy,11 12 24 +JobImportController,empty-input-or-owner-sentinel,27 +CoverLetterDocumentRenderer,render-markup-and-layout,15 16 20 21 22 25 27 28 29 30 31 32 34 41 43 60 64 67 68 70 72 73 74 76 77 80 81 82 83 84 85 86 88 89 +CoverLetterDocumentRenderer,user-content-composition,35 38 39 40 57 58 +CoverLetterDocumentRenderer,document-language-binding,42 56 59 69 diff --git a/docs/i18n/00/B06_document_tests.py b/docs/i18n/00/B06_document_tests.py new file mode 100644 index 00000000..c675d62a --- /dev/null +++ b/docs/i18n/00/B06_document_tests.py @@ -0,0 +1,61 @@ +"""Check the bounded document and discovery inventory against the two recorded Git trees.""" +import unittest +from collections import Counter +from pathlib import Path + +from B05_mail_tests import B03_SHA, blob, research_json, rows + + +APPLICATION = '245f2feaa8bee2db8f5da0797b3e33f6ef8b056e' +OWNERS = {'ApplicationAssetsController', 'DocumentsController', 'PublicCvController', + 'CareerProfileController', 'AttachmentsController', 'JobDiscoveryController', + 'JobImportController', 'CoverLetterDocumentRenderer'} + + +class DocumentBoundaries(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.prior = research_json('B03_CENSUS.json', B03_SHA) + cls.sources = {Path(row['source']).stem: row for row in cls.prior['ownerCoverage'] + if Path(row['source']).stem in OWNERS} + + def test_complete_disjoint_source_partition(self): + self.assertEqual(set(self.sources), OWNERS) + expected = Counter((owner, line) for owner, data in self.sources.items() + for line in data['otherQuotedLinesNotClassified']) + actual = Counter() + for item in rows('B06_DOCUMENT_DISCOVERY_FRONTIER.csv'): + self.assertTrue(item['role']) + actual.update((item['owner'], int(n)) for n in item['lines'].split()) + self.assertEqual(actual, expected) + self.assertEqual(len(actual), 124) + previous = {r['owner'] for r in rows('B05_MAIL_FRONTIER.csv')} + self.assertTrue(OWNERS.isdisjoint(previous)) + for source in self.sources.values(): + path = source['source'] + self.assertEqual(blob(APPLICATION,path), blob(self.prior['sourceCommit'],path), path) + + def test_fallback_names_and_presentation_trace(self): + def source(name): + return blob(APPLICATION,self.sources[name]['source']).decode('utf-8-sig') + assets = source('ApplicationAssetsController') + public = source('PublicCvController') + renderer = source('CoverLetterDocumentRenderer') + fallbacks = {(r['owner'],int(line)) for r in rows('B06_DOCUMENT_DISCOVERY_FRONTIER.csv') + if r['role']=='render-name-fallback' for line in r['lines'].split()} + candidates = [('ApplicationAssetsController',188,'"Your Name"'), + ('PublicCvController',61,'"Candidate"'),('PublicCvController',65,'"Candidate"')] + self.assertEqual(fallbacks,{(name,line) for name,line,_ in candidates}) + for name,line,text in candidates: + self.assertIn(text,source(name).splitlines()[line-1]) + self.assertIn('CaptureAsync(user.Id, jobId, Person(user), ct)',assets) + self.assertIn('name = person.FallbackName',public) + self.assertIn('RenderPublicAsync(slug, person, ct)',public) + self.assertIn('html lang="{{E(s.Language)}}"',renderer) + self.assertIn('aria-label="{{E(bodyLabel)}}"',renderer) + self.assertIn("content:'{letterLabel}'",renderer) + self.assertIn('GuessPurpose(displayName)',source('AttachmentsController')) + + +if __name__=='__main__': + unittest.main()