Questions tagged [xgettext]
104 questions
1
vote
1 answer
xgettext extracts wrong literals
I use this to extract all string literals that need translation:
xgettext -o $@ -k"Localizer.get" $^ --from-code=utf-8
These should be extracted:
Localizer.get("Could not find the config file. (This should *not* happen!)")
These…

Martin Ueding
- 8,245
- 6
- 46
- 92
1
vote
3 answers
Translate variables with POEdit/xgettext
I am using PHP, Zend Framework and Zend_Translate (gettext adapter). To edit translations I use POEdit which utilizes xgettext to fetch strings to be translated.
POEdit (xgettext) will search for keywords to find strings to translate. So, if…

ANisus
- 74,460
- 29
- 162
- 158
1
vote
1 answer
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 existing source code is extracted without errors.…

coderdonezo
- 399
- 1
- 12
1
vote
2 answers
Is there any way go get GNU xgettext (or something similar) to work with scala files?
We are using the GNU gettext utilities for creating PO files directly from our code base. The problem is - however - that some of our code base is written in Scala (most of it is Java). We are using gradle for building and deployment.
As far as I…

Florian Baierl
- 2,378
- 3
- 25
- 50
1
vote
3 answers
Regex to find GetText strings "<%$ GetText:"
I need to grab the text "Home" or 'Home' from this code:
<%@ Page Title="<%$ GetText: '**Home**' %>" Language="C#" ..%>

user324365
- 89
- 7
1
vote
1 answer
Charset problem with xgettext & msgmerge
I'm trying to make a script to create a .po files from my sources files & merge it with the existing one so I don't have to redo the translation every time I update my website.
I'm basing my script on this blog post…

Paté
- 1,914
- 2
- 22
- 33
1
vote
0 answers
xgettext > search through smarty templates for {php}{/php} tags
How could I use xgettext with poedit to replace tags like these:
{php}printf(_("You have to pay € %01.2f for this car."), $this->get_template_vars('amount')){/php}
I've renamed my tpl files to .tpl.php but in default form xgettext will only…

1299
- 11
- 1
1
vote
1 answer
How to assign particular context to --keyword for proper_name?
When using the xgettext tool it is possible to automatically add commenting to assist translators with regards to proper names (as documented).
The documentation suggests to add the following to the command line:
--keyword='proper_name:1,"This is a…

Lea Hayes
- 62,536
- 16
- 62
- 111
1
vote
1 answer
Overwrite output filename of xgettext
I am using xgettext with standard input because the input is not available in a file. However, I'd like it to output a filename I specify as a comment above each string.
Current behaviour
#: Standardinput:13
msgid "User"
msgstr ""
#:…

narrowtux
- 664
- 7
- 24
1
vote
1 answer
xgettext in gtk+
I am new to the gettext and Gtk+ programming world.
First of all, I am developing an application on windows using the gtk+ library.
I read that glib integrates the gettext library and makes the translation more "friendly" by providing some…

Nikoi
- 389
- 2
- 14
1
vote
1 answer
xgettext plural parameter string not extracted to POT
I'm using this C# class in order to internationalize my strings:
internal class T
{
public static string _(string text) { /*...*/ }
public static string _(string text, params object[] args) { /*...*/ }
public static string _n(string…

Jordi
- 20,868
- 39
- 149
- 333
1
vote
2 answers
Localizing with ICU4C and XLIFF
Localizing with ICU recommends keeping localizable data in XLIFF format.
So I used GNU xgettext to extract strings to gettext format files, and then converted them to XLIFF files with po2xliff.
Finally I tried to use XLIFF To ICU ResourceBundle…

Map X
- 444
- 1
- 4
- 14
1
vote
2 answers
how to extract string from all c files in a folder using gettext
I'm trying to localize a 'C' project but I have no idea how to extract Strings by xgettext . And project has so many C files so extracting one by one is not feasible. S is it possible to extract strings from all files once. or there is any other…

prasadmadanayake
- 1,415
- 15
- 23
1
vote
2 answers
PoEdit don't parse string in PHP comments
In POEDIT, It seems that the code analyser removes any PHP comments before parsing the code.
This means that any translation that are not found in a PHP comment (// or #) or Documentation Block ( /* */) are skipped.
Is there any solution to…

SequenceDigitale.com
- 4,038
- 1
- 24
- 23
1
vote
2 answers
poEdit do not find my placeholders' translations
I'm quite new to poEdit, and I'm successfully translating 95% of my keys in my javascript templates and files.
I use this syntax __("key"), mainly <%= __("key") %>.
But (there always is a but), for some reason, this key email in placeholder
enter…

guillaumepotier
- 7,369
- 8
- 45
- 72