Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 6c97a165dd all: update go directive to 1.18
Done with:

go get go@1.18
go mod tidy
go fix ./...

Using go1.21.3.

Also update code generators to use only the new go:build lines,
not the old +build ones.

For golang/go#60268.

Change-Id: I832981d939ab0aad5c941555a6a4cd005958a189
Reviewed-on: https://go-review.googlesource.com/c/text/+/534242
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-10-11 21:58:48 +00:00
Marcel van Lohuizen e328d63cff language: fix off-by-one error
Regions are encoded starting from 1. However, one of the
region-related tables assumed 0-based indices. This
caused a crash when used with ZZ, the largest region.

Fixes golang/go#43834

Change-Id: Iaed6b9d2683cd50504e6d33c8a6df8b21dd1687d
Reviewed-on: https://go-review.googlesource.com/c/text/+/305469
Trust: Marcel van Lohuizen <mpvl@golang.org>
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Seth Vargo <sethvargo@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-30 05:48:03 +00:00
Russ Cox 8f690f22cf all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I8f1f65728dad29d63bc5a1ea5fdb4cbac255c7e5
Reviewed-on: https://go-review.googlesource.com/c/text/+/294372
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-02-20 03:31:29 +00:00
Marcel van Lohuizen 6ddec15f6a language: use internal/language/compact
This exposes all the internal compact IDs within x/text
but not outside.

Change-Id: I3c5e63f26a3e2774e70fdb48390522f444a850ae
Reviewed-on: https://go-review.googlesource.com/96639
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ross Light <light@google.com>
2018-03-14 12:13:25 +00:00
Marcel van Lohuizen 27420a1a39 internal/language: move package to internal
Change-Id: I6fff414e66cb08c5f09cba14c936319335b63dde
Reviewed-on: https://go-review.googlesource.com/95833
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-02-23 19:36:32 +00:00
Marcel van Lohuizen e839bd5edf language: use compact tags
Change-Id: Iecd38d92cfbd38d84067d1e7184e996f3eab4712
Reviewed-on: https://go-review.googlesource.com/95828
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-02-23 18:49:39 +00:00
Marcel van Lohuizen 7c3f0bbfa3 language: new implementation of compact tags
Also updated date tables for this change and fixed
a small bug in code.go, which would escape '\', but
allowe it ('\\') to be broken across lines.

Change-Id: I139bf149a703f1063ccf10a8bae695be5696d97d
Reviewed-on: https://go-review.googlesource.com/95827
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-02-23 18:49:11 +00:00
Marcel van Lohuizen 59a7c23b6f language: clean up gen
Mostly switch to use of CodeWriter.

Remove many old helper functions and move
main to top.

Change-Id: I957408391c26d49e1db13265dc8ebb7829e267eb
Reviewed-on: https://go-review.googlesource.com/95823
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-02-23 18:21:56 +00:00
Marcel van Lohuizen b85db4f711 language: use new internal language tag package
More cleanup to come in separate CL.

Compact index generation currently disabled.
Will need to be enabled again as part of the
new compact index implementation.

Change-Id: I571c34b700ca3f22959ab261525827c7edfab511
Reviewed-on: https://go-review.googlesource.com/95822
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-02-23 18:20:23 +00:00
Marcel van Lohuizen 1516014cc0 language: exclude data case to prepare for CLDR 32
Change-Id: I11d25e966d6b92a1b3c8fa111ee3c5d8c3fcdc65
Reviewed-on: https://go-review.googlesource.com/82903
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2017-12-14 13:03:07 +00:00
Marcel van Lohuizen 9d605ff76c language: implement paradigm locales
This allows deleting parent distance.

This also fully implements allowing the user to
order dialects non-contiguously.

Change-Id: I09a8d21a6c6e18edc24db136b280ba960eb72370
Reviewed-on: https://go-review.googlesource.com/55911
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2017-08-24 09:45:48 +00:00
Marcel van Lohuizen c3d3170947 language: update IANA entries
Required larger size for region group bitmasks.

Change-Id: I8e58c359d3ee0221477994425b35519c5a8ef843
Reviewed-on: https://go-review.googlesource.com/55751
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2017-08-24 09:44:53 +00:00
Marcel van Lohuizen f2da33372d language: remove manual hr -> sr mapping
was removed in CLDR for geo-political reasons

Change-Id: I318ae1fa55a7012342a0709a7f3114d6e39bae6e
Reviewed-on: https://go-review.googlesource.com/55331
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2017-08-24 09:29:01 +00:00
Marcel van Lohuizen cfdf022e86 language: rename maketables.go to gen.go
Change-Id: I95f7776127dfa09bffd33e89d8a7b45fbafbb5fa
Reviewed-on: https://go-review.googlesource.com/47345
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2017-07-06 13:03:53 +00:00