Questions tagged [makemessages]
18 questions
29
votes
6 answers
Django makemessages errors Unknown encoding "utf8"
I installed python separated from yum.
Now, I need to recompile the language pack for the OSQA system, but get this message:
Error: errors happened while running xgettext on __init__.py
xgettext:…

digoferra
- 1,001
- 3
- 17
- 33
15
votes
2 answers
Django makemessages not creating newly added languages
I had 12 languages in my Django app, if I run the command:
python manage.py makemessages --all
It would create all the 12 .po files for the languages, now I added 3 more languages:
LANGUAGES = (
...
('th', gettext('Thai')),
('tl',…

PepperoniPizza
- 8,842
- 9
- 58
- 100
7
votes
2 answers
Django makemessages "struct.error: unpack requires a buffer of 4 bytes"
I have a django instance packed in Docker container in docker-compose.
I'm trying to generate makemessages files for project, but when I try to run makemessages, that's what I receieve in response
root@6fc510c9c5d1:/code# python manage.py…

AndreyPanferov
- 103
- 1
- 9
7
votes
3 answers
makemessages command results in html.py files and a UnicodeDecodeError
When I run this command:
django-admin makemessages -l ar
It gives this error:
Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 65, in force_text
s =…

D. Ahmed
- 345
- 1
- 3
- 18
6
votes
3 answers
django-admin makemessages --no-obsolete doesn't seem to be working
First of all, I am expecting --no-obsolete would comment out msgid and msgstr if gettext is deleted, right?
How I am testing is:
I wrote gettext("some string here") in view
I ran makemessages command
It wrote a .po file as expected
Then I…

Kishor Pawar
- 3,386
- 3
- 28
- 61
6
votes
1 answer
How to integrate multi-languages support by creating language files in Django 2.0?
I want to create a Django 2.0 powered website(including auto generated Admin site) that should support multiple languages.
For now I only want to keep 2 languages English and Arabic.
I read number of tutorials articles on web to use django-admin's…

hygull
- 8,464
- 2
- 43
- 52
5
votes
4 answers
Django Internationalization - Gettext error
Am building a site with Django. After downloading gettext-0.19.8.tar.gz ---> /Users/cohen/Downloads/gettext-0.19.8 and running all of the steps ./configure make and sudo make installation I received this error during it's installation below:
python…

Cohen
- 944
- 3
- 13
- 40
4
votes
2 answers
Django makemessages to get custom translatable strings
In my Django project I use Vue + vue-gettext for i18n.
To make translatable strings I have the following code in my my .vue files:
Hello %{name}
Click here
(using translate tags and…

Djangonaut
- 5,511
- 7
- 40
- 53
3
votes
2 answers
django makemessages does nothing
When I run django-admin makemessages -l en nothing happens and no po files are created. It only says processing locale en
This is my folder structure
/myproject
myapp/
locale/
media/
static/
templates/
db.sqlite
…

Amine Messaoudi
- 2,141
- 2
- 20
- 37
0
votes
0 answers
"I get utf-8 error when django makemessages command runs"
Traceback (most recent call last):
File "manage.py", line 22, in
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "myvenv\Lib\site-packages\django\core\management\__init__.py", line 442, in…

Emre Türkmen
- 9
- 2
0
votes
0 answers
Why makemessages generates *.html.py file from my *.html in the component (django_components) and base.html template?
I am creating my Django website and using django_components in the project. Now I'm thinking about creating a multilingual site: I created the necessary translate tags, added an i18n loader, created a locale folder in the root of the project. Now I…

Vladislav Sokolov
- 152
- 1
- 13
0
votes
0 answers
django makemessages can't translate all words
makemessages can't detect all translation words... I tried all but it didn't work.
My command
django-admin makemessages --all --ignore=venv
# and
python manage.py makemessages --all --ignore=venv
My template
{% load i18n %}
{% trans 'тестовый…

Just Alone
- 1
- 1
0
votes
1 answer
Django makemessages fails both with django-admin and manage.py
I have a fresh Django project with no third-party apps installed. I'm trying to create a multilingual setup, with from django.utils.translation import gettext_lazy as _ in my Python files and {% translate %} in my templates.
When I try to extract…

Danijela Popović
- 92
- 8
0
votes
0 answers
How to automatically flag strings for makemessage translation file in django
I'm creating a signal that sends messages to multiple users, and each message should be translated to the receiver's language.
this is a simplified example of that the alert handler does:
def alert_handler(**kwargs):
t_message =…

pmcoelho
- 1
- 2
0
votes
1 answer
uClinux "make menuconfig" build error on Ubuntu 18.04
There is quite old uClinux-dist-20080808 with uClinux-dist-20080808-20090112 and uClinux_on_stm32 patches for STM32F10x MCU, as described here AN3012.
I use Ubuntu 18.04 (inside VirtualBox) to build uClinux and go through AN3012 step-by-step.
So, I…

KotNitro
- 23
- 1
- 7