Bram,
in issue 4222 (https://github.com/vim/vim/pull/4222) it was mentioned, 
that the desktop file translations could be generated at build time. So 
here is a patch, that adds this capabilities to the desktop files.

The translatable strings will be extracted into the po files and the 
desktop files will then contain those translations. To leave the changes 
minimal (and not throw away the existing work), I kept the existing 
translations in the .in files, however, they will be overwritten when 
generating the final desktop files, once the translators pick them up 
and start to translate them.

Best,
Christian
-- 
Viele verlieren die Selbstachtung früher als ihre Gesundheit.
                -- Vytautas Karalius

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
commit 13970607f91811a342d59a5b1209ce9800cef83d
gpg: Signature made Tue Apr  9 20:53:59 2019 CEST
gpg:                using RSA key 4F19708816918E19AAE19DEEF3F92DA383FDDE09
gpg: Good signature from "Christian Brabandt (Github key) <[email protected]>" [ultimate]
Author: Christian Brabandt <[email protected]>
Date:   Tue Apr 9 20:50:20 2019 +0200

    Generate the translations for the desktop files

diff --git a/src/po/Makefile b/src/po/Makefile
index c6758e2b7..8b4af2f20 100644
--- a/src/po/Makefile
+++ b/src/po/Makefile
@@ -25,6 +25,9 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
 .SUFFIXES: .po .mo .pot .ck
 .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES)
 
+LINGUAS:
+	@echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
+
 .po.mo:
 	$(MSGFMTCMD) -o $@ $<
 
@@ -32,7 +35,7 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
 	$(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
 	touch $@
 
-all: $(MOFILES) $(MOCONVERTED)
+all: $(MOFILES) $(MOCONVERTED) gvim.desktop vim.desktop
 
 check: $(CHECKFILES)
 
@@ -157,12 +160,17 @@ distclean: clean
 checkclean:
 	rm -f *.ck
 
-$(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h ../vim.h
+$(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h ../vim.h gvim.desktop.in vim.desktop.in
 	cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \
 		--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 \
-		*.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h vim.h
+		*.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h vim.h \
+		po/gvim.desktop.in po/vim.desktop.in
 	mv -f ../$(PACKAGE).po $(PACKAGE).pot
 
+%.desktop: %.desktop.in $(PACKAGE).pot LINGUAS
+	$(MSGFMT) --desktop -d . --template $< -o $@
+	mv -f $@ ../../runtime/$@
+
 update-po: $(LANGUAGES)
 
 # Don't add a dependency here, we only want to update the .po files manually
diff --git a/src/po/gvim.desktop.in b/src/po/gvim.desktop.in
new file mode 100644
index 000000000..6c91fcbc6
--- /dev/null
+++ b/src/po/gvim.desktop.in
@@ -0,0 +1,95 @@
+# This is generated by the Vim po/Makefile, do NOT edit.
+[Desktop Entry]
+# Translators: This is the Application Name
+Name=gVim
+# Translators: This is the Generic Application Name
+GenericName=Text Editor
+# The translations should come from the po file. Leave them here for now, they will
+# be overwritten by the po file when generating the desktop.file!
+GenericName[da]=Teksteditor
+GenericName[de]=Texteditor
+GenericName[eo]=Tekstoredaktilo
+GenericName[fr]=Éditeur de texte
+GenericName[pl]=Edytor tekstu
+GenericName[is]=Ritvinnsluforrit
+Comment=Edit text files
+Comment[af]=Redigeer tekslêers
+Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
+Comment[ar]=حرّر ملفات نصية
+Comment[az]=Mətn fayllarını redaktə edin
+Comment[be]=Рэдагаваньне тэкставых файлаў
+Comment[bg]=Редактиране на текстови файлове
+Comment[bn]=টেক্স্ট ফাইল এডিট করুন
+Comment[bs]=Izmijeni tekstualne datoteke
+Comment[ca]=Edita fitxers de text
+Comment[cs]=Úprava textových souborů
+Comment[cy]=Golygu ffeiliau testun
+Comment[da]=Rediger tekstfiler
+Comment[de]=Textdateien bearbeiten
+Comment[el]=Επεξεργασία αρχείων κειμένου
+Comment[en_CA]=Edit text files
+Comment[en_GB]=Edit text files
+Comment[eo]=Redakti tekstajn dosierojn
+Comment[es]=Edita archivos de texto
+Comment[et]=Redigeeri tekstifaile
+Comment[eu]=Editatu testu-fitxategiak
+Comment[fa]=ویرایش پرونده‌های متنی
+Comment[fi]=Muokkaa tekstitiedostoja
+Comment[fr]=Éditer des fichiers textes
+Comment[ga]=Eagar comhad Téacs
+Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
+Comment[he]=ערוך קבצי טקסט
+Comment[hi]=पाठ फ़ाइलें संपादित करें
+Comment[hr]=Uređivanje tekstualne datoteke
+Comment[hu]=Szövegfájlok szerkesztése
+Comment[id]=Edit file teks
+Comment[is]=Vinna með textaskrár
+Comment[it]=Modifica file di testo
+Comment[ja]=テキストファイルを編集します
+Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
+Comment[ko]=텍스트 파일을 편집합니다
+Comment[lt]=Redaguoti tekstines bylas
+Comment[lv]=Rediģēt teksta failus
+Comment[mk]=Уреди текстуални фајлови
+Comment[ml]=വാചക രചനകള് തിരുത്തുക
+Comment[mn]=Текст файл боловсруулах
+Comment[mr]=गद्य फाइल संपादित करा
+Comment[ms]=Edit fail teks
+Comment[nb]=Rediger tekstfiler
+Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
+Comment[nl]=Tekstbestanden bewerken
+Comment[nn]=Rediger tekstfiler
+Comment[no]=Rediger tekstfiler
+Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
+Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
+Comment[pl]=Edytuj pliki tekstowe
+Comment[pt]=Editar ficheiros de texto
+Comment[pt_BR]=Edite arquivos de texto
+Comment[ro]=Editare fişiere text
+Comment[ru]=Редактор текстовых файлов
+Comment[sk]=Úprava textových súborov
+Comment[sl]=Urejanje datotek z besedili
+Comment[sq]=Përpuno files teksti
+Comment[sr]=Измени текстуалне датотеке
+Comment[sr@Latn]=Izmeni tekstualne datoteke
+Comment[sv]=Redigera textfiler
+Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
+Comment[th]=แก้ไขแฟ้มข้อความ
+Comment[tk]=Metin faýllary editle
+Comment[tr]=Metin dosyalarını düzenle
+Comment[uk]=Редактор текстових файлів
+Comment[vi]=Soạn thảo tập tin văn bản
+Comment[wa]=Asspougnî des fitchîs tecses
+Comment[zh_CN]=编辑文本文件
+Comment[zh_TW]=編輯文字檔
+TryExec=gvim
+Exec=gvim -f %F
+Terminal=false
+Type=Application
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
+Keywords=Text;editor;
+# Translators: This is the Icon file name. Do NOT translate
+Icon=gvim
+Categories=Utility;TextEditor;
+StartupNotify=true
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
diff --git a/src/po/vim.desktop.in b/src/po/vim.desktop.in
new file mode 100644
index 000000000..896e415ef
--- /dev/null
+++ b/src/po/vim.desktop.in
@@ -0,0 +1,92 @@
+# This is generated by the Vim po/Makefile, do NOT edit.
+[Desktop Entry]
+# Translators: This is the Application Name
+Name=Vim
+# Translators: This is the Generic Application Name
+GenericName=Text Editor
+# The translations should come from the po file. Leave them here for now, they will
+# be overwritten by the po file when generating the desktop.file!
+GenericName[da]=Teksteditor
+GenericName[de]=Texteditor
+GenericName[pl]=Edytor tekstu
+GenericName[is]=Ritvinnsluforrit
+Comment=Edit text files
+Comment[af]=Redigeer tekslêers
+Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
+Comment[ar]=حرّر ملفات نصية
+Comment[az]=Mətn fayllarını redaktə edin
+Comment[be]=Рэдагаваньне тэкставых файлаў
+Comment[bg]=Редактиране на текстови файлове
+Comment[bn]=টেক্স্ট ফাইল এডিট করুন
+Comment[bs]=Izmijeni tekstualne datoteke
+Comment[ca]=Edita fitxers de text
+Comment[cs]=Úprava textových souborů
+Comment[cy]=Golygu ffeiliau testun
+Comment[da]=Rediger tekstfiler
+Comment[de]=Textdateien bearbeiten
+Comment[el]=Επεξεργασία αρχείων κειμένου
+Comment[en_CA]=Edit text files
+Comment[en_GB]=Edit text files
+Comment[es]=Edita archivos de texto
+Comment[et]=Redigeeri tekstifaile
+Comment[eu]=Editatu testu-fitxategiak
+Comment[fa]=ویرایش پرونده‌های متنی
+Comment[fi]=Muokkaa tekstitiedostoja
+Comment[fr]=Édite des fichiers texte
+Comment[ga]=Eagar comhad Téacs
+Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
+Comment[he]=ערוך קבצי טקסט
+Comment[hi]=पाठ फ़ाइलें संपादित करें
+Comment[hr]=Uređivanje tekstualne datoteke
+Comment[hu]=Szövegfájlok szerkesztése
+Comment[id]=Edit file teks
+Comment[is]=Vinna með textaskrár
+Comment[it]=Modifica file di testo
+Comment[ja]=テキストファイルを編集します
+Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
+Comment[ko]=텍스트 파일을 편집합니다
+Comment[lt]=Redaguoti tekstines bylas
+Comment[lv]=Rediģēt teksta failus
+Comment[mk]=Уреди текстуални фајлови
+Comment[ml]=വാചക രചനകള് തിരുത്തുക
+Comment[mn]=Текст файл боловсруулах
+Comment[mr]=गद्य फाइल संपादित करा
+Comment[ms]=Edit fail teks
+Comment[nb]=Rediger tekstfiler
+Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
+Comment[nl]=Tekstbestanden bewerken
+Comment[nn]=Rediger tekstfiler
+Comment[no]=Rediger tekstfiler
+Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
+Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
+Comment[pl]=Edytuj pliki tekstowe
+Comment[pt]=Editar ficheiros de texto
+Comment[pt_BR]=Edite arquivos de texto
+Comment[ro]=Editare fişiere text
+Comment[ru]=Редактор текстовых файлов
+Comment[sk]=Úprava textových súborov
+Comment[sl]=Urejanje datotek z besedili
+Comment[sq]=Përpuno files teksti
+Comment[sr]=Измени текстуалне датотеке
+Comment[sr@Latn]=Izmeni tekstualne datoteke
+Comment[sv]=Redigera textfiler
+Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
+Comment[th]=แก้ไขแฟ้มข้อความ
+Comment[tk]=Metin faýllary editle
+Comment[tr]=Metin dosyalarını düzenle
+Comment[uk]=Редактор текстових файлів
+Comment[vi]=Soạn thảo tập tin văn bản
+Comment[wa]=Asspougnî des fitchîs tecses
+Comment[zh_CN]=编辑文本文件
+Comment[zh_TW]=編輯文字檔
+TryExec=vim
+Exec=vim %F
+Terminal=true
+Type=Application
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
+Keywords=Text;editor;
+# Translators: This is the Icon file name. Do NOT translate
+Icon=gvim
+Categories=Utility;TextEditor;
+StartupNotify=false
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;

Raspunde prin e-mail lui