Skip to content

fix: correct Encarnación spelling and accent-insensitive address matching - #708

Open
kaio-donadelli wants to merge 5 commits into
mainfrom
feat/loc-28704-pry-encarnacion
Open

kaio-donadelli wants to merge 5 commits into
mainfrom
feat/loc-28704-pry-encarnacion

Conversation

@kaio-donadelli

@kaio-donadelli kaio-donadelli commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request?

Fix Paraguay Encarnación spelling while keeping saved addresses and postal code selectors working when accents differ.

Summary

  • Rename Encarnacion → Encarnación in react/country/PRY.ts
  • Match saved option values accent-insensitively in validateAddress.ts (strict for geolocated fields)
  • Resolve nested optionsMap and postal code lookups with cleanStr
  • Fix SelectPostalCode blank value when saved city spelling differs from country data

Tests

  • validateAddress, fields, postalCode, and SelectPostalCode regression tests with country/__mocks__ fixtures

Tracked in LOC-28704

LOC-28704 — cocacolapy requested the accented city name in Itapúa.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kaio-donadelli
kaio-donadelli requested a review from a team as a code owner August 26, 2026 11:12
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-pr-sentinel

vtex-pr-sentinel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

🛡️ SDD Check — action required

I couldn't detect an SDD in this PR. Please check one option below (requires write access to the repo):

  • SDD lives in another PR — paste the SDD PR URL here:
  • This PR doesn't need an SDD
  • SDD applies, but I'm not adopting it in this PR

@fdaciuk fdaciuk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duas dúvidas em linha antes de seguir — ver comentários inline.

Comment thread react/country/PRY.ts Resolved
Comment thread react/country/PRY.ts Resolved
kaio-donadelli and others added 2 commits August 27, 2026 08:07
Use accent-insensitive matching for non-geolocated addresses and add regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix Sonar warning about accentInsensitive controlling normalizeOptionValue behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kaio-donadelli
kaio-donadelli requested a review from fdaciuk August 27, 2026 11:35

@fdaciuk fdaciuk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug bloqueante em endereços de 3 níveis (ver comentário inline); a descrição do PR também não menciona a mudança de comportamento em validateAddress.ts nem segue o formato de seções do AGENTS.md.

Comment thread react/validateAddress.ts Resolved
Comment thread react/validateAddress.test.ts Resolved
Comment thread react/validateAddress.test.ts Resolved
Normalize nested optionsMap keys, resolve SelectPostalCode values for saved
addresses, and expand validation/selector test coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kaio-donadelli kaio-donadelli changed the title fix: correct Encarnación spelling in Paraguay country data fix: correct Encarnación spelling and accent-insensitive address matching Aug 27, 2026
Replace Ljubljana placeholder with San Salvador address, keeping each locale prefix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonar-workflows

Copy link
Copy Markdown

Comment thread messages/pt.json
"address-form.geolocation.example.SAU": "Ex.: 8078 Al Imam Saud Ibn Abdul Aziz Branch Rd, Al Mursilat, Riyadh 12464",
"address-form.geolocation.example.SGP": "Ex.: 15-3 Jalan Riang 358987",
"address-form.geolocation.example.SLV": "Ex.: Štefanova ulica 6, 1000 Ljubljana",
"address-form.geolocation.example.SLV": "Ex.: Av. Masferrer Norte, San Salvador",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esse ajuste corrigiu o texto certo, mas foi feito à mão aqui e em mais 25 arquivos de idioma (messages/*.json + context.json), além de en.json. O Crowdin ainda é usado para traduzir este repositório? Se sim, essa edição manual pode ser sobrescrita na próxima sincronização, voltando ao texto errado em todo idioma que não seja en. Se o Crowdin não é mais usado, tudo bem manter a edição direta, mas talvez valha atualizar a regra do repositório que diz que só en.json deve ser editado manualmente.

Comment thread react/selectors/fields.ts
)
}

export function findOptionsMapKey<T>(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findOptionsMapKey é função nova em react/selectors/ e não tem teste próprio — os casos em que não encontra correspondência (options ou value vazios ou sem match) não são testados, só o caminho de sucesso (via getThirdLevelOptions/getThreeLevelsPostalCodes). A regra de testes do repositório exige teste para toda função nova em react/selectors/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants