fix(NcCounterBubble): also shorten in German
☑️ Resolves
- Browsers decided that in German numbers should not be shortened like
2048should be2048instead of2Kin English - This PR uses English style instead of German to shorten the number in German
- ⚠️ Same problem in Italian. Shall we do the same?
| Before | After |
|---|---|
🏁 Checklist
- [x] ⛑️ Tests are included or are not applicable
- [x] 📘 Component documentation has been extended, updated or is not applicable
- [x] 2️⃣ Backport to
stable8for maintained Vue 2 version or not applicable
/backport to stable8
@marcoambrosini For Italian we keep it in full form, correct?
Honestly, I am not sure about this change. Using 2K is very uncommon in german afaik...
Isn't there a library for this with already localized short forms? I understand that it would be an extra dependency but I don't feel too great about doing this for every language manually, especially because the thousands are not the only thing that is usually shortened.
I'm sure you've seen this one before :D
Correct for Italian @ShGKme
@kra-mo we don't do it manually for every language. We are using the native Intl formatter.
The problem is that the default formatter doesn't shorten thousands in German and Italian languages, unlike all the other languages. And as far as I know, it is on purpose.
So the proposal is to use English style shortening for German (and, maybe, Italian).
@kra-mo we don't do it manually for every language. We are using the native Intl formatter.
The problem is that the default formatter doesn't shorten thousands in German and Italian languages, unlike all the other languages. And as far as I know, it is on purpose.
So the proposal is to use English style shortening for German (and, maybe, Italian).
Ah, I see. Maybe ask upstream? Otherwise, my hands are off then :)
Maybe ask upstream?
Upstream is Google, Microsoft, Apple and Mozilla with their browsers, so, I'm unsure if it is an option :)
The question is: do we want to shorten numbers in German (and Italian) or not.
(and in English as well?) it would have to be a lowercase "k", so "2k"
@jancborchardt It uses native browsers formatter, not a custom one. So in English it is K uppercase as defined by the browser. Like in other places (likes/views on social media, YouTube and etc.).
As we are making a custom option for German anyway, I can make it lowercase, but could you provide complete rules in this case? For example, is it always lower case, or only for k.
Note: counter in EN and DE on YouTube. Indeed, it is not shortened with K, as @szaimen noticed.
So in German it is not super common, but if we need a shortened one, "2k" is definitely possible. A more common one would be "2 Tsd." but that doesn’t really shorten it. For million the common one is "2 Mio.", which would shorten it better.
The German page for info on the "thousand" shortening: https://de.wikipedia.org/wiki/Tausend#Gebr%C3%A4uchliche_Abk%C3%BCrzungen_und_Synonyme
What we could also do is then simply not shorten the thousands if we think it’s fine. What happens above certain limits like with 10k, 100k etc? At what point does it shorten at all?
What we could also do is then simply not shorten the thousands if we think it’s fine. What happens above certain limits like with 10k, 100k etc? At what point does it shorten at all?
Starting 1000000 formatted to 1 Mio.
What we could also do is then simply not shorten the thousands if we think it’s fine.
That is the current state
I think this is then probably fine in German. While for me and likely many others "2 k" would be ok and understandable, the official shortenings should be "Tsd." which is basically not shorter and only useful when writing numbers as text.