Skip to content

Commit a21978c

Browse files
authored
style(copy): scrub BrE, em-dashes, AI tells in lib hooks and README (#29)
Remove auth copy from README project structure. Replace em-dashes in user-facing strings (error messages, labels, notes) with colons or semicolons. Correct defense->defence in sanitize-svg JSDoc.
1 parent 80d3ec5 commit a21978c

7 files changed

Lines changed: 13 additions & 14 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ src/
5353
│ ├── playground/ # CDL Playground components
5454
│ ├── quiz/ # Quiz and exam components
5555
│ ├── calculator/ # Gemmological calculator components
56-
│ ├── auth/ # Authentication and protected routes
5756
│ └── layout/ # Layout components (Header, Footer)
5857
├── hooks/ # React hooks (useCrystalDB, useQuiz, useExam, etc.)
5958
├── layouts/ # Astro layouts

src/lib/calculator/cut-grades.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ function describe(parameter: string, value: string, grade: CutGradeBand): Parame
133133
Excellent: 'within ideal range',
134134
'Very Good': 'slightly outside ideal',
135135
Good: 'noticeably outside ideal',
136-
Fair: 'well outside ideal visible light leakage likely',
137-
Poor: 'severe deviation significant performance impact',
136+
Fair: 'well outside ideal; visible light leakage likely',
137+
Poor: 'severe deviation; significant performance impact',
138138
};
139139
return {
140140
parameter,

src/lib/calculator/hanneman.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export function combineBands(observations: HannemanCriteria[]): RIBand | null {
114114
return {
115115
min: lo,
116116
max: hi,
117-
rationale: `Conflicting observations — please re-test. ${reasons.join(' ')}`,
117+
rationale: `Conflicting observations. Please re-test. ${reasons.join(' ')}`,
118118
};
119119
}
120120
return {

src/lib/pleochroism/match-pleochroism.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ export function matchPleochroism(
193193
const reasonParts: string[] = [];
194194
reasonParts.push(
195195
storedCount === 3
196-
? 'Trichroic biaxial (orthorhombic, monoclinic, or triclinic).'
196+
? 'Trichroic: biaxial (orthorhombic, monoclinic, or triclinic).'
197197
: storedCount === 2
198-
? 'Dichroic uniaxial (trigonal, tetragonal, or hexagonal).'
199-
: 'Single observed colour pleochroism not detectable.',
198+
? 'Dichroic: uniaxial (trigonal, tetragonal, or hexagonal).'
199+
: 'Single observed colour: pleochroism not detectable.',
200200
);
201201
if (mineral.pleochroism_strength) {
202202
reasonParts.push(
@@ -232,7 +232,7 @@ export function interpretColourCount(count: ObservedColourCount): {
232232
return {
233233
title: 'One colour observed',
234234
body:
235-
'The gem may be isotropic (cubic or amorphous diamond, garnet, spinel, glass, opal), or anisotropic but viewed along its optic axis. Rotate the dichroscope and the stone; if no second colour appears at any orientation, isotropic is most likely.',
235+
'The gem may be isotropic (cubic or amorphous: diamond, garnet, spinel, glass, opal), or anisotropic but viewed along its optic axis. Rotate the dichroscope and the stone; if no second colour appears at any orientation, isotropic is most likely.',
236236
};
237237
case 2:
238238
return {

src/lib/sanitize-svg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* SVG Sanitization utility using DOMPurify
3-
* Provides defense-in-depth against XSS in SVG content
3+
* Provides defence-in-depth against XSS in SVG content
44
*/
55
import DOMPurify from 'dompurify';
66

src/lib/spectroscope/reference-bands.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [
4545
familyId: 'corundum',
4646
name: 'Ruby (Cr-corundum)',
4747
bands: [
48-
{ wavelength: 692, also: [694], intensity: 'strong', cause: 'Cr³⁺ doublet (R-lines)', selective: true, note: 'Sharp red doublet at 692/694 nm the textbook ruby fingerprint.' },
48+
{ wavelength: 692, also: [694], intensity: 'strong', cause: 'Cr³⁺ doublet (R-lines)', selective: true, note: 'Sharp red doublet at 692/694 nm: the textbook ruby fingerprint.' },
4949
{ wavelength: 660, intensity: 'weak', cause: 'Cr³⁺' },
5050
{ wavelength: 555, intensity: 'moderate', cause: 'Cr³⁺ broad absorption', note: 'Wide green absorption band.' },
5151
{ wavelength: 476, intensity: 'moderate', cause: 'Cr³⁺' },
@@ -93,7 +93,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [
9393
{ wavelength: 460, intensity: 'moderate', cause: 'Fe³⁺' },
9494
{ wavelength: 470, intensity: 'weak', cause: 'Fe³⁺' },
9595
],
96-
observationNotes: 'Synthetic flame-fusion sapphire often lacks the 450 nm line useful diagnostic.',
96+
observationNotes: 'Synthetic flame-fusion sapphire often lacks the 450 nm line; useful diagnostic.',
9797
},
9898
// Almandine garnet — Fe²⁺.
9999
{
@@ -132,7 +132,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [
132132
familyId: 'zircon',
133133
name: 'Zircon (high type)',
134134
bands: [
135-
{ wavelength: 653, intensity: 'strong', cause: 'U⁴⁺', selective: true, note: 'Classic uranium-line at 653.5 nm strongest in heat-treated blue zircon.' },
135+
{ wavelength: 653, intensity: 'strong', cause: 'U⁴⁺', selective: true, note: 'Classic uranium-line at 653.5 nm; strongest in heat-treated blue zircon.' },
136136
{ wavelength: 659, intensity: 'moderate', cause: 'U⁴⁺' },
137137
{ wavelength: 691, intensity: 'weak', cause: 'U⁴⁺' },
138138
{ wavelength: 588, intensity: 'weak', cause: 'U⁴⁺' },
@@ -157,7 +157,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [
157157
familyId: 'diamond',
158158
name: 'Cape-series diamond (N3)',
159159
bands: [
160-
{ wavelength: 415, intensity: 'strong', cause: 'N3 centre', selective: true, note: 'Cape line at 415.5 nm diagnostic of natural type-Ia diamond.' },
160+
{ wavelength: 415, intensity: 'strong', cause: 'N3 centre', selective: true, note: 'Cape line at 415.5 nm: diagnostic of natural type-Ia diamond.' },
161161
{ wavelength: 478, intensity: 'weak', cause: 'N3 / H3' },
162162
{ wavelength: 504, intensity: 'weak', cause: 'H3 (irradiated)' },
163163
],

src/lib/treatments/wizard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const CLUES: ClueDef[] = [
172172
},
173173
{
174174
id: 'jadeite-acid-etch',
175-
label: 'Jadeite acid-etched / honeycomb surface texture',
175+
label: 'Jadeite: acid-etched / honeycomb surface texture',
176176
effects: { bleaching: 4, 'oil-resin': 3 },
177177
applicableTo: ['jadeite'],
178178
},

0 commit comments

Comments
 (0)