Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
French locale is breaking button function

The problem

Buttons are not functioning properly if a user is viewing the site in French locale.

Background Info

I am using {% trans %} tag to translate button text directly in my Django template. Inside of my script tags, I am also using {% trans %} tags to add translation after a button action is triggered (onclick): let show_correction = '{% trans "Show native corrections" %}';.

In French locale it becomes: let show_correction='Afficher les corrections d'autres locuteurs natifs';. I think the issue is happening specifically in d'autres.

My Guess

Maybe the function is terminating earlier because of the apostrophe?


How in the world can I fix this?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Solution: https://docs.djangoproject.com/en/3.2/topics/i18n/translation/#module-django.views.i18n

Basic usage:

let foo = gettext("Your string to be translated");
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda