Skip to content

Commit

Permalink
Add catalan language support (#581)
Browse files Browse the repository at this point in the history
* lang_CA

* Flake8

* From "" to ''

* Delete settings

* Delete .coverage

* Refactor Num2Word_CA to remove redundant code and include new tests in japanese language

---------

Co-authored-by: Alberto Castaño <alberto.castano@recog.es>
  • Loading branch information
GemmaMassonisRecog and Alberto Castaño authored Jul 24, 2024
1 parent 5e6fa94 commit ffebd91
Show file tree
Hide file tree
Showing 4 changed files with 691 additions and 10 deletions.
21 changes: 11 additions & 10 deletions num2words/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@

from __future__ import unicode_literals

from . import (lang_AM, lang_AR, lang_AZ, lang_BY, lang_CE, lang_CY, lang_CZ,
lang_DE, lang_DK, lang_EN, lang_EN_IN, lang_EN_NG, lang_EO,
lang_ES, lang_ES_CO, lang_ES_CR, lang_ES_GT, lang_ES_NI,
lang_ES_VE, lang_FA, lang_FI, lang_FR, lang_FR_BE, lang_FR_CH,
lang_FR_DZ, lang_HE, lang_HU, lang_ID, lang_IS, lang_IT,
lang_JA, lang_KN, lang_KO, lang_KZ, lang_LT, lang_LV, lang_NL,
lang_NO, lang_PL, lang_PT, lang_PT_BR, lang_RO, lang_RU,
lang_SK, lang_SL, lang_SR, lang_SV, lang_TE, lang_TG, lang_TH,
lang_TR, lang_UK, lang_VI)
from . import (lang_AM, lang_AR, lang_AZ, lang_BY, lang_CA, lang_CE, lang_CY,
lang_CZ, lang_DE, lang_DK, lang_EN, lang_EN_IN, lang_EN_NG,
lang_EO, lang_ES, lang_ES_CO, lang_ES_CR, lang_ES_GT,
lang_ES_NI, lang_ES_VE, lang_FA, lang_FI, lang_FR, lang_FR_BE,
lang_FR_CH, lang_FR_DZ, lang_HE, lang_HU, lang_ID, lang_IS,
lang_IT, lang_JA, lang_KN, lang_KO, lang_KZ, lang_LT, lang_LV,
lang_NL, lang_NO, lang_PL, lang_PT, lang_PT_BR, lang_RO,
lang_RU, lang_SK, lang_SL, lang_SR, lang_SV, lang_TE, lang_TG,
lang_TH, lang_TR, lang_UK, lang_VI)

CONVERTER_CLASSES = {
'am': lang_AM.Num2Word_AM(),
'ar': lang_AR.Num2Word_AR(),
'az': lang_AZ.Num2Word_AZ(),
'by': lang_BY.Num2Word_BY(),
'ca': lang_CA.Num2Word_CA(),
'ce': lang_CE.Num2Word_CE(),
'cy': lang_CY.Num2Word_CY(),
'cz': lang_CZ.Num2Word_CZ(),
Expand Down Expand Up @@ -80,7 +81,7 @@
'uk': lang_UK.Num2Word_UK(),
'te': lang_TE.Num2Word_TE(),
'hu': lang_HU.Num2Word_HU(),
'is': lang_IS.Num2Word_IS()
'is': lang_IS.Num2Word_IS(),
}

CONVERTES_TYPES = ['cardinal', 'ordinal', 'ordinal_num', 'year', 'currency']
Expand Down
Loading

0 comments on commit ffebd91

Please sign in to comment.