commit 04f6505d983be47cf47d6c04e69bf0002c623650
parent 65808e644bb2606c8d93bfa965530062623b8d3e
Author: Krist Baliev <kbaliev@mozilla.com>
Date: Wed, 7 Jan 2026 09:57:00 +0000
Bug 1932823 - Add rules for classifying MX neighborhood fields correctly and filling them in. r=dimi
- Colonia / Neighborhood recognized now and filled in.
- The Estado - Municipio (state - municipality) field is not an issue because shopee determines it correctly after filling in the other fields.
- Nº. Exterior (house number) fixed in D276667.
- Entre calles. Referencias. field is not an issue because it specifically asks the user to fill in optional information about two surrounding streets in the area.
Differential Revision: https://phabricator.services.mozilla.com/D274590
Diffstat:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/toolkit/components/formautofill/shared/HeuristicsRegExp.sys.mjs b/toolkit/components/formautofill/shared/HeuristicsRegExp.sys.mjs
@@ -64,7 +64,8 @@ export const HeuristicsRegExp = {
"address-level2":
"città" + // it-IT
"|miasto|miejscowosc|miejscowość" + //pl-PL
- "|\\bstad|woonplaats|plaats", // nl
+ "|\\bstad|woonplaats|plaats" + // nl
+ "|ciudad", // es-MX
"address-housenumber":
"(house|building|street1?)[\\s\\-_]*number|hausnummer|haus|house[a-z\-]*n(r|o)" +
"|n[úu]mero(?!\\s*int)|exterior" +
@@ -73,7 +74,7 @@ export const HeuristicsRegExp = {
"address-level3":
"(^address-?level-?3$)" +
"|neighbou*rhood|barrio|bairro|colonia|suburb", // en/es/pt/mx/au/nz
- "postal-code":
+ "postal-code":
"^PLZ(\\b|\\*)" + // de-DE
"|kod.?pocztowy", // pl-PL
"given-name":
@@ -174,7 +175,7 @@ export const HeuristicsRegExp = {
"|(^street-?3$)",
"address-level2":
- "(^city$)" +
+ "(^city$)" +
"|(^town$)" +
"|(^address-?level-?2$)" +
"|(^address-?city$)" +
@@ -450,7 +451,7 @@ export const HeuristicsRegExp = {
"address-line2":
"address[_-]?line(2|two)|address2|addr2|street|suite|unit(?!e)" + // Firefox adds `(?!e)` to unit to skip `United State`
"|adresszusatz|ergänzende.?angaben" + // de-DE
- "|direccion2|colonia|adicional" + // es
+ "|direccion2|adicional" + // es
"|addresssuppl|complementnom|appartement" + // fr-FR
"|indirizzo2" + // it-IT
"|住所2" + // ja-JP
@@ -462,7 +463,7 @@ export const HeuristicsRegExp = {
"address-line3":
"address[_-]?line(3|three)|address3|addr3|street|suite|unit(?!e)" + // Firefox adds `(?!e)` to unit to skip `United State`
"|adresszusatz|ergänzende.?angaben" + // de-DE
- "|direccion3|colonia|adicional" + // es
+ "|direccion3|adicional" + // es
"|addresssuppl|complementnom|appartement" + // fr-FR
"|indirizzo3" + // it-IT
"|住所3" + // ja-JP