How to get the number of words in a PO translation file

If you need to count the number of words in a .PO translation file, you can use the pocount command. This command is part of the translate-toolkit package.

First, you have to install it in your Linux machine with the command:

 sudo apt install translate-toolkit -y

Then you have to execute this command with the .po file as first argument:

pocount myfile.po

Processing file :  myfile.po
 Type               Strings      Words (source)    Words (translation)
 Translated:       0 (  0%)          0 (  0%)               0
 Fuzzy:            0 (  0%)          0 (  0%)             n/a
 Untranslated:   491 (100%)       2615 (100%)             n/a
 Total:          491              2615                      0
 Empty:          491 (100%)       2615 (100%)               0

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.