Skip to content

AltchaField language argument is not working #22

@xgimp

Description

@xgimp

django_altcha package does not contain js file with altcha translations - https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist_i18n/all.min.js, therefore the language detection from <html lang=""> attribute does not work. As well as language argument in AltchaField()

Prerequisites:

  • django-altcha==0.4.0 installed

How to reproduce:

  1. do not provide ALTCHA_JS_URL so the default is used
  2. create some form field with non-default language argument, for example: AltchaField(language="cs")

Expected result:

  • AltchaField should be displayed in Czech language

workaround:
Add <script src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist_i18n/all.min.js" type="module"></script> to your template. Or https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist_i18n/<lang-code>.min.js if you don't want to import all languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions