package qaopsfields import "testing" func TestLanguageIgnoresProductNamesAndRequiresNaturalLanguage(t *testing.T) { cases := map[string]string{"MG400 怎么连接 PLC?": "zh", "DobotStudio Pro 的 SDK 支持什么?": "zh", "How do I connect MG400 to a PLC?": "en", "MG400 / SDK / Modbus TCP": "und", "CR10A-Ex 10kg": "und", "MG400の接続方法を教えてください": "ja", "MG400 연결 방법을 알려 주세요": "ko", "Comment connecter MG400 au PLC ?": "fr", "Wie kann ich MG400 verbinden?": "de", "¿Cómo conectar MG400 al PLC?": "es", "": "und", "https://example.invalid/how/to/connect": "und", "`how to connect`": "und", "MG400 / SDK / Modbus TCP / 10kg": "und"} for input, want := range cases { if got := DetectLanguage(input); got != want { t.Errorf("language=%q want %q", got, want) } } }