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/language: parsing Tagalog tag (tl) returns Filipino (fil) #66335

Closed
jmooring opened this issue Mar 15, 2024 · 4 comments
Closed

x/text/language: parsing Tagalog tag (tl) returns Filipino (fil) #66335

jmooring opened this issue Mar 15, 2024 · 4 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@jmooring
Copy link

Go version

go version go1.22.1 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/jmooring/.cache/go-build'
GOENV='/home/jmooring/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/jmooring/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/jmooring/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/snap/go/10553'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/snap/go/10553/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1138695096=/tmp/go-build -gno-record-gcc-switches'

What did you do?

https://go.dev/play/p/tw0ydFlH09E

What did you see happen?

fil

What did you expect to see?

tl

@gopherbot gopherbot added this to the Unreleased milestone Mar 15, 2024
@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 15, 2024
@cherrymui
Copy link
Member

cc @mpvl

@seankhliao
Copy link
Member

@jmooring
Copy link
Author

@seankhliao Thank you for looking into this. The question is, obviously, whether that test case is correct. I am not a linguist, but tl is a valid ISO 639-1 language code, so something like tl-PH should be valid per BCP 47.

@jmooring
Copy link
Author

Digging into this, it's a bit messy due to historical usage and linguistic ambiguity. The CLDR aliases tl to fil, so we're doing the right thing here despite the fact that tl-PH is valid per BCP 47.

tl-PH --> fil-PH

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

4 participants