Open DBLouis opened 4 years ago
@DBLouis this seems like a sensible idea! I'll look into it, and if it can be made to work generically.
This project includes localization from YAML files, https://git.open-communication.net/spacekookie/traduki , perhaps when implementing this issue feature, could also consider how it would fit into including similar plain text key-value files, and even per-language assets used for localizing assets such as documentation and large chunks of text, in a similar style to Hugo/Zola.
It looks like Glade typically uses inltool to extract strings, and merge them again.
This tool supports a number of different formats, it would be good to support them all via intltool
.
Reading the original comment though it seems like I misunderstood the original feature request, which was to have a way to merge in pot files generated by other tools (and thus support glade with a little manual help).
I'm hopefully going to try making a glade gtk example to test supporting this use case. Help contributing on this would be welcomed.
It is possible to extract strings to be translated from a Glade file with:
xgettext -L Glade -o ui.pot ui.xml
A simpler solution could be to include/merge .pot files from a given directory, defined in the configuration. In this case generating the .pot files from other sources can be done in the build script for example.