update module to own version

This commit is contained in:
2020-07-27 18:17:50 +02:00
parent 2441e55972
commit b4ab6497b5
11 changed files with 58 additions and 58 deletions

View File

@@ -13,7 +13,7 @@ import (
"sync"
)
/*
/**
Locale wraps the entire i18n collection for a single language (locale)
It's used by the package functions, but it can also be used independently to handle
multiple languages at the same time by working with this object.
@@ -24,7 +24,7 @@ Example:
"encoding/gob"
"bytes"
"fmt"
"github.com/leonelquinteros/gotext"
"git.deineagentur.com/DeineAgenturUG/gotext"
)
func main() {
@@ -41,10 +41,10 @@ Example:
l.AddDomain("extras")
// Translate text from domain
fmt.Println(l.GetD("extras", "Translate this"))
fmt.Println(l.GetD("extras", "Translate this"))
}
*/
type Locale struct {
// Path to locale files.
path string
@@ -271,7 +271,7 @@ func (l *Locale) GetNDC(dom, str, plural string, n int, ctx string, vars ...inte
return Printf(plural, vars...)
}
// Get Euses a domain "default" to return the corresponding Translation of a given string.
// GetE uses a domain "default" to return the corresponding Translation of a given string.
// Supports optional parameters (vars... interface{}) to be inserted on the formatted string using the fmt.Printf syntax.
// The second return value is true iff the string was found.
func (l *Locale) GetE(str string, vars ...interface{}) (string, bool) {
@@ -324,14 +324,14 @@ func (l *Locale) GetNDE(dom, str, plural string, n int, vars ...interface{}) (st
return "", false
}
// GetC uses a domain "default" to return the corresponding Translation of the given string in the given context.
// GetCE uses a domain "default" to return the corresponding Translation of the given string in the given context.
// Supports optional parameters (vars... interface{}) to be inserted on the formatted string using the fmt.Printf syntax.
// The second return value is true iff the string was found.
func (l *Locale) GetCE(str, ctx string, vars ...interface{}) (string, bool) {
return l.GetDCE(l.GetDomain(), str, ctx, vars...)
}
// GetNC retrieves the (N)th plural form of Translation for the given string in the given context in the "default" domain.
// GetNCE retrieves the (N)th plural form of Translation for the given string in the given context in the "default" domain.
// Supports optional parameters (vars... interface{}) to be inserted on the formatted string using the fmt.Printf syntax.
// The second return value is true iff the string was found.
func (l *Locale) GetNCE(str, plural string, n int, ctx string, vars ...interface{}) (string, bool) {