Bug 1147613

Summary: update-desktop-files-yast.pot and scripts need to be updated
Product: [openSUSE] openSUSE Tumbleweed Reporter: Marguerite Su <i>
Component: TranslationsAssignee: Karl Eichwalder <ke>
Status: RESOLVED DUPLICATE QA Contact: Karl Eichwalder <ke>
Severity: Normal    
Priority: P5 - None CC: fvogt
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Marguerite Su 2019-08-24 06:07:25 UTC
Hi,

https://github.com/yast/yast-control-center/commit/1bc55f721c716729a82b80e00950e6b0923e7237

since this commit, yast2-control-center displays the "GenericName" and "Comment" line of the .desktop files in /usr/share/applications/YaST2

with a tweaked yast2-control-center src/yqdesktopfilemodel.cpp:261:

    QString msgid = QString( "%1(%2)" ).arg( key, fi.fileName() ); 
    msgid += ": ";
    msgid += valueAsString;

    QString msgstr = QString::fromUtf8( dgettext ( DESKTOP_TRANSLATIONS, msgid.toUtf8()) );
   +qInfo() << "msgid is " << msgid;
   +qInfo() << "msgstr is " << msgstr;
    if( msgid == msgstr)
	return valueAsString;
    else
	return msgstr;

we can see this output:

msgid is  "Comment(org.opensuse.yast.CheckMedia.desktop): Verify CD and DVD media integrity" .
msgstr is  "Comment(org.opensuse.yast.CheckMedia.desktop): Verify CD and DVD media integrity" .
msgid is  "GenericName(org.opensuse.yast.CheckMedia.desktop): Media Check" .
msgstr is  "GenericName(org.opensuse.yast.CheckMedia.desktop): Media Check" .

and English text is used for the .desktop files.

So here're two major issues we need to fix:

1. in 50-pot/update-desktop-files-yast.pot, we have:

#: /usr/share/applications/YaST2/samba-server.desktop:26
msgctxt "GenericName(samba-server.desktop)"
msgid "Configure a Samba server"
msgstr ""

which should be:

msgctxt "GenericName(org.opensuse.yast.SambaServer.desktop)"
msgid "Configure a Samba server"
msgstr ""

because yast2 changes its desktop files' names with a prefix: org.opensuse.yast

2. we need the scripts to cover "Comment" and "GenericName" as well.

Currently, in 50-pot/update-desktop-files-yast.pot, we have:

#: /usr/share/applications/YaST2/checkmedia.desktop:22
msgctxt "Name(checkmedia.desktop)"
msgid "Media Check"
msgstr ""

#: /usr/share/applications/YaST2/checkmedia.desktop:23
msgctxt "GenericName(checkmedia.desktop)"
msgid "Verify CD and DVD media integrity"
msgstr ""

but in /usr/share/applications/YaST2/org.opensuse.yast.CheckMedia.desktop we have:

Name=YaST Media Check
GenericName=Media Check
Comment=Verify CD and DVD media integrity

So where is Comment? It looks like we picked "GenericName" as "Name", well "Comment" as "GenericName".

Marguerite
Comment 1 Fabian Vogt 2019-08-28 07:00:07 UTC
Known, waiting for Leap 15.2.

*** This bug has been marked as a duplicate of bug 1145197 ***