From 38a95c2d4a4bd3b96a28705c9a2d47874067ec6d Mon Sep 17 00:00:00 2001 From: cuishuang Date: Mon, 9 Sep 2024 15:09:38 +0800 Subject: [PATCH] all: fix some comments Change-Id: I6ba7a9de50acfa522d96609abead28d207ab4f81 Reviewed-on: https://go-review.googlesource.com/c/text/+/611795 Reviewed-by: Dmitri Shuralyov Reviewed-by: Tim King Auto-Submit: Tim King Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- collate/build/colelem.go | 2 +- internal/catmsg/codec.go | 2 +- internal/colltab/collelem.go | 2 +- message/pipeline/pipeline.go | 2 +- unicode/norm/maketables.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collate/build/colelem.go b/collate/build/colelem.go index 1aaa062c5..f51faa1a1 100644 --- a/collate/build/colelem.go +++ b/collate/build/colelem.go @@ -139,7 +139,7 @@ const ( maxPrimary = illegalOffset + 1 ) -// implicitPrimary returns the primary weight for the a rune +// implicitPrimary returns the primary weight for the given rune // for which there is no entry for the rune in the collation table. // We take a different approach from the one specified in // https://unicode.org/reports/tr10/#Implicit_Weights, diff --git a/internal/catmsg/codec.go b/internal/catmsg/codec.go index 49c9fc978..547802b0f 100644 --- a/internal/catmsg/codec.go +++ b/internal/catmsg/codec.go @@ -257,7 +257,7 @@ func (d *Decoder) setError(err error) { // Language returns the language in which the message is being rendered. // // The destination language may be a child language of the language used for -// encoding. For instance, a decoding language of "pt-PT"" is consistent with an +// encoding. For instance, a decoding language of "pt-PT" is consistent with an // encoding language of "pt". func (d *Decoder) Language() language.Tag { return d.tag } diff --git a/internal/colltab/collelem.go b/internal/colltab/collelem.go index 0c23c8a48..bdcae9b13 100644 --- a/internal/colltab/collelem.go +++ b/internal/colltab/collelem.go @@ -354,7 +354,7 @@ const ( maxPrimary = illegalOffset + 1 ) -// implicitPrimary returns the primary weight for the a rune +// implicitPrimary returns the primary weight for the given rune // for which there is no entry for the rune in the collation table. // We take a different approach from the one specified in // https://unicode.org/reports/tr10/#Implicit_Weights, diff --git a/message/pipeline/pipeline.go b/message/pipeline/pipeline.go index 34f15f8ab..2b07e38b6 100644 --- a/message/pipeline/pipeline.go +++ b/message/pipeline/pipeline.go @@ -58,7 +58,7 @@ type Config struct { // 1. From the Language field in the file. // 2. If not present, from a valid language tag in the filename, separated // by dots (e.g. "en-US.json" or "incoming.pt_PT.xmb"). - // 3. If not present, from a the closest subdirectory in which the file + // 3. If not present, from the closest subdirectory in which the file // is contained that parses as a valid language tag. TranslationsPattern string diff --git a/unicode/norm/maketables.go b/unicode/norm/maketables.go index 76534da20..09d40135c 100644 --- a/unicode/norm/maketables.go +++ b/unicode/norm/maketables.go @@ -235,7 +235,7 @@ func loadUnicodeData() { } } -// compactCCC converts the sparse set of CCC values to a continguous one, +// compactCCC converts the sparse set of CCC values to a contiguous one, // reducing the number of bits needed from 8 to 6. func compactCCC() { m := make(map[uint8]uint8)