Translation error #8773

Closed
opened 2025-12-29 20:41:03 +01:00 by adam · 3 comments
Owner

Originally created by @renatoalmeidaoliveira on GitHub (Oct 25, 2023).

NetBox version

v3.6.1

Python version

3.10

Steps to Reproduce

  1. Enter on NetBox venv
  2. Run # python manage.py makemessages -l pt_BR

Expected Behavior

Localtion files created

Observed Behavior

(venv) root@netbox:/opt/netbox/netbox# python manage.py makemessages -l pt_BR
Traceback (most recent call last):
  File "/opt/netbox-3.6.1/netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 430, in handle
    potfiles = self.build_potfiles()
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 508, in build_potfiles
    self.process_files(file_list)
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 599, in process_files
    self.process_locale_dir(locale_dir, files)
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 619, in process_locale_dir
    build_file.preprocess()
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 123, in preprocess
    content = templatize(src_data, origin=self.path[2:])
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/utils/translation/__init__.py", line 261, in templatize
    return templatize(src, **kwargs)
  File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/utils/translation/template.py", line 141, in templatize
    raise SyntaxError(
SyntaxError: Translation blocks must not include other block tags: load i18n (file project-static/docs/development/internationalization/index.html, line 5617)

Workaroud

Move/Delete the file:
project-static/docs/development/internationalization/index.html

Originally created by @renatoalmeidaoliveira on GitHub (Oct 25, 2023). ### NetBox version v3.6.1 ### Python version 3.10 ### Steps to Reproduce 1. Enter on NetBox venv 2. Run `# python manage.py makemessages -l pt_BR` ### Expected Behavior Localtion files created ### Observed Behavior ``` (venv) root@netbox:/opt/netbox/netbox# python manage.py makemessages -l pt_BR Traceback (most recent call last): File "/opt/netbox-3.6.1/netbox/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv self.execute(*args, **cmd_options) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute output = self.handle(*args, **options) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 430, in handle potfiles = self.build_potfiles() File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 508, in build_potfiles self.process_files(file_list) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 599, in process_files self.process_locale_dir(locale_dir, files) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 619, in process_locale_dir build_file.preprocess() File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/core/management/commands/makemessages.py", line 123, in preprocess content = templatize(src_data, origin=self.path[2:]) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/utils/translation/__init__.py", line 261, in templatize return templatize(src, **kwargs) File "/opt/netbox-3.6.1/venv/lib/python3.10/site-packages/django/utils/translation/template.py", line 141, in templatize raise SyntaxError( SyntaxError: Translation blocks must not include other block tags: load i18n (file project-static/docs/development/internationalization/index.html, line 5617) ``` ## Workaroud Move/Delete the file: `project-static/docs/development/internationalization/index.html`
adam added the type: bug label 2025-12-29 20:41:03 +01:00
adam closed this issue 2025-12-29 20:41:03 +01:00
Author
Owner

@DanSheps commented on GitHub (Oct 25, 2023):

You need to exclude the project-static directory, however this is not ready for prime-time yet and as such any issues you run into we cannot yet support.

@DanSheps commented on GitHub (Oct 25, 2023): You need to exclude the project-static directory, however this is not ready for prime-time yet and as such any issues you run into we cannot yet support.
Author
Owner

@jeremystretch commented on GitHub (Oct 27, 2023):

I'd like to determine why this is occurring. I don't have this issue running makemessages against the current feature branch. (I've started working on Spanish under #14075.)

@jeremystretch commented on GitHub (Oct 27, 2023): I'd like to determine why this is occurring. I don't have this issue running `makemessages` against the current `feature` branch. (I've started working on Spanish under #14075.)
Author
Owner

@jeremystretch commented on GitHub (Nov 29, 2023):

Closing this out as there's been no further investigation. Happy to reopen if this problem resurfaces.

@jeremystretch commented on GitHub (Nov 29, 2023): Closing this out as there's been no further investigation. Happy to reopen if this problem resurfaces.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8773