Skip to content

chore: Add pt-br as a mandatory language on CI #673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 14, 2025
Merged

Conversation

tuliomir
Copy link
Contributor

Acceptance Criteria

  • The language pt-br must have all translations completed to pass the CI validation
  • There should be a way for the developer to set arbitrary languages to this validation locally in dev environment

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@tuliomir tuliomir added the enhancement New feature or request label Mar 28, 2025
@tuliomir tuliomir self-assigned this Mar 28, 2025
@tuliomir tuliomir moved this from Todo to In Progress (WIP) in Hathor Network Mar 28, 2025
@tuliomir tuliomir moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Mar 28, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that the 'pt-br' translation is enforced as mandatory in CI while also enabling developers to override the strict language setting locally through a CLI argument.

  • Added detailed usage documentation for the update_translations script
  • Introduced a CLI parameter (--strict-languages) to allow overriding mandatory languages for local development
  • Updated the translation check logic to conditionally enforce strict validation based on provided languages
Files not reviewed (1)
  • locale/pt-br/texts.po: Language not supported


return {
isCiValidationRun: parameters['ci-validation'] || false,
strictLanguages: parameters['strict-languages']?.split(',') || mandatoryTranslations,
Copy link
Preview

Copilot AI Mar 28, 2025

Choose a reason for hiding this comment

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

When '--strict-languages' is provided with an empty value, splitting it will return [''] instead of defaulting to mandatoryTranslations. Consider adding a check to use mandatoryTranslations if the resulting array is empty or contains an empty string.

Suggested change
strictLanguages: parameters['strict-languages']?.split(',') || mandatoryTranslations,
strictLanguages: (parameters['strict-languages']?.split(',').filter(lang => lang) || mandatoryTranslations).length ? parameters['strict-languages']?.split(',').filter(lang => lang) : mandatoryTranslations,

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed in 31e8b02

@tuliomir tuliomir moved this from In Progress (Done) to In Review (WIP) in Hathor Network Apr 11, 2025
@andreabadesso andreabadesso removed the status in Hathor Network Apr 11, 2025
@tuliomir tuliomir moved this to In Review (WIP) in Hathor Network Apr 14, 2025
@tuliomir tuliomir merged commit 512fff5 into master Apr 14, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Apr 14, 2025
@tuliomir tuliomir deleted the chore/ptbr-on-ci branch April 14, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Waiting to be deployed
Development

Successfully merging this pull request may close these issues.

3 participants