cargo-i18n icon indicating copy to clipboard operation
cargo-i18n copied to clipboard

Support translation of Glade XML file

Open DBLouis opened this issue 5 years ago • 5 comments

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.

DBLouis avatar May 23 '20 16:05 DBLouis

@DBLouis this seems like a sensible idea! I'll look into it, and if it can be made to work generically.

kellpossible avatar May 30 '20 20:05 kellpossible

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.

kellpossible avatar May 31 '20 06:05 kellpossible

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.

kellpossible avatar Sep 06 '20 19:09 kellpossible

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).

kellpossible avatar Sep 06 '20 19:09 kellpossible

I'm hopefully going to try making a glade gtk example to test supporting this use case. Help contributing on this would be welcomed.

kellpossible avatar Jan 27 '21 19:01 kellpossible