When exporting files, if the target pattern contains %document_path% more than once, only the first occurrence is replaced. The remaining occurrences stay as a literal string.
Example config:
{
"files": [
{
"format": "resx_2_0",
"source": "**/*.resx",
"target": "%document_path%/%document_path%.%slug%.resx"
}
]
}
Expected behavior
All occurrences of %document_path% should be replaced, for example:
.../Description/Description.de.resx
Actual behavior
Generated filename contains a literal placeholder in the second position, for example:
.../Description/%document_path%.de.resx
Notes
Likely related code:
|
const parsedTarget = document.target |
|
.replace('%slug%', pseudoLanguageName) |
|
.replace('%original_file_name%', path) |
|
.replace('%document_path%', path); |
|
const parsedTarget = document.target |
|
.replace('%slug%', slug) |
|
.replace('%original_file_name%', path) |
|
.replace('%document_path%', path); |
When exporting files, if the target pattern contains %document_path% more than once, only the first occurrence is replaced. The remaining occurrences stay as a literal string.
Example config:
{ "files": [ { "format": "resx_2_0", "source": "**/*.resx", "target": "%document_path%/%document_path%.%slug%.resx" } ] }Expected behavior
All occurrences of
%document_path%should be replaced, for example:.../Description/Description.de.resxActual behavior
Generated filename contains a literal placeholder in the second position, for example:
.../Description/%document_path%.de.resxNotes
Likely related code:
accent/cli/src/services/document-jipt-paths-fetcher.ts
Lines 14 to 17 in aa1a1f5
accent/cli/src/services/document-paths-fetcher.ts
Lines 18 to 21 in aa1a1f5