Refactor localization strings to English across various services and UI components
- Updated titles and subtitles in channel_service.go for web channel and WeChat MP channel configurations. - Changed handoff messages in conversation_human_dispatch_service.go to English. - Modified notification messages in event handlers for ticket and conversation assignments to English. - Adjusted ticket creation messages in ticket_service.go to reflect English localization. - Updated default locale settings in i18n configuration files to English (en-US). - Changed HTML language attribute in layout.tsx to English. - Refactored widget locale detection logic in agent-desk-sdk.ts to prioritize English.
This commit is contained in:
@@ -13,7 +13,7 @@ func T(ctx *gin.Context, messageID string, data map[string]any) string {
|
||||
}
|
||||
}
|
||||
}
|
||||
return TLocale(LocaleZhCN, messageID, data)
|
||||
return TLocale(DefaultLocale, messageID, data)
|
||||
}
|
||||
|
||||
func TLocale(locale string, messageID string, data map[string]any) string {
|
||||
@@ -22,8 +22,8 @@ func TLocale(locale string, messageID string, data map[string]any) string {
|
||||
if message != "" {
|
||||
return message
|
||||
}
|
||||
if normalized != LocaleZhCN {
|
||||
message = localize(LocaleZhCN, messageID, data)
|
||||
if normalized != DefaultLocale {
|
||||
message = localize(DefaultLocale, messageID, data)
|
||||
if message != "" {
|
||||
return message
|
||||
}
|
||||
@@ -32,7 +32,7 @@ func TLocale(locale string, messageID string, data map[string]any) string {
|
||||
}
|
||||
|
||||
func localize(locale string, messageID string, data map[string]any) string {
|
||||
localizer := i18n.NewLocalizer(Bundle(), locale, LocaleZhCN)
|
||||
localizer := i18n.NewLocalizer(Bundle(), locale, DefaultLocale)
|
||||
message, err := localizer.Localize(&i18n.LocalizeConfig{
|
||||
MessageID: messageID,
|
||||
TemplateData: data,
|
||||
|
||||
Reference in New Issue
Block a user