Unverified Commit 1e9e30c2 authored by Harshil Sharma's avatar Harshil Sharma Committed by cpanato

#MM-12130 - Fix incorrect key in en.json and changes some translations from...

#MM-12130 - Fix incorrect key in en.json and changes some translations from service terms to terms of service (#9488)

* Fix incorrect key in en.json and changes some translations from service terms to terms of service

* Improved translated messages
parent ee672a72
...@@ -3218,10 +3218,6 @@ ...@@ -3218,10 +3218,6 @@
"id": "ent.cluster.save_config.error", "id": "ent.cluster.save_config.error",
"translation": "System Console is set to read-only when High Availability is enabled unless ReadOnlyConfig is disabled in the configuration file." "translation": "System Console is set to read-only when High Availability is enabled unless ReadOnlyConfig is disabled in the configuration file."
}, },
{
"id": "ent.cluster.save_config.update_custom_service_terms_no_user.error",
"translation": "Custom service terms can only be changed if provided with exactly one user id"
},
{ {
"id": "ent.compliance.bad_export_type.appError", "id": "ent.compliance.bad_export_type.appError",
"translation": "Unknown output format {{.ExportType}}" "translation": "Unknown output format {{.ExportType}}"
...@@ -4756,7 +4752,7 @@ ...@@ -4756,7 +4752,7 @@
}, },
{ {
"id": "model.service_terms.is_valid.text.app_error", "id": "model.service_terms.is_valid.text.app_error",
"translation": "Invalid terms of service text." "translation": "Custom terms of service text is too long. Maximum {{.MaxLength}} characters allowed."
}, },
{ {
"id": "oauth.gitlab.tos.error", "id": "oauth.gitlab.tos.error",
...@@ -6388,19 +6384,19 @@ ...@@ -6388,19 +6384,19 @@
}, },
{ {
"id": "store.sql_service_terms_store.save.existing.app_error", "id": "store.sql_service_terms_store.save.existing.app_error",
"translation": "Must not call save for existing service terms" "translation": "Must not call save for existing terms of service."
}, },
{ {
"id": "store.sql_service_terms.save.app_error", "id": "store.sql_service_terms.save.app_error",
"translation": "Unable to save service terms" "translation": "Unable to save terms of service."
}, },
{ {
"id": "store.sql_service_terms_store.get.app_error", "id": "store.sql_service_terms_store.get.app_error",
"translation": "Unable to fetch service terms" "translation": "Unable to fetch terms of service."
}, },
{ {
"id": "store.sql_service_terms_store.get.no_rows.app_error", "id": "store.sql_service_terms_store.get.no_rows.app_error",
"translation": "No service terms found" "translation": "No terms of service found."
}, },
{ {
"id": "system.message.name", "id": "system.message.name",
......
...@@ -53,12 +53,12 @@ func ServiceTermsFromJson(data io.Reader) *ServiceTerms { ...@@ -53,12 +53,12 @@ func ServiceTermsFromJson(data io.Reader) *ServiceTerms {
} }
func InvalidServiceTermsError(fieldName string, serviceTermsId string) *AppError { func InvalidServiceTermsError(fieldName string, serviceTermsId string) *AppError {
id := fmt.Sprintf("model.term.is_valid.%s.app_error", fieldName) id := fmt.Sprintf("model.service_terms.is_valid.%s.app_error", fieldName)
details := "" details := ""
if serviceTermsId != "" { if serviceTermsId != "" {
details = "service_terms_id=" + serviceTermsId details = "service_terms_id=" + serviceTermsId
} }
return NewAppError("ServiceTerms.IsValid", id, nil, details, http.StatusBadRequest) return NewAppError("ServiceTerms.IsValid", id, map[string]interface{}{"MaxLength": POST_MESSAGE_MAX_RUNES_V2}, details, http.StatusBadRequest)
} }
func (t *ServiceTerms) PreSave() { func (t *ServiceTerms) PreSave() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment