четвер, 23 липня 2020 р. 18:31:19 EEST Adwait Rawat via gnome-i18n написано: > here's a link to one of the said libretro file > https://gitlab.gnome.org/adwaitrawat/gnome-games/-/blob/adwait/translatable_ > name/flatpak/libretro-cores/nestopia.libretro#L18 > > Thanks, > Adwait
Hi, This looks like the usual .desktop file. You can use xgettext to extract messages like this: cat $(PACKAGE_NAME).libretro | grep _ | cut -d "=" --fields=2 | sed 's|^|_("| g' | sed 's|$$|")|g' > $(PACKAGE_NAME).libretro.tmp xgettext OTHER_FILES $(PACKAGE_NAME).libretro.tmp rm -f $(PACKAGE_NAME).libretro.tmp Then merge them back: msgfmt --desktop --template=$(PACKAGE_NAME).libretro -d po -o your_file.libretro Or you can use some custom Python script to extract/merge translations, like this: https://github.com/manatools/dnfdragora/blob/master/tools/desktoppo.py Just replace the "desktop" with "libretro" and customize it as needed. msgcat *.pot > all.pot can be used to merge your intermediate file with the main pot file. I'm not a GNOME expert, this was just some thoughts. Hope this helps. Best regards, Yuri _______________________________________________ gnome-i18n mailing list gnome-i18n@gnome.org https://mail.gnome.org/mailman/listinfo/gnome-i18n