Replies: 2 comments
|
I think the migration is basically correct, but there is one important distinction with Once you set a file mask, the discovery regex should match the monolingual base/new-base file, so removing the For your layout, I would use: For The other important point is that, with a file mask configured, Weblate uses the base/new-base file for discovery and then applies the file mask to find the language variants. So the fact that I would also add a language filter if your repository contains many unrelated So I would test the configuration with: The current Weblate documentation also describes this exact migration pattern: when Before enabling removal/creation across the whole repository, I would test the regex/file-mask combination against a small representative directory first, since your repository has hundreds of translated modules. |
|
Just to extend the previous reply: I doubt that including language in the new base was ever a good idea. It was probably picking a random language. |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I have an instance of Weblate where I setup the discovery addons a while ago, before the filemask property, that allows to find component with only a source translation file, was introduced.
I now want to update my addon configuration to use the filemask property, but I'm not entirely sure how to do it and I'm getting some issues.
So right now I have the following setup:
(?P<originalHierarchy>.+/)(?P<component>[^/]*)/src/main/resources/ApplicationResources_(?P<language>[^/.]*).properties{{component}}{{ originalHierarchy }}{{ component }}/src/main/resources/ApplicationResources.properties{{ originalHierarchy }}{{ component }}/src/main/resources/ApplicationResources_{{ language }}.propertiesMy understanding is that I should use the following configuration now:
(?P<originalHierarchy>.+/)(?P<component>[^/]*)/src/main/resources/ApplicationResources.properties{{component}}{{ originalHierarchy }}{{ component }}/src/main/resources/ApplicationResources.properties{{ originalHierarchy }}{{ component }}/src/main/resources/ApplicationResources_*.propertiesNow I have two issues:
{{ language }}?Note that our repository contains hundreds of translated modules, so maybe it is to be expected, but nevertheless it doesn't help to know if my config is good and I'm a bit reluctant to try as I'm afraid to get tons of new components wrongly found in case of mistake...
All reactions