ngx-translate-extract
ngx-translate-extract copied to clipboard
Add file path to the item in po file
Our PMs want to have information about path to the file where translation was found in po files.
Like this:
#: path1WhereStringWasFound:<line#>
#: path2WhereStringWasFound:<line#>
msgid "string"
msgstr "translation"
I would like to create pull request with this feature. I propose that the feature will be activated with yargs flag (e.g.: 'path-info').
By reading your code, I could not find any information about the matching path passed to the extract. Where would you suggest to pass the information about the path? So the compiler could extract them, for example like this:
compilers/po.compiler.ts
:
...
translations[key] = {
paths: paths, // array of paths where the file was found
msgid: key,
msgstr: collection.get(key)
};
...
Hope this helps others, too. Best
Hi, did you manage implementing the above? i also need it...
See PR #102