// AddTranslation adds translations for a language.
//
// It is useful if your translations are in a format not supported by LoadTranslationFile.
177981
func (b *Bundle) AddTranslation(lang *language.Language, translations ...translation.Translation) {
	b.Lock()
	defer b.Unlock()
	if b.translations[lang.Tag] == nil {
		b.translations[lang.Tag] = make(map[string]translation.Translation, len(translations))
	}
	currentTranslations := b.translations[lang.Tag]
	for _, newTranslation := range translations {
		if currentTranslation := currentTranslations[newTranslation.ID()]; currentTranslation != nil {
			currentTranslations[newTranslation.ID()] = currentTranslation.Merge(newTranslation)
		} else {
			currentTranslations[newTranslation.ID()] = newTranslation
		}
	}

	// lang can provide translations for less specific language tags.
	for _, tag := range lang.MatchingTags() {
		b.fallbackTranslations[tag] = currentTranslations
	}
}
176650
func (i18 *I18Mem) Translate(key string, values ...interface{}) (string, error) {
	i18.muTranlsates.RLock()
	defer i18.muTranlsates.RUnlock()
	format, ok := i18.translates[key]
	if !ok {
		return "", fmt.Errorf("Unknown translate for %s key", key)
	}
	return fmt.Sprintf(format, values...), nil
}
521881
func New() locales.Translator {
	return &tk_TM{
		locale:                 "tk_TM",
		pluralsCardinal:        []locales.PluralRule{2, 6},
		pluralsOrdinal:         []locales.PluralRule{4, 6},
		pluralsRange:           []locales.PluralRule{2, 6},
		decimal:                ",",
		group:                  " ",
		minus:                  "-",
		percent:                "%",
		perMille:               "‰",
		timeSeparator:          ":",
		inifinity:              "∞",
		currencies:             []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNH", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "STN", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"},
		percentSuffix:          " ",
		currencyPositiveSuffix: " ",
		currencyNegativeSuffix: " ",
		monthsAbbreviated:      []string{"", "ýan", "few", "mart", "apr", "maý", "iýun", "iýul", "awg", "sen", "okt", "noý", "dek"},
		monthsNarrow:           []string{"", "Ý", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"},
		monthsWide:             []string{"", "ýanwar", "fewral", "mart", "aprel", "maý", "iýun", "iýul", "awgust", "sentýabr", "oktýabr", "noýabr", "dekabr"},
		daysAbbreviated:        []string{"ýek", "duş", "siş", "çar", "pen", "ann", "şen"},
		daysNarrow:             []string{"Ý", "D", "S", "Ç", "P", "A", "Ş"},
		daysShort:              []string{"ýb", "db", "sb", "çb", "pb", "an", "şb"},
		daysWide:               []string{"ýekşenbe", "duşenbe", "sişenbe", "çarşenbe", "penşenbe", "anna", "şenbe"},
		periodsAbbreviated:     []string{"go.öň", "go.soň"},
		periodsNarrow:          []string{"öň", "soň"},
		periodsWide:            []string{"günortadan öň", "günortadan soň"},
		erasAbbreviated:        []string{"B.e.öň", "B.e."},
		erasNarrow:             []string{"", ""},
		erasWide:               []string{"Isadan öň", "Isadan soň"},
		timezones:              map[string]string{"WAST": "Günbatar Afrika tomusky wagty", "ACDT": "Merkezi Awstraliýa tomusky wagty", "WARST": "Günbatar Argentina tomusky wagty", "OEZ": "Gündogar Ýewropa standart wagty", "HADT": "Gawaý-Aleut tomusky wagty", "CST": "Merkezi Amerika standart wagty", "WIB": "Günbatar Indoneziýa wagty", "SGT": "Singapur wagty", "WART": "Günbatar Argentina standart wagty", "ACWDT": "Merkezi Awstraliýa günbatar tomusky wagty", "HEEG": "Gündogar Grenlandiýa tomusky wagty", "VET": "Wenesuela wagty", "HNNOMX": "Demirgazyk-günbatar Meksika standart wagty", "TMST": "Türkmenistan tomusky wagty", "UYST": "Urugwaý tomusky wagty", "CHADT": "Çatem tomusky wagty", "HNPMX": "Meksikan Ýuwaş umman standart wagty", "SAST": "Günorta Afrika standart wagty", "∅∅∅": "∅∅∅", "ACST": "Merkezi Awstraliýa standart wagty", "LHST": "Lord-Hau standart wagty", "HENOMX": "Demirgazyk-günbatar Meksika tomusky wagty", "COT": "Kolumbiýa standart wagty", "GFT": "Fransuz Gwianasy wagty", "AKDT": "Alýaska tomusky wagty", "IST": "Hindistan standart wagty", "WITA": "Merkezi Indoneziýa wagty", "TMT": "Türkmenistan standart wagty", "ARST": "Argentina tomusky wagty", "ChST": "Çamorro wagty", "AWDT": "Günbatar Awstraliýa tomusky wagty", "AST": "Atlantik standart wagty", "ADT": "Atlantik tomusky wagty", "HAT": "Nýufaundlend tomusky wagty", "HEPM": "Sen-Pýer we Mikelon tomusky wagty", "PDT": "Demirgazyk Amerika Ýuwaş umman tomusky wagty", "JDT": "Ýaponiýa tomusky wagty", "HAST": "Gawaý-Aleut standart wagty", "WEZ": "Günbatar Ýewropa standart wagty", "NZST": "Täze Zelandiýa standart wagty", "CLT": "Çili standart wagty", "CLST": "Çili tomusky wagty", "WESZ": "Günbatar Ýewropa tomusky wagty", "ECT": "Ekwador wagty", "HNCU": "Kuba standart wagty", "HECU": "Kuba tomusky wagty", "MYT": "Malaýziýa wagty", "EAT": "Gündogar Afrika wagty", "PST": "Demirgazyk Amerika Ýuwaş umman standart wagty", "BT": "Butan wagty", "EST": "Demirgazyk Amerika gündogar standart wagty", "LHDT": "Lord-Hau tomusky wagty", "HNT": "Nýufaundlend standart wagty", "CAT": "Merkezi Afrika wagty", "ART": "Argentina standart wagty", "COST": "Kolumbiýa tomusky wagty", "HEPMX": "Meksikan Ýuwaş umman tomusky wagty", "BOT": "Boliwiýa wagty", "ACWST": "Merkezi Awstraliýa günbatar standart wagty", "MEZ": "Merkezi Ýewropa standart wagty", "MDT": "MDT", "OESZ": "Gündogar Ýewropa tomusky wagty", "NZDT": "Täze Zelandiýa tomusky wagty", "EDT": "Demirgazyk Amerika gündogar tomusky wagty", "AEST": "Gündogar Awstraliýa standart wagty", "WAT": "Günbatar Afrika standart wagty", "HNEG": "Gündogar Grenlandiýa standart wagty", "HNOG": "Günbatar Grenlandiýa standart wagty", "HKST": "Gonkong tomusky wagty", "SRT": "Surinam wagty", "GMT": "Grinwiç boýunça orta wagt", "GYT": "Gaýana wagty", "CDT": "Merkezi Amerika tomusky wagty", "AWST": "Günbatar Awstraliýa standart wagty", "JST": "Ýaponiýa standart wagty", "HEOG": "Günbatar Grenlandiýa tomusky wagty", "MESZ": "Merkezi Ýewropa tomusky wagty", "HKT": "Gonkong standart wagty", "MST": "MST", "UYT": "Urugwaý standart wagty", "AKST": "Alýaska standart wagty", "HNPM": "Sen-Pýer we Mikelon standart wagty", "WIT": "Gündogar Indoneziýa wagty", "CHAST": "Çatem standart wagty", "AEDT": "Gündogar Awstraliýa tomusky wagty"},
	}
}
40881
func (l *Locale) AddTranslator(dom string, tr Translator) {
	l.Lock()

	if l.Domains == nil {
		l.Domains = make(map[string]Translator)
	}
	if l.defaultDomain == "" {
		l.defaultDomain = dom
	}
	l.Domains[dom] = tr

	l.Unlock()
}
592830
func (lt *Translator) getFieldTranslator(field string) (*FieldTranslator, error) {
	lt.lock.RLock()
	if tr, ok := lt.fields[field]; ok {
		lt.lock.RUnlock()
		return tr, nil
	}
	lt.lock.RUnlock()
	lt.lock.Lock()
	defer lt.lock.Unlock()
	if tr, ok := lt.fields[field]; ok {
		return tr, nil
	}
	lft, err := NewFieldTranslator(lt.dirname, field)
	if err != nil {
		return nil, errors.Wrap(err, "creating new FieldTranslator")
	}
	lt.fields[field] = lft
	return lft, nil
}
315423
func (s nopTranslateStore) TranslateColumnToString(index string, values uint64) (string, error) {
	return "", nil
}
120334
func (s *TextOutput) SetTranslatedText(v string) *TextOutput {
	s.TranslatedText = &v
	return s
}
843512
func (p *pageState) AllTranslations() page.Pages {
	p.s.h.init.translations.Do()
	return p.allTranslations
}
152755
func Find(langs ...string) (t Translator, err error) {
	for _, lang := range langs {
		t, err = mgr.Find(lang)
		if t != nil || err != nil {
			return
		}
	}
	return
}
1121009
func SetNamingStrategy(translate func(string) string) {
	jsoniter.RegisterExtension(&namingStrategyExtension{jsoniter.DummyExtension{}, translate})
}
1364961
func (fe *fieldError) Translate(ut ut.Translator) string {

	m, ok := fe.v.transTagFunc[ut]
	if !ok {
		return fe.Error()
	}

	fn, ok := m[fe.tag]
	if !ok {
		return fe.Error()
	}

	return fn(ut, fe)
}
368928
func (sm *SSMuxer) AddTransport(path string, transport connsec.Transport) {
	if sm.tpts == nil {
		sm.tpts = make(map[string]connsec.Transport, 1)
	}

	sm.mux.AddHandler(path, nil)
	sm.tpts[path] = transport
	sm.OrderPreference = append(sm.OrderPreference, path)
}
322920
func AddTransports(sock mangos.Socket) {
	sock.AddTransport(tcp.NewTransport())
	sock.AddTransport(inproc.NewTransport())
	sock.AddTransport(ipc.NewTransport())
	sock.AddTransport(tlstcp.NewTransport())
	sock.AddTransport(ws.NewTransport())
	sock.AddTransport(wss.NewTransport())
}
345668
func (c *Client) Translate(args []string) (Translate, error) {
	argsStr := strings.Join(args, " ")

	req, err := c.NewRequest("/gifs/translate?s=" + argsStr)
	if err != nil {
		return Translate{}, err
	}

	var translate Translate
	if _, err = c.Do(req, &translate); err != nil {
		return Translate{}, err
	}

	if len(translate.RawData) == 0 {
		return Translate{}, ErrNoRawData
	}

	// Check if the first character in Data is a [
	if translate.RawData[0] == '[' {
		return Translate{}, ErrNoImageFound
	}

	err = json.Unmarshal(translate.RawData, &translate.Data)
	if err != nil {
		return Translate{}, err
	}

	return translate, nil
}
237724
func (t *translator) AddRange(key interface{}, text string, rule locales.PluralRule, override bool) error {

	var verified bool

	// verify plural rule exists for locale
	for _, pr := range t.PluralsRange() {
		if pr == rule {
			verified = true
			break
		}
	}

	if !verified {
		return &ErrRangeTranslation{text: fmt.Sprintf("error: range plural rule '%s' does not exist for locale '%s' key: '%v' text: '%s'", rule, t.Locale(), key, text)}
	}

	tarr, ok := t.rangeTanslations[key]
	if ok {
		// verify not adding a conflicting record
		if len(tarr) > 0 && tarr[rule] != nil && !override {
			return &ErrConflictingTranslation{locale: t.Locale(), key: key, rule: rule, text: text}
		}

	} else {
		tarr = make([]*transText, 7, 7)
		t.rangeTanslations[key] = tarr
	}

	trans := &transText{
		text:    text,
		indexes: make([]int, 4, 4),
	}

	tarr[rule] = trans

	idx := strings.Index(text, paramZero)
	if idx == -1 {
		tarr[rule] = nil
		return &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, are you sure you're adding a Range Translation? locale: '%s' key: '%v' text: '%s'", paramZero, t.Locale(), key, text)}
	}

	trans.indexes[0] = idx
	trans.indexes[1] = idx + len(paramZero)

	idx = strings.Index(text, paramOne)
	if idx == -1 {
		tarr[rule] = nil
		return &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, a Range Translation requires two parameters. locale: '%s' key: '%v' text: '%s'", paramOne, t.Locale(), key, text)}
	}

	trans.indexes[2] = idx
	trans.indexes[3] = idx + len(paramOne)

	return nil
}
738778
func (parser *TransitionParser) Add(stateName string, token string, nextStateName string, flags ParserFlag, callback ParsedFunc) {
	nextStateID := parser.GetStateID(nextStateName)
	parser.AddTransition(stateName, NewTransition(nextStateID, flags, callback), token)
}
541362
def addTranslation(self,translation):
        '''
        '''
        if isinstance(translation, Translation):
            self.translations.append(translation)
        else:
            raise(TranslationError,
                   'translation Type should be Translation, not %s' % type(
                    translation)
                   )