mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
i18n
This commit is contained in:
@@ -263,7 +263,7 @@ func validateCustomProfileAttributesField(field *model.PropertyField) *model.App
|
||||
}
|
||||
valueTypeStr = strings.TrimSpace(valueTypeStr)
|
||||
if !model.IsKnownCustomProfilteAttributesValueType(valueTypeStr) {
|
||||
return model.NewAppError("CreateCPAField", "app.custom_profile_attributes.unknown_value_type.app_error", map[string]any{"value_type": valueTypeStr}, "", http.StatusUnprocessableEntity)
|
||||
return model.NewAppError("CreateCPAField", "app.custom_profile_attributes.unknown_value_type.app_error", map[string]any{"ValueType": valueTypeStr}, "", http.StatusUnprocessableEntity)
|
||||
}
|
||||
|
||||
field.Attrs[model.CustomProfileAttributesPropertyAttrsValueType] = valueTypeStr
|
||||
@@ -279,7 +279,7 @@ func validateCustomProfileAttributesField(field *model.PropertyField) *model.App
|
||||
for i, option := range optionsArr {
|
||||
optionMap, ok := option.(map[string]any)
|
||||
if !ok {
|
||||
return model.NewAppError("CreateCPAField", "app.custom_profile_attributes.not_map_option.app_error", map[string]any{"index": i}, "", http.StatusUnprocessableEntity)
|
||||
return model.NewAppError("CreateCPAField", "app.custom_profile_attributes.not_map_option.app_error", map[string]any{"Index": i}, "", http.StatusUnprocessableEntity)
|
||||
}
|
||||
option := model.NewCustomProfileAttributesSelectOptionFromMap(optionMap)
|
||||
finalOptions = append(finalOptions, option)
|
||||
@@ -296,7 +296,7 @@ func validateCustomProfileAttributesField(field *model.PropertyField) *model.App
|
||||
if visibilityStr, ok := visibilityAttr.(string); ok {
|
||||
visibilityStr = strings.TrimSpace(visibilityStr)
|
||||
if !model.IsKnownCustomProfilteAttributesVisibility(visibilityStr) {
|
||||
return model.NewAppError("CreateCPAField", "app.custom_profile_attributes.unknown_visibility.app_error", map[string]any{"visibility": visibilityStr}, "", http.StatusUnprocessableEntity)
|
||||
return model.NewAppError("CreateCPAField", "app.custom_profile_attributes.unknown_visibility.app_error", map[string]any{"Visibility": visibilityStr}, "", http.StatusUnprocessableEntity)
|
||||
}
|
||||
visibility = visibilityStr
|
||||
}
|
||||
|
||||
@@ -5018,6 +5018,10 @@
|
||||
"id": "app.custom_profile_attributes.get_property_field.app_error",
|
||||
"translation": "Unable to get Custom Profile Attribute field"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.invalid_options.app_error",
|
||||
"translation": "Unable to validate the options"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.limit_reached.app_error",
|
||||
"translation": "Custom Profile Attributes field limit reached"
|
||||
@@ -5026,6 +5030,18 @@
|
||||
"id": "app.custom_profile_attributes.list_property_values.app_error",
|
||||
"translation": "Unable to get custom profile attribute values"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.not_array_options.app_error",
|
||||
"translation": "The attribute options must be an array"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.not_map_option.app_error",
|
||||
"translation": "The attribute option #{{.Index}} must be a key value pair"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.not_string_value_type.app_error",
|
||||
"translation": "The value type must be a string"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.property_field_delete.app_error",
|
||||
"translation": "Unable to delete Custom Profile Attribute field"
|
||||
@@ -5054,6 +5070,14 @@
|
||||
"id": "app.custom_profile_attributes.search_property_fields.app_error",
|
||||
"translation": "Unable to search Custom Profile Attribute fields"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.unknown_value_type.app_error",
|
||||
"translation": "The value type '{{.ValueType}}' is not supported"
|
||||
},
|
||||
{
|
||||
"id": "app.custom_profile_attributes.unknown_visibility.app_error",
|
||||
"translation": "The visibility '{{.Visibility}}' is not supported"
|
||||
},
|
||||
{
|
||||
"id": "app.delete_scheduled_post.delete_error",
|
||||
"translation": "Failed to delete scheduled post from database."
|
||||
|
||||
Reference in New Issue
Block a user