func (s *Set) Tfunc() (bundle.TranslateFunc, error) {
	s.initWG.Wait()
	if s.err != nil {
		return nil, s.err
	}
	return func(id string, args ...interface{}) string {
		if s.tfunc != nil {
			if result := s.tfunc(id, args...); result != id {
				return result
			}
			log.Debugf("No result looking up tag '%s'", id)
		}
		if result := s.fallbackTfunc(id, args...); result != id {
			return result
		}
		log.Debugf("No result looking up fallback tag '%s'", id)
		return id
	}, nil
}
// Tfunc returns a translation function.
Tfunc returns a translation function.
// Tfunc returns a translation function .
func (s *Set) Tfunc() (bundle.TranslateFunc, error) {
	s.initWG.Wait()
	if s.err != nil {
		return nil, s.err
	}
	return func(id string, args ...interface{}) string {
		if s.tfunc != nil {
			if result := s.tfunc(id, args...); result != id {
				return result
			}
			log.Debugf("No result looking up tag '%s'", id)
		}
		if result := s.fallbackTfunc(id, args...); result != id {
			return result
		}
		log.Debugf("No result looking up fallback tag '%s'", id)
		return id
	}, nil
}
func ( s * Set ) Tfunc ( ) ( bundle . TranslateFunc , error ) { s . initWG . Wait ( ) if s . err != nil { return nil , s . err } return func ( id string , args ... interface { } ) string { if s . tfunc != nil { if result := s . tfunc ( id , args ... ) ; result != id { return result } log . Debugf ( " " , id ) } if result := s . fallbackTfunc ( id , args ... ) ; result != id { return result } log . Debugf ( " " , id ) return id } , nil }
Tfunc returns a translation function.
Tfunc returns a translation function .