Git: Target path mapping
Introduction
Using the Git connector settings, the directories in the repository in which target files are to be placed can be specified. The feature in question is available in the XTM Cloud UI in XTM Connect → Buckets → Git → (select a bucket) → General settings → Files → Target mapping.
The feature works per bucket, and its use is purely optional.
As you can see, we have two options to choose:
Target path mapping,
Target language mapping.
Both Both are described in separate sections.
Target path mapping
Use the Target path mapping option to set up different repository directories for target files, depending on the directory in which their corresponding source file is placed.
On the left-hand side, we specify a directory for the source file and on the right-hand side, we specify a directory for its future target files. For example:
In the example above, we can have our source files in two directories: folder and folder2.
IMPORTANT!
Avoid the common mistake of entering an absolute path; for example: /folder instead of folder. Remember to keep your path relative, starting from the first folder without the slash \.
When the project finishes, the following happens: target files coming from the source file placed in folder are placed in the translated directory.
Target files coming from the source file placed in folder2 are placed in the folder2/translated2 directory.
Target file directories are created automatically so we do not have to create them in the repository beforehand.
Target language mapping
Use the Target language mapping option to set up different repository directories for target files, depending on the directory in which their corresponding source file is placed AND on a specific target language.
In the top field, specify a directory for the source file. On the left-hand side, specify a directory for the target file. On the right-hand side, select a target language for which this target directory will apply. For example:
In the example above, we can have our source files in two directories: folder and folder2.
When the project finishes, the following happens: target files for the Polish target language coming from the source file placed in folder are placed in the translated directory.
Target files for the Japanese target language coming from the source file placed in folder are placed in the translated1 directory.
Target files for the Polish target language coming from the source file placed in folder2 are placed in the folder2/translated2 directory.
Target files for the Czech target language coming from the source file placed in folder2 are placed in the folder2/translated3 directory.