The resource filters define which resources should be synchronized between Lingohub and integration (e.g., files from GitHub or sections/articles from Zendesk). You can filter any file, page, or another resource container from your connected integration by entering a filter on the path of the resource (e.g., directories, files, or web pages.)
Resource filters use case
Suppose you have the Lingohub project connected to Zendesk Help Center. In that case, the resource filter is the tool to specify which articles/sections/categories should be included or excluded from the project.
Resource filters on the Zendesk project example
There are two filter types - “Include” and “Exclude.” If you create a few filters with these two types, the “Exclude” filter always will have priority.
An example, you have the next files:
If you want to include all the files create the “Include” filter and use the syntax:
If you want to include the files with only one language (e.g. only the source language) use the “Include” filter and use the syntax:
If you want to exclude an entire folder (e.g. it does not contain any translatable resources) “Exclude” filter with the syntax:
If you want to exclude some files, an example all files with .de language create the “Exclude” filter with the syntax:
To create the new filter:
Click on “Add new filter.”
Choose the filter type.
Provide the rules for content filtering and click “Create.”
To set up the resource filters you can use the following syntax:
? — matches one character
config/locales/emails/payment_e?.yml — matches config/locales/emails/payment_en.yml but also config/locales/emails/payment_es.yml, etc.
* — matches zero or more characters
config/locales/emails/*_en.yml — matches all en.yml files in the config/locales/emails/ directory
** — matches zero or more directories in a path
config/**/**/en.yml — matches all en.yml files underneath the config path
config/locales/**/*.yml — matches all .yml files underneath the config/locales/ path
config/**/notifications/en.yml — matches config/locales/notifications/en.yml but also config/testlocale/notifications/en.yml, etc.
Awesome! You have finished the article about resource filters. We hope that it helped you find answers to all your questions. Otherwise, contact our support, and we will gladly help!