Repository navigation
Conversation
A title without Latin letters gave the slug 'untitled', so every story in a Russian-language project got 'story-untitled'. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Medium impact] The change reaches the ticket-pull naming workflow and its default plan paths. The PR appears safe to merge, with two non-blocking file-name conversion issues. FindingsFix with agent prompt### Issue 1
skills/bmad-agent-po/scripts/tickets.py:1124-1125
Moving `.lower()` before NFKD drops uppercase letters that NFKD exposes. For example, `𝐀PI` previously produced `api` but now produces `pi`; `№ 1` changes from `no-1` to `o-1`. These valid titles lose letters in their file names. Lowercase the normalized result before applying the final pattern, and add a test for compatibility characters.
### Issue 2
skills/bmad-agent-po/scripts/tickets.py:1119-1123
The new mappings miss Cyrillic letters stored as a base letter plus a combining mark. For example, composed `Ёлка` produces `yolka`, but the same visible title written as `Е\u0308лка` produces `elka`. The same problem affects `й` and `ї`. Normalize the whole title to NFC before looking up individual letters, and test both forms.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds Cyrillic, Greek, and selected Latin mappings to
Reviews (1) · Last reviewed commit: "fix(tickets): transliterate Cyrillic and..." · Reviewed by Greptile |
| ascii_title = "".join(letters).encode("ascii", "ignore").decode("ascii") | ||
| return re.sub(r"[^a-z0-9]+", "-", ascii_title).strip("-")[:60].rstrip("-") or "untitled" |
There was a problem hiding this comment.
Moving .lower() before NFKD drops uppercase letters that NFKD exposes. For example, 𝐀PI previously produced api but now produces pi; № 1 changes from no-1 to o-1. These valid titles lose letters in their file names. Lowercase the normalized result before applying the final pattern, and add a test for compatibility characters.
Prompt To Fix With AI
This is a comment left during a code review.
Path: skills/bmad-agent-po/scripts/tickets.py
Line: 1124-1125
Comment:
**Latin letters disappear**
Moving `.lower()` before NFKD drops uppercase letters that NFKD exposes. For example, `𝐀PI` previously produced `api` but now produces `pi`; `№ 1` changes from `no-1` to `o-1`. These valid titles lose letters in their file names. Lowercase the normalized result before applying the final pattern, and add a test for compatibility characters.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| for c in title.lower(): | ||
| if c in _TRANSLIT: | ||
| letters.append(_TRANSLIT[c]) | ||
| else: # accents come off through NFKD; a base letter it exposes may still need the table (Greek tonos) | ||
| letters.extend(_TRANSLIT.get(d, d) for d in unicodedata.normalize("NFKD", c)) |
There was a problem hiding this comment.
Identical titles get different names
The new mappings miss Cyrillic letters stored as a base letter plus a combining mark. For example, composed Ёлка produces yolka, but the same visible title written as Е\u0308лка produces elka. The same problem affects й and ї. Normalize the whole title to NFC before looking up individual letters, and test both forms.
Prompt To Fix With AI
This is a comment left during a code review.
Path: skills/bmad-agent-po/scripts/tickets.py
Line: 1119-1123
Comment:
**Identical titles get different names**
The new mappings miss Cyrillic letters stored as a base letter plus a combining mark. For example, composed `Ёлка` produces `yolka`, but the same visible title written as `Е\u0308лка` produces `elka`. The same problem affects `й` and `ї`. Normalize the whole title to NFC before looking up individual letters, and test both forms.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
What
title_sluginbmad-agent-po/scripts/tickets.pynow transliterates Cyrillic and Greek letters and a few Latin ones that NFKD leaves whole (ß, ø, ł, æ, …), instead of dropping them.Why
Follow-up to #2976 / #2986, which made accented Latin letters work. A title with no Latin letters gave the slug
untitled, sopullnamed every storystory-untitled-<id>.md(and the plans-plan.mdthe same way) in a project written in Russian, Ukrainian or Greek. A title with a few Latin words kept only those words: "Скан камерой Android" becamestory-android.How
letter=latinpairs, applied before the existing NFKD step; accents still come off through NFKD, and Greek letters it exposes go back through the table.untitled.cafe-menu).Testing
New test pulls five titles (Russian, Greek, Polish/German, Ukrainian, Japanese) and checks the file names. The pre-commit hooks and pytest steps of
tools/quality.pypass; thedocs-sitelint step was not run (no npm here), and no docs changed.🤖 Generated with Claude Code