Skip to content

Commit d32dc82

Browse files
Merge pull request #83 from didrocks/fix-location-order
Order locations in ascii order
2 parents b2e5003 + bc62da2 commit d32dc82

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/xgotext/parser/domain.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ func (t *Translation) AddLocations(locations []string) {
2929
func (t *Translation) Dump() string {
3030
data := make([]string, 0, len(t.SourceLocations)+5)
3131

32-
for _, location := range t.SourceLocations {
32+
locations := t.SourceLocations
33+
sort.Strings(locations)
34+
for _, location := range locations {
3335
data = append(data, "#: "+location)
3436
}
3537

0 commit comments

Comments
 (0)