Kaworu
Active Coder
Hi!
I found this tutorial for using gettext with Python. I am in this step:
My locales are located in a folder like that:
[The folder gettext-learning also contain main.py file, which is the file I wanna translate]
So I used a command like that:
With the first use, I got:
With the second:
The problem is, I cannot find in the locales folder the file base.pot. And I am sure my file browser shows hidden files.
Where is the base.pot file? Did it even got generated? And what exactly I am doing wrong?
Sorry if this is a trivial question, it’s my first time ever using that library and I am a total newbie...
PS. I have found some info according to which I should run the command in python, but… this is the result of such an command:
Eh… I am totally lost
I found this tutorial for using gettext with Python. I am in this step:
Code:
$ pygettext.py -d base -o locales/base.pot src/main.py
My locales are located in a folder like that:
Code:
C:\Users\DELL\Desktop\gettext-learning\locales
[The folder gettext-learning also contain main.py file, which is the file I wanna translate]
So I used a command like that:
Code:
C:\Users\DELL\AppData\Local\Programs\Python\Python310\Tools\i18n>pygettext.py -d base -o C:\Users\DELL\Desktop\gettext-learning\locales src/main.py
With the first use, I got:
Code:
[main 2023-05-10T11:23:27.406Z] update#setState idle
[main 2023-05-10T11:23:57.496Z] update#setState checking for updates
[main 2023-05-10T11:23:57.672Z] update#setState idle
[main 2023-05-10T11:24:07.325Z] Extension host with pid 10696 exited with code: 0, signal: unknown.
With the second:
Code:
[main 2023-05-10T11:26:03.302Z] update#setState idle
[main 2023-05-10T11:26:18.824Z] Extension host with pid 3464 exited with code: 0, signal: unknown.
The problem is, I cannot find in the locales folder the file base.pot. And I am sure my file browser shows hidden files.
Where is the base.pot file? Did it even got generated? And what exactly I am doing wrong?
Sorry if this is a trivial question, it’s my first time ever using that library and I am a total newbie...
PS. I have found some info according to which I should run the command in python, but… this is the result of such an command:
Code:
py C:\Users\DELL\AppData\Local\Programs\Python\Python310\Tools\i18n>pygettext.py -d base -o C:\Users\DELL\Desktop\gettext-learning\locales src/main.py
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe: can't find '__main__' module in 'C:\\Users\\DELL\\AppData\\Local\\Programs\\Python\\Python310\\Tools\\i18n'
Eh… I am totally lost