107 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-3
votes
0
answers
40
views
How can I merge duplicate entries, with only one having a plural in a .pot file [closed]
I have two GNU .pot files:
A:
# Singular Book
msgid "{0} book"
msgstr ""
And B:
# Plural books
msgid "{0} book"
msgid_plural "{0} books"
msgstr[0] ""
...
1
vote
1
answer
43
views
xgettext detects false positives due to java.sql.ResultSet::getString
If I run find src -iname "*.java" | xargs xgettext -ktrc -ktr -kmarktr -ktrn:1,2 -o po/keys.pot --from-code=utf-8 to create the keys.pot file, then this contains all strings given to i18n::...
0
votes
1
answer
46
views
xgettext: Strings not extracted from a gtk4 builder file
xgettext is no extracting the translatable strings from my gtk4 builder file.
builder.glade:
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT EDIT!
This file was @...
0
votes
1
answer
46
views
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 ...
1
vote
2
answers
633
views
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 ...
0
votes
1
answer
321
views
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 ...
1
vote
1
answer
683
views
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 "&...
1
vote
2
answers
138
views
xgettext dry run to avoid unnecessary commits in Github workflow
Is there any way to do a dry run of xgettext on source files, in order to simply check if there are any differences compared to the current .pot file?
I have set up a Github workflow that will run ...
2
votes
1
answer
109
views
xgettext incorrectly infers 'c-format' in cpp files
I have a bunch of .cpp files which contain text including a literal percent sign. Those files don't use printf at all, they use iostream stuff:
std::cout << _( "50 % of 10 is 5" ) <...
1
vote
1
answer
70
views
xgettext fails to extract tag attributes
I'm stuck with xgettext missing tag attributes in HTML templates, e.g.:
xgettext --keyword=_ --language=Python -o - - <<EOF
<!DOCTYPE html>
<html>
<head>
% msg = _('A ...
0
votes
1
answer
355
views
Xgettext is not working on Debian 10 with apache2 and gettext installed
Given: debian10 + apache2 + gettext package installed. Having a .php file with some php+html code. I try ot use xgettext to grab the strings for translation from this .php file and save them into .pot ...
1
vote
1
answer
860
views
Poedit : "Source code not available error" for Html/Html5 files
I get a "Source code not available error" whenever i try to extract from source an Html5 source file.
Note that when i change its extention to .php or try to extract from any php file, the ...
0
votes
1
answer
1k
views
msgfmt error when generating .po file with xgettext and msginit
When using the following commands to generate a .po file:
xgettext test.js -o test.pot -L JavaScript --from-code=UTF-8
msginit -i test.pot -o de.po --locale=de
I get the following header:
# Copyright (...
4
votes
1
answer
136
views
xgettext - How to extract strings split by nulls
There's an issue in extracting strings (with xgettext) from gst-plugins-base where a string has null delimiters -
static const gchar genres[] =
"Blues000円Classic Rock000円Country000円Dance000円Disco\...
1
vote
1
answer
128
views
Translating strings that are outside of the range of gettext
I'm implementing get text on my Discord bot and I have a few strings that come from configuration files for example: Regions where the game is from (Global server, Korean server, Japanese server, Asia ...