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:
@@ -0,0 +1,46 @@
|
||||
package constants
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestBuiltinAuthSeedNamesDefaultToEnglish(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if BootstrapAdminNickname != "Super Admin" {
|
||||
t.Fatalf("BootstrapAdminNickname = %q, want %q", BootstrapAdminNickname, "Super Admin")
|
||||
}
|
||||
|
||||
roles := map[string]string{}
|
||||
for _, role := range Roles {
|
||||
roles[role.Code] = role.Name
|
||||
}
|
||||
|
||||
tests := map[string]string{
|
||||
RoleCodeSuperAdmin: "Super Admin",
|
||||
RoleCodeAdmin: "Admin",
|
||||
RoleCodeCsTeamLeader: "Support Team Lead",
|
||||
RoleCodeCsUser: "Support Agent",
|
||||
}
|
||||
for code, want := range tests {
|
||||
if got := roles[code]; got != want {
|
||||
t.Fatalf("role %s name = %q, want %q", code, got, want)
|
||||
}
|
||||
}
|
||||
|
||||
permissions := map[string]string{}
|
||||
for _, permission := range Permissions {
|
||||
permissions[permission.Code] = permission.Name
|
||||
}
|
||||
|
||||
permissionTests := map[string]string{
|
||||
"user.view": "View users",
|
||||
"ticket.create": "Create tickets",
|
||||
"conversation.send": "Send conversation messages",
|
||||
"channel.view": "View channels",
|
||||
"agent.view": "View agents",
|
||||
}
|
||||
for code, want := range permissionTests {
|
||||
if got := permissions[code]; got != want {
|
||||
t.Fatalf("permission %s name = %q, want %q", code, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user