[Bug 1158957] New: clean-up desktop-file-translations
http://bugzilla.suse.com/show_bug.cgi?id=1158957 Bug ID: 1158957 Summary: clean-up desktop-file-translations Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Translations Assignee: lnussel@suse.com Reporter: sbrabec@suse.com QA Contact: ke@suse.com CC: fvogt@suse.com, ke@suse.com, mcalabkova@suse.com, tchvatal@suse.com Found By: --- Blocker: --- desktop-file-translations did not reflect translation development of the last 15 years. That is why it contains a lot of obsolete stuff and duplicated stuff that consumes translators' power. Current translation policy says: If the code has an upstream translation, do not translate it in SUSE. desktop-file-translations cleanly violates this rule. There is no such reason to make SUSE Specific translation for strings like "Firefox", "Web Browser", "Text Editor" etc. The forthcoming translation policy will be even more strict: If the translation is important for us, maintain it in the upstream. I propose to make a big cleanup of desktop-file-translations: - Remove strings that has upstream translation. - Drop obsolete translations. - If it is possible and makes sense, attempt to move existing translations to the upstream. Remove strings that has upstream translation. The easiest way to do it: - If there is at lease one upstream translation, ignore such desktop file. - If there are no upstream translation, issue a warning that suggests to add translation support to the upstream and refers to the existing in-house translations. Drop obsolete translations: appstreamdata.pot, update-desktop-files-apps.pot, polkitaction.pot, update-desktop-files-kde.pot, update-desktop-files-kde-services.pot: Package specific stuff. Should be preferably translated by the upstream. mimeinfo.pot: Package specific stuff. Most of strings comes from shared-mime-info, which is well translated out of the box. Should be preferably translated by the upstream, and we should exclude shared-mime-info for sure. Before that, we can check whether we have some unique strings. (I can to it.) update-desktop-files-conflicts.pot: Empty. I have no idea about the purpose. update-desktop-files-directories.pot: It would be nice to move it to its owner package repository, desktop-data-openSUSE. update-desktop-files-mimelnk.pot: Drop completely. Complete waste of translators' work. It was replaced by shared-mime-info in 2004. We have no package that supports mimelnk nowadays, and mimelnk support was completely dropped. update-desktop-files.pot: All of them clone upstream. update-desktop-files-screensavers.pot: This is probably xscreensaver specific, and it should be moved to xscreensaver. Ideally upstream them. update-desktop-files-yast.pot: Our packages. If it makes sense and it will be reasonably easy, we should move it to respective domains inside yast-translations (and move existing strings there). Related licensing bug: bug 1137775 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1158957 http://bugzilla.suse.com/show_bug.cgi?id=1158957#c1 --- Comment #1 from Stanislav Brabec <sbrabec@suse.com> --- I just finished a review of all mimeinfo.po and update-desktop-files-mimelnk.po. There is not a single string in any language that is not already present in the shared-mime-info translation. There is a small chance that some other MIME files still have unique strings. We can drop all update-desktop-files-mimelnk.po* completely, and remove shared-mime-info strings from mimeinfo.pot Note: the possible reuse in an upstream project is a bit complicated. Downstream strings have context, shared-mime-infor does not. (It has an ugly side effect that translators have duplicated MIME definitions translate more than once.) As gettext-tools don't have any tool for context removal, I did following: mkdir NOCTXTMP NOCTX cp -a *.po NOCTXTMP/ sed -i '/^msgctxt/,/^msgid/{/^msgid/p;d;}' NOCTXTMP/*.po for i in *.po ; do msguniq --unique NOCTXTMP/$i -o NOCTX/$i ; done -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1158957 http://bugzilla.suse.com/show_bug.cgi?id=1158957#c2 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbrabec@suse.com --- Comment #2 from Stanislav Brabec <sbrabec@suse.com> --- Created attachment 825916 --> http://bugzilla.suse.com/attachment.cgi?id=825916&action=edit MIME types not covered by shared-mime-info Here is a pot file that contains MIME types not covered by shared-mime-info. Note that it does not mean that string are not covered by shared-mime-info (and indeed some of them are covered, just the MIME type has a different name). There can still be an upstream source for these that could be as complete as SUSE in-house translation. It was generated by: msgfilter -i mimeinfo.pot -o mimei.pot ./filter.sh msgattrib --untranslated mimei.pot -o mimeinfo-rest.pot ---- filter.sh ---- #!/bin/bash MIMEL="${MSGFILTER_LOCATION##*:}" let MIMEL-=3 if test $MIMEL -gt 3 ; then MIME="$(sed -n "${MIMEL}p" mimeinfo.pot)" MIME="${MIME#\#: }" MIME="${MIME%:*}" if test "$MIME" = "${MIME#/usr/share/mime}" ; then echo >&2 "line off" let MIMEL-- MIME="$(sed -n "${MIMEL}p" mimeinfo.pot)" MIME="${MIME#\#: }" MIME="${MIME%:*}" fi if test "$MIME" = "${MIME#/usr/share/mime}" ; then echo >&2 "second line off" let MIMEL-- MIME="$(sed -n "${MIMEL}p" mimeinfo.pot)" MIME="${MIME#\#: }" MIME="${MIME%:*}" fi echo >&2 "$MIME" if test "$(rpm -qf --queryformat %{name} "$MIME")" = shared-mime-info ; then cat >/dev/null echo -n "DROP" else cat fi else cat fi ------------------- -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1158957 http://bugzilla.suse.com/show_bug.cgi?id=1158957#c3 --- Comment #3 from Stanislav Brabec <sbrabec@suse.com> --- Actually, all these strings are covered by freedesktop.org.xml (just with a different/no context) except model/x.stl-binary and model/x.stl-ascii. Other MIME types should be probably dropped from their respective packages as duplicates. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1158957 http://bugzilla.suse.com/show_bug.cgi?id=1158957#c4 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low CC| |lnussel@suse.com Assignee|lnussel@suse.com |sbrabec@suse.com --- Comment #4 from Ludwig Nussel <lnussel@suse.com> --- So what is expected from me here? Looks like you will work on this right? So go ahead. Note Leap does no longer strip desktop file translations either. So in the worst case it uses upstream translations only. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1158957 http://bugzilla.suse.com/show_bug.cgi?id=1158957#c5 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED --- Comment #5 from Stanislav Brabec <sbrabec@suse.com> --- You are the maintainer, so you should confirm that you are OK with these changes. I don't know the historic background of this package. I guess that it comes from the past, when most .desktop files had no translation, but SuSE wanted to translate them. Many changes in the upstream translation coverage happened in the last 17 years. The new script should identify remaining packages where the upstream still ignores any translation support. Actually, the whole %suse_update_desktop_file should be deprecated in favor of upstreaming of all our desktop files changes. We now use a clean Desktop menu specification, so most our Categories changes can be upstreamed. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com