diff --git a/app/src/main/java/io/github/jd1378/otphelper/utils/CodeExtractor.kt b/app/src/main/java/io/github/jd1378/otphelper/utils/CodeExtractor.kt index a472ace1..98e58817 100644 --- a/app/src/main/java/io/github/jd1378/otphelper/utils/CodeExtractor.kt +++ b/app/src/main/java/io/github/jd1378/otphelper/utils/CodeExtractor.kt @@ -27,6 +27,7 @@ class CodeExtractor { "\\bTAN\\b", "\\bmTAN\\b", "\\bmã\\W", // "code" in vietnamese + "codice", // "code" in italian ) private val ignoredWords = diff --git a/app/src/test/java/io/github/jd1378/otphelper/CodeDetectionUnitTest.kt b/app/src/test/java/io/github/jd1378/otphelper/CodeDetectionUnitTest.kt index 884727d5..2d076738 100644 --- a/app/src/test/java/io/github/jd1378/otphelper/CodeDetectionUnitTest.kt +++ b/app/src/test/java/io/github/jd1378/otphelper/CodeDetectionUnitTest.kt @@ -487,4 +487,11 @@ code: 123456 assertEquals(false, CodeIgnore.shouldIgnore(msg)) assertEquals("123456", CodeExtractor.getCode(msg)) } + + @Test + fun italianCode1() { + val msg = "Il tuo codice di sicurezza è: 123456" + assertEquals(false, CodeIgnore.shouldIgnore(msg)) + assertEquals("123456", CodeExtractor.getCode(msg)) + } }