// DeleteTranslation delete translation into DB backend
327970
func (backend *Backend) DeleteTranslation(t *i18n.Translation) error {
	return backend.DB.Where(Translation{Key: t.Key, Locale: t.Locale}).Delete(&Translation{}).Error
}
967415
func (h *Server) deleteConversationLocal(ctx context.Context, arg chat1.DeleteConversationLocalArg) (res chat1.DeleteConversationLocalRes, err error) {
	ui := h.getChatUI(arg.SessionID)
	confirmed := arg.Confirmed
	if !confirmed {
		confirmed, err = ui.ChatConfirmChannelDelete(ctx, chat1.ChatConfirmChannelDeleteArg{
			SessionID: arg.SessionID,
			Channel:   arg.ChannelName,
		})
		if err != nil {
			return res, err
		}
	}
	if !confirmed {
		return res, errors.New("channel delete unconfirmed")
	}

	_, err = h.remoteClient().DeleteConversation(ctx, arg.ConvID)
	if err != nil {
		return res, err
	}
	res.Offline = h.G().InboxSource.IsOffline(ctx)
	return res, nil
}
970938
func (m *CouchDBBackend) Delete(ctx context.Context, key string) error {
	m.permitPool.Acquire()
	defer m.permitPool.Release()

	return m.DeleteInternal(ctx, key)
}
340268
func (db *Database) buildDelete() string {
	var query bytes.Buffer
	query.WriteString(db.buildCTE())
	query.WriteString("DELETE FROM ")

	// Model only
	if len(db.tables) != 1 {
		db.panicLog("Unable to infer table name for Delete. Use Delete(model) or Model(model)")
	}
	query.WriteString(db.tables[0])

	// Where (mandatory)
	if len(db.whereFields) == 0 {
		db.panicLog("Where statement is mandatory in Delete")
	}

	query.WriteString(db.buildWhere())
	query.WriteString(";")

	qs := query.String()
	db.printLog(qs)
	return qs
}
820269
func (i18n *I18n) LoadTranslations() map[string]map[string]*Translation {
	var translations = map[string]map[string]*Translation{}

	for i := len(i18n.Backends); i > 0; i-- {
		backend := i18n.Backends[i-1]
		for _, translation := range backend.LoadTranslations() {
			if translations[translation.Locale] == nil {
				translations[translation.Locale] = map[string]*Translation{}
			}
			translations[translation.Locale][translation.Key] = translation
		}
	}
	return translations
}
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)
}
135477
func (backend *Backend) LoadTranslations() (translations []*i18n.Translation) {
	backend.DB.Find(&translations)
	return translations
}
194657
func (db *Database) Delete(key []byte) error {
	db.lock.Lock()
	defer db.lock.Unlock()

	if db.db == nil {
		return errMemorydbClosed
	}
	delete(db.db, string(key))
	return nil
}
747857
func NewTranslation() *Translation {
	tr := new(Translation)
	tr.Trs = make(map[int]string)

	return tr
}
361818
func (s *MigrationService) DeleteUserMigration(ctx context.Context, id int64) (*Response, error) {
	url := fmt.Sprintf("user/migrations/%v/archive", id)

	req, err := s.client.NewRequest("DELETE", url, nil)
	if err != nil {
		return nil, err
	}

	// TODO: remove custom Accept header when this API fully launches.
	req.Header.Set("Accept", mediaTypeMigrationsPreview)

	return s.client.Do(ctx, req, nil)
}
1350459
func GetTranslationFunc(reader LocaleReader) (TranslateFunc, error) {
	locale, err := determineLocale(reader)
	if err != nil {
		locale = defaultLocale
	}

	rawTranslation, err := loadAssetFromResources(locale)
	if err != nil {
		rawTranslation, err = loadAssetFromResources(defaultLocale)
		if err != nil {
			return nil, err
		}
	}

	return generateTranslationFunc(rawTranslation)
}
879354
func (k RuleTranslator) Translate(r *api.Rule, result *policy.TranslationResult) error {
	for egressIndex := range r.Egress {
		err := k.TranslateEgress(&r.Egress[egressIndex], result)
		if err != nil {
			return err
		}
	}
	return nil
}
1059064
func (mat *T) SetTranslation(v *vec2.T) *T {
	mat[2][0] = v[0]
	mat[2][1] = v[1]
	return mat
}
899324
func (n NamespacedKV) Delete(key string) {
	n.db.Delete(n.prefixedKey(key), nil)
}
1123780
func AddTranslation(lang *language.Language, translations ...translation.Translation) {
	defaultBundle.AddTranslation(lang, translations...)
}
1299252
func (c *Client) DeleteInstallation(installation Installation) error {
	uri := fmt.Sprintf("/1/installations/%s", installation.ObjectID())
	resp, err := c.doSimple("DELETE", uri)
	defer resp.Body.Close()
	c.trace("DeleteInstallation", uri)
	return err
}
1006299
func (db *CLevelDB) Delete(key []byte) {
	key = nonNilBytes(key)
	err := db.db.Delete(db.wo, key)
	if err != nil {
		panic(err)
	}
}