WeblateOrg / WeblateOrg/weblate
Source links within submodules: It would be nice if they worked
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
**Is your feature request related to a problem? Please describe.**
In CircuitPython, we import additional source through git submodules. When a translator using weblate follows a link to a source file that is in a submodule, they are taken to a github 404 page instead of the correct page. Example: the 'source string location' in https://hosted.weblate.org/translate/circuitpython/main/fr/?offset=1&q=+location%3Aulab+&sort_by=-priority%2Cposition&checksum= is https://github.com/adafruit/circuitpython/blob/main/extmod/ulab/code/fft.c#L0 but because extmod/ulab is a submodule, it would actually need to be https://github.com/v923z/micropython-ulab/blob/master/code/filter.c#L0
**Describe the solution you'd like**
If weblate understood the .gitmodules file, it could determine the correct URL. We could also generate some _additional_ file within our git repo if weblate could support it. We _probably_ can accept going to the main development branch of the submodule, not the specific ref that is committed---that would certainly be an improvement on the status quo.
**Describe alternatives you've considered**
We can educate our translators on what to do when this situation arises, but no automatic way to resolve the problem has occurred to us. At this time, it's not feasible for us to remove the use of submodules or to perform the translation task in the submodule instead of the top level module.
**Additional context**
This search should bring up a string that resides in a submodule: https://hosted.weblate.org/translate/circuitpython/main/fr/?offset=1&q=+location%3Aulab+&sort_by=-priority%2Cposition&checksum=
Thank you! We love weblate!
Contributor guide
Assessment
This issue has not been assessed yet.