luckyframework / luckyframework/website

Add Wordsmith::Inflection customization docs

Open
#646 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

guides:update
Dominant language
Crystal
Stars
39
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Wordsmith has somewhat opinionated defaults that can be hard to customize, as detailed in this issue:
https://github.com/luckyframework/wordsmith/issues/17

My guidance to a new Lucky user was to do something like this when a bunch of overrides/customization are needed, effectively clearing out all defaults and building back up from scratch with what will work for your app:

# config/inflections.cr

module Wordsmith
  Inflector.inflections.clear

  Inflector.inflections.plural(/$/, "s")
  Inflector.inflections.plural(/s$/i, "s")

  # etc, etc, etc
end

We should probably include some kind of note or reference to the Wordsmith docs in the guides around the pluralization text helper section.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Lucky guides section covering the pluralization text helper and review the linked Wordsmith issue about inflection defaults. Add a note or reference to Wordsmith's inflection customization guidance, including the documented approach for clearing and rebuilding defaults, then verify the guide renders correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.