Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with Japanese abbreviations.

See original GitHub issue

(moved from foretagsplatsen/Numeral-js/issues/9)

I’ve already reported this issue here adamwdraper/Numeral-js/issues/248, but as the original branch is not maintained anymore, I think it would be better to focus on your branch.

Now, Numeral.js is grouping numbers into 4 groups: thousands, milions, billions and trillions.

But, in case of Japanese (and I suppose it also applies to Chinese) numbers are grouped in slightly different way: every hundred, thousand and ten thousand.

100 -> 1百
1,000 -> 1千
10,000 -> 1万
100,000 -> 10万
1,000,000 -> 1百万
10,000,000 -> 1千万
100,000,000 -> 1億

Before I start fixing this issue, I’d like to discuss how to approach that problem. Ideas:

  • add more abbreviations in library core
  • let languages define their own formatting/unformatting functions

Sample formatting function here:

Anyway, I think we need more flexible architecture if we want to support even more complicated numeral systems like Indian numbering system.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

ghostcommented, Mar 30, 2019

@BenjaminVanRyseghem I would like to helping with this issue. But I think OP is not how a large numeric should be display.

Let’s see what it should be look like:

Powers of 10 Number English Japanese
1 10 10 10
2 100 100 100
3 1,000 1k 1,000
4 10,000 10k 1万
5 100,000 100k 10万
6 1,000,000 1m 100万
7 10,000,000 10m 1,000万
8 100,000,000 100m 1億
9 1,000,000,000 1b 10億
10 100,000,000,000 100b 100億
12 1,000,000,000,000 1tr 1兆

This is more reasonable and I think is easier to implement. Since the only different of these two system is how we separate large number (that means, >= 1,000), the problem of “百” or “1百” doesn’t exist. Japanese numeric system (which is the same as Chinese), are based on 10^4, while western system are based on 10^3.

I have found this web page might help:

When the OP mentions we should write “100” as “百”, it just like saying we should write “1 hundred” in English, doesn’t make sense. Because it is how we read the number, not how we write them.

BenjaminVanRyseghemcommented, Mar 30, 2017

@ArmorDarks I would like to keep locales out of the format string

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Discriminative Approach to Japanese ... - ACL Anthology
In this paper we addressed the difficulties in rec- ognizing Japanese abbreviations by examining ac- tual usages of parenthetical expressions in news- paper ......
Read more >
When and how did the Japanese abbreviation 'NG', meaning ...
NG means clearly “Bad” or “Forbidden”. For example, when you are going to take a photo, someone says,” Koko, satsuei, NG ne!”, it...
Read more >
Business Translation Blunders: The Trouble with Acronyms
A Japanese company named PPPhones, for instance, failed to consider how their name would sound to Americans.
Read more >
40 Most Commonly Used Japanese Abbreviations
The Japanese language abbreviates many words, especially casual Japanese words and phrases. They are useful when speaking and texting in Japanese.
Read more >
Japanese abbreviated and contracted words - Wikipedia
Abbreviated and contracted words are a common feature of Japanese. Long words are often contracted into shorter forms, which then become the predominant ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found