Browse to File
> Preferences...
Then tab Extractors
and +
Parameter | Value |
---|---|
Language | JS |
List of extensions | *.js |
Command to extract translations | xgettext --language=JavaScript --force-po -o %o %C %K %F |
An item in keywords list | -k%k |
An item in input files list | %f |
Source code charset | --from-code=%c |
Open a PO file, then browse to Catalog
> Properties...
On tab Sources paths
, ensure that Base path
is correctly set. If not, add and/or remove folders to the list.
On tab Sources keywords
, add the keyword _n:1,2
.
Once configured, Poedit is able to scan Javascript source code and find occurences of keywords:
_('singular')
_n('singular', 'plural')
When Poedit updates translations, it only comments them. To delete them from the PO file they must be purged.