Repository: go
Issue: x/text: gotext with french numbers above 1,000,000
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version go1.10.3 darwin/amd64

### Does this issue reproduce with the latest release?
YES

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOBIN="/Users/christophe/go/bin"
GOCACHE="/Users/christophe/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/christophe/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/85/01ftf7594x1_01_ps0ypv76h0000gn/T/go-build291898772=/tmp/go-build -gno-record-gcc-switches -fno-common"

### What did you do?
In french, when expressing quantities, you have to distinguish between less than 1,000,000 and more. For example, one have to say:

* For numbers from 2 up to and including 999'999, we have to say/write:

> Il y a 999'999 habitants.
> Il y a 999'999 chiens.


* And for numbers from 1'000'000 and up, we have to say/write:

> Il y a 1'000'000 **d**'habitants.
> Il y a 1'000'000 **de** chiens.

With the following program:
```
package main

//go:generate gotext -srclang=en update -out=catalog/catalog.go -lang=fr,en

import (
	"fmt"

	_ "github.com/clamb/arcaciel/aws/scrapbook/catalog"

	"golang.org/x/text/language"
	"golang.org/x/text/message"
)

func main() {
	tr := message.NewPrinter(language.French)

	num := 999999
	tr.Printf("There are %d dog(s)", num)
	fmt.Println()
	num = 1000000
	tr.Printf("There are %d dog(s)", num)
	fmt.Println()
	num = 1000001
	tr.Printf("There are %d dog(s)", num)
	fmt.Println()
}
```
I tried using `many` (not sure how exactly about how to write this, but this is not the point):
```
 {
            "id": "There are {Num} dog(s)",
            "message": "There are {Num} dog(s)",
            "translation": {
                "select": {
                    "feature": "plural",
                    "arg": "Num",
                    "cases": {
                        "=0": "Il n'y a pas de chien",
                        "one": "Il y a {Num} chien",
                        "many": "Il y a {Num} de chiens",
                        "other": "Il y a {Num} de chiens"
                    }
                }
            },
            "placeholders": [{
                "id": "Num",
                "string": "%[1]d",
                "type": "int",
                "underlyingType": "int",
                "argNum": 1,
                "expr": "num"
            }]
        },
```
However `many` is not supported for language `fr`.
```
gotext: generation failed: error: plural: form "many" not supported for language "fr"
test.go:3: running "gotext": exit status 1
```

Then I tried using `"<1000000"`:
```
        {
            "id": "There are {Num} dog(s)",
            "message": "There are {Num} dog(s)",
            "translation": {
                "select": {
                    "feature": "plural",
                    "arg": "Num",
                    "cases": {
                        "=0": "Il n'y a pas de chien",
                        "one": "Il y a {Num} chien",
                        "<1000000": "Il y a {Num} chiens",
                        "other": "Il y a {Num} de chiens"
                    }
                }
            },
            "placeholders": [{
                "id": "Num",
                "string": "%[1]d",
                "type": "int",
                "underlyingType": "int",
                "argNum": 1,
                "expr": "num"
            }]
        },
```
As the number `1,000,000` is read as an `int16`, `gotext` raises an error:
```
gotext: generation failed: error: plural: invalid number in selector "<1000000": strconv.ParseUint: parsing "1000000": value out of range
test.go:3: running "gotext": exit status 1
```


### What did you expect to see?
```
Il y a 999 999 chiens
Il y a 1 000 000 de chiens
Il y a 1 000 001 de chiens
```

### What did you see instead?
```
gotext: generation failed: error: plural: invalid number in selector "<1000000": strconv.ParseUint: parsing "1000000": value out of range
test.go:3: running "gotext": exit status 1
```