Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/text/currency: rouble symbol is only printed with language.Russian #29052

Open
ainar-g opened this issue Dec 1, 2018 · 2 comments
Open

x/text/currency: rouble symbol is only printed with language.Russian #29052

ainar-g opened this issue Dec 1, 2018 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ainar-g
Copy link
Contributor

ainar-g commented Dec 1, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ainar/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ainar/go"
GOPROXY=""
GORACE=""
GOROOT="/home/ainar/go/go1.11"
GOTMPDIR=""
GOTOOLDIR="/home/ainar/go/go1.11/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build112907181=/tmp/go-build -gno-record-gcc-switches"

What did you do?

https://play.golang.org/p/umgrxwND7k4

(Using floats because #15274.)

What did you expect to see?

₽ 100.00 = € 1.33
100.00 ₽ = 1.33 €
100.00 ₽ = 1.33 €

What did you see instead?

RUB 100.00 = € 1.33
RUB 100.00 = € 1.33
₽ 100.00 = € 1.33

There is #14308 about the symbol position, but I don't understand why the rouble symbol is only used when I use language.Russian, while the euro symbol is used in all cases.

@gopherbot gopherbot added this to the Unreleased milestone Dec 1, 2018
@jarifibrahim
Copy link

I would like to work on this issue. Can someone help me get started? I am not sure where I should be looking.

@AlexanderYastrebov
Copy link
Contributor

https://cldr.unicode.org/translation/currency-names-and-symbols

If a symbol is not widely recognized around the world (eg shekel ₪)
Where the currency is official in a country, use that symbol in locales with that country (eg IL)
Where the currency would be widely recognized by users of a language, use it in the base language locale (eg he/iw).
Otherwise, use the international currency symbol (eg ILS). This can be done just by omitting the translation.

I would guess CLDR data marks as not widely recognized around the world and therefore uses symbol only in Russian locale.
It is possible to ask for NarrowSymbol to output unconditionally https://play.golang.org/p/wyIRn49F496

Besides symbol position decimal format is also not locale specific which I address in #47623

@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants