Open guilhermefacanha opened 6 months ago
The same issue happens with me too! I am running version 4.0.0
Same problem here in version 4, I had to switch back to English, do you want anything?
@dosu-bot
Hello, @rusackas! I'm here to help you with any issues you may have while waiting for a human maintainer. I can help you solve bugs, answer questions, and become a contributor. Let me know how I can assist you!
To resolve the "not enough arguments for format string" error in Apache Superset when switching the language to Portuguese (BR) and attempting to preview or execute SQL statements, you need to ensure that the translation strings in the messages.po
file correctly match the placeholders used in the original English strings.
For example, there is a mismatch in the translation for the following message:
#: superset/commands/database/validate_sql.py:74
#, python-format
msgid ""
"%(validator)s was unable to check your query.\n"
"Please recheck your query.\n"
"Exception: %(ex)s"
msgstr ""
"%(validador)es não conseguiu verificar sua consulta.\n"
"Por favor revise sua consulta.\n"
"Exceção: %(ex)s"
The placeholder %(validator)s
in the original message is incorrectly translated as %(validador)es
in the Portuguese message. The correct translation should maintain the same placeholder names:
msgstr ""
"%(validator)s não conseguiu verificar sua consulta.\n"
"Por favor revise sua consulta.\n"
"Exceção: %(ex)s"
Ensure that all placeholders in the translated strings match the original placeholders exactly. This should resolve the "not enough arguments for format string" error [1].
To continue talking to Dosu, mention @dosu.
Bug description
I'm using version 3.1.1
When I have superset configured in English, I can load tables, preview, and execute SQL without problems
When I switch to Portuguese language, I start getting
not enough arguments for format string
error in preview or any sql executionLog
How to reproduce the bug
Screenshots/recordings
No response
Superset version
3.1.1
Python version
3.9
Node version
I don't know
Browser
Firefox
Additional context
No response
Checklist