GoogleChromeLabs / ps-analysis-tool

Privacy Sandbox Analysis Chrome Extension and CLI for analysis and understanding of cookie usage on web pages, and new privacy-preserving Chrome APIs
https://www.privacysandbox.com
Apache License 2.0
90 stars 18 forks source link

Feature: Add and implement i18n translation locales. #713

Closed mayan-000 closed 2 weeks ago

mayan-000 commented 3 weeks ago

Description

This PR implements the i18n getMessage function across strings whose translations are available.

Relevant Technical Choices

Testing Instructions

Additional Information:

Screenshot/Screencast

Screenshot 2024-06-11 at 19 35 49


Checklist

Fixes #566

milindmore22 commented 2 weeks ago

npm run cli -- -u https://bbc.com -l hi

image

Suggest languages available supported: en, hi, ja, ko, pt-BR

npm run cli -- -u https://www.math-only-math.com/ -l   

> ps-analysis-tool@0.8.0 cli
> node packages/cli/dist/main.js "-u" "https://www.math-only-math.com/" "-l"

error: option '-l, --locale <value>' argument missing

It should validate an invalid value being passed for -l argument not valid locale option, currently supported: en, hi, ja, ko, pt-BR

╭─milind at Milind’s MacBook Air in ~/projects/ps-analysis-tool on feat/implement-i18n✔ using 
╰─± npm run cli -- -u https://www.math-only-math.com/ -l st

> ps-analysis-tool@0.8.0 cli
> node packages/cli/dist/main.js "-u" "https://www.math-only-math.com/" "-l" "st"

✓ Done analyzing cookies.
✓ Done analyzing technologies.
Report created successfully: /Users/milind/projects/ps-analysis-tool/out/www-math-only-math-com/index.html
fellyph commented 2 weeks ago

[QA]

  1. Captura de Tela 2024-06-19 às 13 42 17
  2. Captura de Tela 2024-06-19 às 14 15 13