PLT-7: Refactoring stores to use translations (chunk 7)
- Add spanish translations
Этот коммит содержится в:
@@ -45,8 +45,8 @@ func (s SqlAuditStore) Save(audit *model.Audit) StoreChannel {
|
||||
audit.CreateAt = model.GetMillis()
|
||||
|
||||
if err := s.GetMaster().Insert(audit); err != nil {
|
||||
result.Err = model.NewAppError("SqlAuditStore.Save",
|
||||
"We encountered an error saving the audit", "user_id="+
|
||||
result.Err = model.NewLocAppError("SqlAuditStore.Save",
|
||||
"store.sql_audit.save.saving.app_error", nil, "user_id="+
|
||||
audit.UserId+" action="+audit.Action)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ func (s SqlAuditStore) Get(user_id string, limit int) StoreChannel {
|
||||
|
||||
if limit > 1000 {
|
||||
limit = 1000
|
||||
result.Err = model.NewAppError("SqlAuditStore.Get", "Limit exceeded for paging", "user_id="+user_id)
|
||||
result.Err = model.NewLocAppError("SqlAuditStore.Get", "store.sql_audit.get.limit.app_error", nil, "user_id="+user_id)
|
||||
storeChannel <- result
|
||||
close(storeChannel)
|
||||
return
|
||||
@@ -75,7 +75,7 @@ func (s SqlAuditStore) Get(user_id string, limit int) StoreChannel {
|
||||
var audits model.Audits
|
||||
if _, err := s.GetReplica().Select(&audits, "SELECT * FROM Audits WHERE UserId = :user_id ORDER BY CreateAt DESC LIMIT :limit",
|
||||
map[string]interface{}{"user_id": user_id, "limit": limit}); err != nil {
|
||||
result.Err = model.NewAppError("SqlAuditStore.Get", "We encountered an error finding the audits", "user_id="+user_id)
|
||||
result.Err = model.NewLocAppError("SqlAuditStore.Get", "store.sql_audit.get.finding.app_error", nil, "user_id="+user_id)
|
||||
} else {
|
||||
result.Data = audits
|
||||
}
|
||||
@@ -96,7 +96,7 @@ func (s SqlAuditStore) PermanentDeleteByUser(userId string) StoreChannel {
|
||||
|
||||
if _, err := s.GetMaster().Exec("DELETE FROM Audits WHERE UserId = :userId",
|
||||
map[string]interface{}{"userId": userId}); err != nil {
|
||||
result.Err = model.NewAppError("SqlAuditStore.Delete", "We encountered an error deleting the audits", "user_id="+userId)
|
||||
result.Err = model.NewLocAppError("SqlAuditStore.Delete", "store.sql_audit.permanent_delete_by_user.app_error", nil, "user_id="+userId)
|
||||
}
|
||||
|
||||
storeChannel <- result
|
||||
|
||||
Ссылка в новой задаче
Block a user