Comments (3)
What would the Comma* functions be called? How would you imagine the function signature should look? Should Indian-style formatting be considered?
from go-humanize.
Sorry, I wrote a message for you earlier, but lost the window.
The Indian style is typically not considered necessary since many people who would require this style are familiar with English (UK) localization (and speak English).
Typically, I would use the term Format for the verb of applying them.
"The thousands separator (none, comma, dot, or space). The decimal separator (dot or comma)."
The two major thousands separators though divide major computer using parts of the world. And it is true that there was a time period that this was not considered important and so many people from these regions are able to read it, it does present issues; primarily because the fact that many people are providing proper localization support and so now new computer users are starting to expect it.
The difference can be compared to how US style of date MM/DD/YYYY can cause issues if you see the international method of DD/MM/YYYY; because some of the options are not invalid so it is not immediately obvious.
So to ensure the best support for use in UI libraries (which is what I would like to use this library for) it would be best to adopt a more international approach to ontological naming.
This is important because we work with developers working in multiple languages, just so it is clear that this does have a reason behind the preference, and its not just arbitrary. Comma separator has no meaning to people who unlike us did not grow up using it.
Hope this was helpful. Thanks for your work on this library by the way, I have quite a few potential additions for this version I can show you after I push m version live.
from go-humanize.
If there is anything I can do to help, I would gladly do it. If you want to submit a pull request with my suggested changes, I would be happy to. I just don't want to step on any toes, or generate code that no one has interest in at least considering.
I'm working on a Go web-framework that is essentially Rails, from my long history with Rails, I can do more than just make on inspired by Rails like I have seen. And a library like this would not just help with that project, but work with essentially all my UI projects. And I would be more interested in contributing to a group effort, over rebuilding and constructing my own international focused version. But my requirements are internationalization from the start (as in not a afterthought), to satisfy my primary projects design requirements.
Let me know how you feel if you have time.
from go-humanize.
Related Issues (20)
- Bytes returns 32 MB for 31450000 bytes instead of 31 MB HOT 2
- How to convert decimal to million or billion formats? HOT 1
- Force to show decimal in CommafWithDigits HOT 1
- Lost zeros using SIWithDigits with 0 decimals 200.0 becomes "2" HOT 5
- New git tags? HOT 1
- Set github workflow permissions to read only HOT 1
- RFE: Add unit-specific Byte/IByte
- Create a Security Policy
- Hash Pin Dependencies and Dependency Update tool HOT 3
- Incorrect year length HOT 1
- [Feature Request] FormatFloatNoTrailingZero
- Option to elide space between value and units HOT 1
- Option to force sub-whole digits for whole inputs HOT 1
- PluralWord should return singular word with a 0 quantity HOT 3
- Allow to skip trailing spaces in humanize.RelTime
- Tag releases to support go.mod semantic versioning HOT 1
- Added `ComputeBytes` and `ComputeIBytes`
- [Feature Request] Support localization in Time HOT 1
- money notation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-humanize.