As per your suggestion in #22 and based on docs, I use multiple single line comments prefixed with the keyword, in my case it's TRANSLATORS:.
However the empty lines are not extracted properly, consider this:
// TRANSLATORS: Product price label
// TRANSLATORS:
// TRANSLATORS: Available placeholder:
// TRANSLATORS: {currency} - the runtime substitution for the price currency
// TRANSLATORS: {amount} - the runtime substation for the amount
Extracted as:
#. Product price label
#. TRANSLATORS:
#. Available placeholder:
#. {currency} - the runtime substitution for the price currency
#. the runtime substation for the amount
I would expect that the second line in the generated POT has to be an empty string, i.e: #. only.
The regex I use: /^TRANSLATORS:\s*(.*)$/.
Running it manually via match works fine:
> "TRANSLATORS:".match(/^TRANSLATORS:\s*(.*)$/)
[ 'TRANSLATORS:',
'', // <-- empty string - ALL GOOD
index: 0,
input: 'TRANSLATORS:',
groups: undefined ]
Hi,
As per your suggestion in #22 and based on docs, I use multiple single line comments prefixed with the keyword, in my case it's
TRANSLATORS:
.However the empty lines are not extracted properly, consider this:
Extracted as:
I would expect that the second line in the generated POT has to be an empty string, i.e:
#.
only.The regex I use:
/^TRANSLATORS:\s*(.*)$/
. Running it manually viamatch
works fine: