Thanks for looking :-)
I was looking at some typical POEdit keyword header value in WordPress plugins and themes - e.g.:
'__;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n';
There's several things wrong here, but the oddity is:
_c,_nc:4c,1,2
_c( $string )
and _nc( $string, $plural )
are both deprecated anyway, but:
- They are split by a comma, instead of a semi-colon. Is this allowed, or is that a typo?
- There's not four arguments, so that
4c,
is completely wrong and shouldn't be there? - For
_nx( $string, $plural, $number, $context )
the keyword value is given as_nx:4c,1,2
. Should that be_nx:1,2,4c
or does the order not matter? - Should this (and all header values in a pot) end with
\n
for a new line?
Thanks!
Thanks for answering those @vslavik. Good to know that 1. and 2. were definitely wrong, though a lack of understanding means this
_c,nc:4c1,2
is present in lots more than just a handful of plugins and themes, as folks have just copied and pasted without understanding (as have I previously).For 4., I think that's my mistake as I copied the list from PHP which generates the .pot but good to know about the PO format docs.