Does Weblate recognise submodule repos of the main repo? #21216
Replies: 2 comments
|
No — the clone is a plain one, with no submodule handling anywhere in it. The command Weblate builds is: [
*self._get_auth_args(source),
"clone",
*self.get_depth(),
"--branch",
branch,
"--",
source,
target,
]No So a submodule directory in the working copy will be empty as far as Weblate is concerned, and any translation files living inside it simply won't be found by your file mask. Note it also does a depth-limited clone by default, which is a separate reason not to expect a full nested tree. The practical way around it is to add the submodule's repository to Weblate as its own component rather than trying to reach it through the parent. It gets cloned properly, its files are matched normally, and you can link it to the parent project so it appears alongside — the translations then live in the repo that actually owns them, which is also where a commit from Weblate needs to land. Pushing into a submodule via its parent wouldn't work regardless, since the parent only records a commit pointer. If the submodule's files really do need to be part of the same component, the alternative is a build step in your own CI that vendors them into the main repo on a branch Weblate watches. More moving parts, but it keeps one component. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Does Weblate's clone populate from a repo submodule as well as the main repo when you connect to a git repo (gitea in my case). TIA.
All reactions