Questions tagged [xgettext]
104 questions
1
vote
2 answers
Application gettext not visible for Django translation on Mountain Lion
I'm trying to translate my applications in my Django project. My development machine works under control OSX Mountain Lion, which out of the box doesn't have installed gettext, so I've installed this application with Homebrew:
brew install…

Gie
- 1,907
- 2
- 24
- 49
1
vote
1 answer
xgettext to generate po file from html files
This is something I am trying so hard to get. tried a bunch of options, including this one found here Extracting gettext strings from Javascript and HTML files (templates). No go.
this is the sample html
Sujesh Arukil
- 2,469
- 16
- 37

Sujesh Arukil
- 2,469
- 16
- 37
1
vote
1 answer
Python line numbers with xgettext
It is my understanding that most uses of gettext with Python files use some nice Python library/utility to create the .pot files. I am in an odd circumstance where I need to use the Python mode of xgettext to extract not only strings, but the line…

BlackVegetable
- 12,594
- 8
- 50
- 82
1
vote
1 answer
xgettext gives me a strange output for a simple line:
I'm using xgettext to greate a .po file. But it gives me a strange output for a simple line:
Results in:
msgid ""
"You must click the link to verify your…

Xairoo
- 335
- 1
- 9
1
vote
2 answers
How to get text inside array?
I have this array:
var arr = ['
Paragraph 1
', '
Paragraph 2
', '
Paragraph 3
'] How can I get the text Paragraph 3 from this array?
user2308046
1
vote
1 answer
How to recognize translatable strings by xgettext in PHP Arrays or DocBlocks (without method calls)?
I'm using poEdit with the xgettext-Parser to parse my PHP source files and detect all translatable strings. By default, xgettext only recognizes strings in function calls like translate("foo"),
if "translate" is specified as a keyword for…

Marcus Kliche
- 11
- 2
1
vote
1 answer
In a project using GNU Autotools, is there a task to launch xgettext?
Summary :
I have a project using GNU Autotools. I have a pot file. I need to update it. Is there a magical "make" task that run xgettext for me (I'm lazy ?)
Verbose version :
Hi
I am trying to setup a project using GNU autotools and gettext.
I'm…

phtrivier
- 13,047
- 6
- 48
- 79
1
vote
1 answer
How to collect strings for i18n from files in different languages with xgettext
By default xgettext will guess file type from its extension. However, I have JavaScript files (with .js extension) which it doesn't currently understand. So, I have to specify language manually, Java seems like a good choice. But then, I also have…
user319799
1
vote
1 answer
Handling plurals using xgettextt with --extract-all
Using --extract-all with xgettext does not work with plurals. Using the answer to I18n C++ hello world with plurals as the C++ code here are two tests using xgettext.
cat >helloplurals.cxx <
#include…

CW Holeman II
- 4,661
- 7
- 41
- 72
1
vote
2 answers
I18n for XSLT (or what is the gettext() and xgettext of C++ for XSLT)?
Complete C++ i18n gettext() “hello world” example shows a standard way to handle messages in a C++ program using gettext(). The message catalogs are stored in Portable Object files based upon a Portable Object Template file created directly from the…

CW Holeman II
- 4,661
- 7
- 41
- 72
0
votes
2 answers
Where to translate message strings - in the view or in the model?
We have a multilingual (PHP) application and use gettext for i18n. There are a few classes in the backend/model that return messages or message formats for printf().
We use xgettext to extract the strings that we want to translate.
We apply the…

GrGr
- 4,098
- 5
- 21
- 20
0
votes
0 answers
Is it possible to change pattern recognition of xgettext?
I'm using python, gettext and kivy to make a multi-language app.
I have a label with some text Label(text = _("hi")). I made the code to be able to switch language, but that requires to reset the text, Label.text = _(Label.text), but this code is a…

Abel Gutiérrez
- 159
- 8
0
votes
2 answers
How to automatically add comments to your gettext strings when running xgettext
So I use gettext in my php project to translate strings. However, in som cases, the context of a string is not obvious so I would like to add a comment to the string for the translator. However, it is not clear to me how to do this in a good way.
I…

Samuel Sylvander
- 11
- 3
0
votes
1 answer
Generating context (msgctxt) using xgettext
I'm trying to generate msgctxt lines using xgettext. It is not clear to me how to define context in the keyword option. The documentation uses the term contextargnumc, but doesn't give a clear example what it should look like. My best guess is that…

Dvel
- 1
- 1
0
votes
1 answer
Gettext failed to extract non-ASCII characters
In my source files I have string containing non-ASCII characters like
sCursorFormat = TRANSLATE("Frequency (Hz): %s\nDegree (°): %s");
But when I extract them they vanish like
msgid ""
"Frequency (Hz): %s\n"
"Degree (): %s"
msgstr ""
I have…

liftarn
- 429
- 3
- 21