Skip to content

Conversation

@elenae098
Copy link

@elenae098 elenae098 commented Dec 4, 2024

Fixes #501 by adjusting the lows array in both Portuguese and Spanish files, so that the file no longer goes over the length of the array and incorrectly says that the inputted number is larger than the max value.

Changes proposed in this pull request:

  • Override the inherited set_high_numwords function in lang_EU.py in Portuguese (PT and PT_BR) and Spanish (ES)
  • Adjust the lows[] array of languages to account for naming conventions
  • Add new Portuguese translation tests
  • Fix one Portuguese test that incorrectly translated

Status

  • READY
  • HOLD
  • WIP (Work-In-Progress)

How to verify this change

Input any number between 0 - one nonillion to Spanish or Portuguese and ensure the translation is correct. Can also run the test file to verify this change in Portuguese.

Additional notes

This change edited the lows array because billions/quadrillions/sextillions in Spanish/Portuguese have the same root word as the power of ten before it, but with 'mil' added in front. EX in Spanish: (milion = "millón", billion = "mil millón", trillion = "billón", quadrillion = "mil billón").

… number it could handle, added new tests in Portuguese
@elenae098
Copy link
Author

@mrodriguezg1991 Tagging for review per Mohammed's email. Thank you.

@bryananderson
Copy link
Contributor

@elenae098 looks like some linter problems, although it's weird that they only show up in 3.10:

  ./tests/test_pt.py:87:42: W291 trailing whitespace
  ./tests/test_pt.py:95:43: W291 trailing whitespace
  ./tests/test_pt.py:126:80: E501 line too long (81 > 79 characters)
  ./tests/test_pt.py:174:5: E303 too many blank lines (2)

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.

Big numbers for Portuguese and Spanish are failed

3 participants