4

I have a bundle.js, output from a bigger react / typescript webpack project.

If i run: xgettext bundle.js --from-code=utf-8 --language=JavaScript it finds some of the translated strings, but not all of them.

I have tried to change --language to different others: PHP, Python, Perl, C etc. and I am still missing translations.

Is there a way to debug xgettext to see what it is doing step by step?

Or anyone have an idea to find all translated string in my bundle.js ?

Update 1

Bundle.js - https://paste.ee/p/XmML7
And one of the strings that are skipped, is the string: "Control Information"

I can find gettext("...") and gettext('...') 352 times in the bundle. But I only get 216 strings in my message.po file after running xgettext command above.

Update 2

This is the part of the full bundle.js, that contains the string: "Control Information"

https://pastebin.com/CuXKrDKC

Community
  • 1
  • 1
jakobdo
  • 1,282
  • 14
  • 20
  • 1
    Can you provide an example bundle that shows the problem? Right now there is 0 useful information about your problem. There could be N reasons why it doesn't find all translations, but without any input nobody can tell you which one it is and how to fix it. – Bakuriu Oct 19 '19 at 19:24
  • Are you taking duplicates into account? for example the string `Save` occurs 4 times, this will only count once in the `.po` file. – tobbr Oct 21 '19 at 10:46
  • I know that duplicates only count as 1 entry in the finale po-file. I am looking for the string: "Control Information", I can see the string as gettext("Control information"), but I can't find the string in the po-file after running above command. – jakobdo Oct 22 '19 at 06:21

0 Answers0