If the project has multiple paths of files that need to be localized (this is the scenario for most projects)
For example, the Android project:
- app/**/res/values/strings.xml
- app/**/res/values/other_strings.xml
- README.md
- wiki/*.md
- …
If there is only one base_path
configuration:
base_path: "/"
files:
- source: "/app/src/main/res/values/strings.xml"
translation: "/app/src/main/res/values-%android_code%/%original_file_name%"
- source: "/app/src/main/res/values/other_strings.xml"
translation: "/app/src/main/res/values-%android_code%/%original_file_name%"
- source: "/README.md"
translation: "/%file_name%_%two_letters_code%.md"
- source: "/wiki/**.md"
translation: "/wiki/**/%file_name%_%two_letters_code%.md"
I want the configuration item format to be:
# base_path: "/"
files:
- base_path: "/app/src/main/res"
source: "values/strings.xml"
translation: "values-%android_code%/%original_file_name%"
- base_path: "/app/src/main/res"
source: "values/*_strings.xml"
translation: "values-%android_code%/%original_file_name%"
ignore:
- values/exclude_strings.xml
- source: "/README.md"
translation: "/%file_name%_%two_letters_code%.md"
- base_path: "/wiki"
source: "**.md"
translation: "**/%file_name%_%two_letters_code%.md"
This increases relative path flexibility