#9 Localize custom page and desktop file
Merged by ngompa. Opened by rffontenelle.
fedora-kde/ rffontenelle/plasma-welcome-fedora localize  into  main

Download 9.patch

This aims enabling localization of the Fedora's custom page for the Plasma Welcome Center, as well as the desktop file.

This includes a script for managing string extraction for translation, updating translation files with latest string changes, compile into binary format (used in built file) and installation.

The po files where created based on the current translations of the .desktop file, giving the proper credits to the translators.

With LINGUAS file containing enabled language codes, a POT and per-language PO files, this project can be set for translation in Fedora Weblate -- which I can set up once this is merged.

Flow:

manage_l10n.sh pot         # generates po/plasma-welcome-fedora.pot
manage_l10n.sh update_po   # updates all .po files in po/ based on the lang codes in the LINGUAS file
manage_l10n.sh compile     # generates .mo files in po/ based on the lang codes in the LINGUAS file
DESTDIR=foo manage_l10n.sh install   # .mo and .desktop are installed into the prefix foo/

I set this script as a starting point to have translations generated and tested. Let me know if another solution is desired (I could use make instead).

I would prefer the usage of a Makefile, then we can easily just extend it to also install plasma-welcome-fedora itself.

Ok, I'll convert it to a Makefile.

I'm considering to move the QML file to root directory and install it properly using the Makefile. Would that be ok?

A top level subdirectory rather than the current nest of subdirs and handling installing resources properly through the makefile would be great. Would you mind doing the same for the icons too?

5 new commits added

  • Remove deprecated manage_l10n.sh
  • Add Makefile
  • Update POT and PO files with new source path
  • Move svg files to data/
  • Move 01-EnableExtraRepos.qml to rootdir

Makefile created:

make runs the targets: clean pot update_po compile
make clean removes generated files
make pot generates the pot file
make update_po updates all po files against the pot file
make compile build binary mo files and the desktop file

make install install mo, desktop, svg and qml files to /usr/share/
make install DESTDIR=blah install into blah/usr/share/

QML file placed in the root directory and the rest placed in data directory.

File tree:

.
├── 01-EnableExtraRepos.qml
├── COPYING
├── data
│   ├── fedora-loves-kde.svg
│   ├── intro-customization.desktop.in
│   └── mascot_konqi_3rdparty.svg
├── LICENSES
│   ├── CC-BY-SA-4.0
│   ├── GPL-2.0-only.txt
│   └── GPL-3.0-only.txt
├── Makefile
├── po
│   ├── de.po
│   ├── es.po
│   ├── fr.po
│   ├── it.po
│   ├── LINGUAS
│   ├── plasma-welcome-fedora.pot
│   ├── pt_BR.po
│   ├── pt.po
│   └── tr.po
└── README.md

Awesome, thank you!

Pull-Request has been merged by ngompa

Metadata