]> Cypherpunks repositories - gostls13.git/commit
exp/locale/collate: changed API of Builder to be more convenient
authorMarcel van Lohuizen <mpvl@golang.org>
Fri, 3 Aug 2012 07:01:21 +0000 (09:01 +0200)
committerMarcel van Lohuizen <mpvl@golang.org>
Fri, 3 Aug 2012 07:01:21 +0000 (09:01 +0200)
commit89d40b911c0e1f7012e2f463919d8093a49797cc
tree001cb137de673e21928f15b8ffa1e491e434881e
parentb9b29ce2ba9e45de8372d81292b52f8623237220
exp/locale/collate: changed API of Builder to be more convenient
for dealing with CLDR files:
- Add now taxes a list of indexes of colelems that are variables. Checking and
  handling is now done by the Builder.  VariableTop is now also properly generated
  using the Build method.
- Introduced separate Builder, called Tailoring, for creating tailorings of root
  table.  This clearly separates the functionality for building a table based on
  weights (the allkeys* files) versus tables based on LDML XML files.
- Tailorings are now added by two calls instead of one: SetAnchor and Insert.
  This more closely reflects the structure of LDML side and simplifies the
  implementation of both the client and library side.  It also preserves
  some information that is otherwise hard to recover for the Builder.
- Allow the LDML XML element extend to be passed to Insert.  This simplifies
  both client and library implementation.

R=r
CC=golang-dev
https://golang.org/cl/6454061
src/pkg/exp/locale/collate/build/builder.go
src/pkg/exp/locale/collate/build/builder_test.go
src/pkg/exp/locale/collate/build/table.go
src/pkg/exp/locale/collate/collate.go
src/pkg/exp/locale/collate/export.go
src/pkg/exp/locale/collate/export_test.go
src/pkg/exp/locale/collate/maketables.go
src/pkg/exp/locale/collate/table.go
src/pkg/exp/locale/collate/table_test.go
src/pkg/exp/locale/collate/tables.go