From e8ad33b92851783f42b1429552b91ca4415919f4 Mon Sep 17 00:00:00 2001 From: Zander Date: Thu, 12 Nov 2026 22:39:26 +0800 Subject: [PATCH] fix(resume): accept Glossary names that are the same in both languages ResumeWriter.finish refused any Chinese line that named a Glossary entry whose Chinese and English names are the same, such as a brand, because the check for English names left in Chinese text also matched the shared name. Tailored and Master resumes that mention such a company could not be saved. The English-in-Chinese check now applies only to entries whose names differ. A shared name that appears in the English line but not in the Chinese line is still refused, as are the other Glossary checks. Co-Authored-By: Claude Opus 5.5 --- skills/headhunter/scripts/hh.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skills/headhunter/scripts/hh.py b/skills/headhunter/scripts/hh.py index 55b756d..e9ec075 100644 --- a/skills/headhunter/scripts/hh.py +++ b/skills/headhunter/scripts/hh.py @@ -1989,12 +1989,14 @@ def header(self, profile: dict) -> None: self.lines[lang] += ["", " ยท ".join(header[lang]) + " "] def finish(self) -> None: - """Check Glossary names and English text across everything written, then raise if anything failed.""" + """Check Glossary names and English text across everything written, then raise if anything failed. A name + that is the same in both languages, such as a brand, is correct in Chinese lines too.""" for zh, en in sorted(set(self.pairs.values())): for where, text in self.texts: + english_in_chinese = zh != en and term_used(en, text["zh"]) if zh in text["zh"] and en.lower() not in text["en"].lower(): self.errors.append(f"{where}: glossary.yml names {zh} as {en!r} in English") - elif term_used(en, text["en"]) and zh not in text["zh"] or term_used(en, text["zh"]): + elif (term_used(en, text["en"]) and zh not in text["zh"]) or english_in_chinese: self.errors.append(f"{where}: glossary.yml names {en} as {zh!r} in Chinese") for where, text in self.texts: if HAN.search(text["en"]):