Replies: 3 comments
-
We are tracking localization in #380 |
Beta Was this translation helpful? Give feedback.
-
While I recommend moving the conversation to the mentioned issue, I'll at least say I hesitate in making a bespoke localization framework like I was about a bespoke terminal styling API. |
Beta Was this translation helpful? Give feedback.
-
@epage Thanks for the suggestion. I added a comment to the issue (#380 (comment)) and also opened a draft PR with a minimal implementation of the approach to demonstrate how it would work if fully implemented in a production-ready way (#5853) |
Beta Was this translation helpful? Give feedback.
-
Hey all, I'm working on an experiment to add internationlization support for Clap in a minimally invasive way. I want to describe my approach here and get a feel for whether this change would be a welcome addition to the project. Allow me to describe my understanding of the current implementation and how I would adjust to handle internationlization.
Current Implementation
Text comes in the following two forms:
With the above text values, Clap does the following:
Suggested Implementation
I have a prototype which demonstrates the following as a viable alternative:
Taking the a second pass through the string does add some performance overhead, but I believe this is the best implementation for the following reasons
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions