Re: Making a descriptor file translatable
- From: Yuri Chornoivan <yurchor ukr net>
- To: Adwait Rawat <adwait rawat gmail com>
- Cc: gnome-i18n <gnome-i18n gnome org>
- Subject: Re: Making a descriptor file translatable
- Date: Thu, 23 Jul 2020 18:56:21 +0300
четвер, 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]