Merge pull request #83 from didrocks/fix-location-order

Order locations in ascii order
This commit is contained in:
Leonel Quinteros 2023-08-29 12:40:39 -03:00 committed by GitHub
commit d32dc82045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,9 @@ func (t *Translation) AddLocations(locations []string) {
func (t *Translation) Dump() string {
data := make([]string, 0, len(t.SourceLocations)+5)
for _, location := range t.SourceLocations {
locations := t.SourceLocations
sort.Strings(locations)
for _, location := range locations {
data = append(data, "#: "+location)
}