Unify fmt.Sprintf behaviour on Po and Locale

This commit is contained in:
Leonel Quinteros
2017-11-02 10:21:20 -03:00
parent 50cdb4e058
commit 7d86bb66fe
3 changed files with 25 additions and 24 deletions

View File

@@ -1,7 +1,6 @@
package gotext
import (
"fmt"
"os"
"path"
"sync"
@@ -138,7 +137,7 @@ func (l *Locale) GetND(dom, str, plural string, n int, vars ...interface{}) stri
}
// Return the same we received by default
return fmt.Sprintf(plural, vars...)
return printf(plural, vars...)
}
// GetC uses a domain "default" to return the corresponding translation of the given string in the given context.
@@ -175,5 +174,5 @@ func (l *Locale) GetNDC(dom, str, plural string, n int, ctx string, vars ...inte
}
// Return the same we received by default
return fmt.Sprintf(plural, vars...)
return printf(plural, vars...)
}