Make KDE translation credits nicer

Bug #133817 reported by Данило Шеган
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Данило Шеган
kde4libs (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Jannick suggested to hack into KDE translation credits support to get a nicer display in KDE programs.

KDE uses two comma separated strings: one for names, and another for emails. These are then matched by position in the string (empty strings allowed among emails), and displayed as:
  Name 1
        name1@email
  Name2
        name2@email
  Launchpad Name1
        name1@launchpad
  ...

If email is missing, there'll be an empty line, so we can precede all Launchpad contributors with name 'Launchpad Contributions:'/empty email, and we'll get a nicer layout.

  Name 1
        name1@email
  Name2
        name2@email

  Launchpad Contributions:
        name1@launchpad
  ...

Changed in rosetta:
assignee: nobody → danilo
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jannick Kuhr (jakuhr-deactivatedaccount) wrote :

The following would result in the attached design:

msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr "Patrick Trettenbrein, Jannick Kuhr, , Launchpad contributions:, Jannick Kuhr, Patrick Trettenbrein, Jannick Kuhr, Patrick Trettenbrein, Jannick Kuhr"

msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
msgstr "<email address hidden>, <email address hidden>,,, https://launchpad.net/~jakuhr, https://launchpad.net/~trettenbrein, https://launchpad.net/~jakuhr, https://launchpad.net/~trettenbrein, https://launchpad.net/~jakuhr"

Revision history for this message
Jannick Kuhr (jakuhr-deactivatedaccount) wrote :

"If email is missing, there'll be an empty line, so we can precede all Launchpad contributors with name 'Launchpad Contributions:'/empty email, and we'll get a nicer layout."

In addition we should (as in the screenshot above):

1. add a free line before the launchpad section by adding two commas "(...)Jannick Kuhr, , Launchpad contributions:(...).

2. use for the launchpad translators the link to the launchpad account (like done in the Gnome credits) instead of the mail adresses.

Revision history for this message
Данило Шеган (danilo) wrote :

Jannick, I just want to make sure: are http links working correctly in KDE Credits dialog?

Changed in rosetta:
status: Confirmed → In Progress
Revision history for this message
Jannick Kuhr (jakuhr-deactivatedaccount) wrote :

Arg shit, I didn't test it and was just happy to see the https link in dialog. If you click it, it opens the default browser (!) but enters into the address field e.g. "mailto:/https:/launchpad.net/~jakuhr".

In kdelibs/kdecore/kaboutdata.cpp we have atm the following:

KAboutTranslator::KAboutTranslator(const QString & name,
                const QString & emailAddress)
{
    mName=name;
    mEmail=emailAddress;
}

It should be quite easy to change the behaviour with a simple patch, but as a translator I don't really know how to do it. Could you please ask e.g. Jonathan Riddell about the best way to handle this? Perhaps we could just add a similar section for the Launchpad translators where we change it to use http?

Revision history for this message
Jannick Kuhr (jakuhr-deactivatedaccount) wrote :

The optimal solution should be a patch to kdelibs which allows the following:

1. We should add a translateable title above the original upstream translators (eg. "Upstream translators") followed by the normal list of translator names and their mail adresses.

2. And a new section for the Lauchpad translators below, with their names and http links to their launchpad accounts. This section should be separted from the upstream translators by a free line and get a translatable title like "Launchpad translators".

Now lauchpad would be able to enter its translators in this new section.

Revision history for this message
Данило Шеган (danilo) wrote :

Fixed in RF 4849 to add a "Launchpad Contributors" header. Please re-open once kdelibs task is also complete.

Changed in rosetta:
status: In Progress → Fix Committed
Changed in rosetta:
status: Fix Committed → Fix Released
Revision history for this message
Jannick Kuhr (jakuhr-deactivatedaccount) wrote :

Danilos, at the moment there seems to be one comma to much in the list of the mail adresses or one missing in the list of the launchpad contributors. The first Launchpad contributor has no mail address entry, the second contributor the mail address of the first one and so on.

Changed in rosetta:
status: Fix Released → Confirmed
Revision history for this message
Данило Шеган (danilo) wrote :

Jannick, can you point me at the case where you've spotted this? (it might also be a problem with bad credits in the imported translation)

Revision history for this message
Jannick Kuhr (jakuhr-deactivatedaccount) wrote :

I think it is a general problem, since all apps I checked are affected. But for example you could have a look at d3lphin or konqueror.

Revision history for this message
Данило Шеган (danilo) wrote :

Looking at konqueror itself, it looks to be alright (except that there is one comma too much in both):

https://translations.edge.launchpad.net/ubuntu/gutsy/+source/kdebase/+pots/konqueror/de/+translate?start=550

They look like:

View all details of this message
556. English: Your names
Context: NAME OF TRANSLATORS
Current German: ,Launchpad Contributions:,Jannick Kuhr,Thomas Reitelbach

557. English: Your emails
Context: EMAIL OF TRANSLATORS
Current German: ,,<email address hidden>,<email address hidden>

i.e. there's a first empty field in both, then comes the "Launchpad Contributions:" with no email, then your name and your email, and finally Thomas' name and email.

Is this badly rendered in the About dialog or maybe badly exported?

Can you also please confirm that the same translations are indeed contained in the MO file using something like:

$ msgunfmt /usr/share/locale-langpack/de/LC_MESSAGES/konqueror.mo |msggrep -K -e 'OF TRANSLATORS'

Thanks.

Revision history for this message
Jannick Kuhr (jakuhr-deactivatedaccount) wrote :

Sorry, I cannot check this at the moment since I am in Southamerica until next June. I just can tell you that in all programs I checked the first launchpad translator has no mail address entry and his entry is listed under the name of the second translator and so on... There seems to be an unneeded comma somewhere. Some weeks ago I compiled such a modified po file and it worked just fine, so this is not a probelem of the method in general.

Kind regrads from Bolivia ;-)

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

I can confirm that problem, somebody just reported this for Hungarian gwenview, but I have the same for ktorrent, amarok, k3b etc. A screenshot is here:
http://ubuntu.hu/files/bugreports/Elcs%C3%BAszott_email_N%C3%A9vjegy:_Gwenview.png

Revision history for this message
Данило Шеган (danilo) wrote :

Apparently, this seems to be a problem with KDE dialog.

If I look at https://translations.staging.launchpad.net/ubuntu/gutsy/+source/gwenview/+pots/gwenview/hu/+translate?start=300 everything looks like designed. The problem is, apparently, with the design.

We can match names and emails from that page (I've added numbers for easier matching)
    (1)Bíró Árpád,(2),(3)Launchpad Contributions:,(4)Arpad Biro,(5)Carlos Perelló Marín,(6)Gabor Kelemen,(7)Viktor Heves
    (1)<email address hidden>,(2),(3),(4),(5)<email address hidden>,(6)<email address hidden>,(7)<email address hidden>

As you can see, they all match perfectly. Maybe the problem is with empty email fields? Maybe I need to use at least a single space?

I do need your help in tracking this bit down, because I simply don't come across these myself. If you can try playing with the PO/MO file and telling me what works, it'd be highly appreciated.

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Sorry for late reply, I forgot to subscribe.

So, I played around a bit and found that empty strings in the names list are not rendered, but in the email list, they are.
Jannick said above (https://bugs.launchpad.net/rosetta/+bug/133817/comments/1) that the name list should look like:

msgstr "Patrick Trettenbrein, Jannick Kuhr, , Launchpad contributions:, Jannick Kuhr, Patrick Trettenbrein, Jannick Kuhr, Patrick Trettenbrein, Jannick Kuhr"

note the ', , Launchpad contributions' part with space

The current Hungarian translation looks like:

Bíró Árpád,,Launchpad Contributions:,Arpad Biro,Carlos Perelló Marín,Gabor Kelemen,Viktor Heves

note the ',,Launchpad Contributions' part without space

After adding a space between the two commas, I got the expected result, like on the http://launchpadlibrarian.net/8911279/translatorcredits.jpg image.

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

PING!
Any news? :)

Revision history for this message
Данило Шеган (danilo) wrote :

Gabor, thanks for pinging about this, I've set it up for 1.2.6, it should be a trivial fix, though, nicer URL support will still need to wait for kdelibs support.

Revision history for this message
Данило Шеган (danilo) wrote :

Lost track of this, prepared a patch, reviewed by intellectronica, waiting for PQM to open.

Changed in rosetta:
milestone: 1.1.9 → 2.1.11
status: Confirmed → In Progress
Daniel T Chen (crimsun)
Changed in kdelibs:
importance: Undecided → Wishlist
Revision history for this message
Данило Шеган (danilo) wrote :

The Launchpad part has been fixed in RF 7227 (adding spaces where needed). Sorry for this getting off my radar.

Changed in rosetta:
status: In Progress → Fix Committed
Changed in rosetta:
status: Fix Committed → Fix Released
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Everything seems to be as per the design in the original report in KDE4.

affects: kdelibs (Ubuntu) → kde4libs (Ubuntu)
Changed in kde4libs (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.