Skip to content

Conversation

@Hakan-Soysal
Copy link

Added Turkish character mappings to the slugify function to handle Turkish characters properly.

Summary

Updated the slugify function to provide robust support for Turkish localization. This change introduces a character mapping layer that transforms Turkish-specific characters (like ğ, ş, ı) into their ASCII equivalents before the regex cleanup. It also ensures that the " & " symbol is semantically preserved as "-and-" instead of being stripped out.

Checklist

  • Documented steps to test (below)
  • Drafted “how to use” docs (if this adds new behavior)
  • Backwards compatibility considered (notes if applicable)

Documented steps to test

  1. Test Turkish Mapping: Call slugify("Eskişehir & İstanbul").

Expected Result: "eskisehir-and-istanbul"

  1. Test Semantic Preservation: Call slugify("Bread & Butter").

Expected Result: "bread-and-butter"

  1. Test Casing and Symbols: Call slugify("Ilık Bir Gün @2024!").

Expected Result: "ilik-bir-gun-2024" (Ensures the dotless 'I' maps to 'i' and non-alphanumerics are cleaned).

  1. Test Edge Trimming: Call slugify("---test---").

Expected Result: "test"

Notes for reviewers

  1. Character Map: Uses a Record<string, string> to explicitly handle ı/İ, ş/Ş, ğ/Ğ, ü/Ü, ö/Ö, and ç/Ç.
  2. Pipeline Order: * Maps Turkish characters first.
    • Converts to lowercase.
    • Converts & to -and-.
    • Strips remaining non-alphanumeric characters.
    • Trims leading/trailing hyphens.

Added Turkish character mappings to the slugify function to handle Turkish characters properly.
cabana8471-arch added a commit to cabana8471-arch/design-os that referenced this pull request Jan 3, 2026
HIGH (1):
- Fix validation-patterns.md completeness percentages (8% → 50%)

MEDIUM (8):
- Add conditional check for --skip-validation warning (buildermethods#2)
- Use $RANDOM instead of date +%N for macOS compatibility (buildermethods#3)
- Add mkdir -p product/ before context file creation (buildermethods#4)
- Increase minimum file size validation to 1000 bytes (buildermethods#9)
- Fix grep patterns with trailing space to prevent false matches (buildermethods#10, buildermethods#11)
- Align validation-patterns.md percentages with command-reference (buildermethods#16)
- Add word count (min 20) and placeholder validation (buildermethods#19)

LOW (11):
- Remove Mode options table duplication (buildermethods#5)
- Remove Question counts table duplication (buildermethods#6)
- Update phase file versions to v1.0.1 (buildermethods#7)
- Improve variable order documentation (buildermethods#8)
- Verify referenced files exist (buildermethods#12)
- Add font preferences guidance (buildermethods#13)
- Add cross-reference filtering test cases (buildermethods#14)
- Document audit+stage interaction with filtered example (buildermethods#15)
- Clarify AskUserQuestion multiselect usage (buildermethods#17)
- Translate Romanian notes to English (buildermethods#18)
- Add minimal question count (~29) to main file (#20)

Version bumps:
- product-interview.md: v1.3.5 → v1.3.6
- All phase files: v1.0.0 → v1.0.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant