Removing hardcoded "Desktop" from the default names of desktops

Chusslove Illich caslav.ilic at gmx.net
Tue Jul 13 10:10:01 BST 2010


> [: Alexander Potashev :]
> Currently, the default names of desktop are "Desktop 1" through "Desktop
> 20". That makes at least 2 problems:
>
> 1. The user can rename a desktop to something like "Reading", then press
> Alt+Tab to look at the list of windows (http://omploader.org/vNHdzeQ) and
> see the word "Reading" while he already has forgotten about names of
> desktops.
>
> 2. Problem of translation of "On %1" from plasma_applet_tasks.po. Here %1
> is the name of desktop. If you want to make a proper translation into a
> language with grammatical cases [...]

I think these two issues should be treated entirely separately, and not
influence each other on the technical (code) level.

Limiting to English, the first issue is as follows. Default desktop names of
"Desktop 1", "Desktop 2", etc. imply that the word "desktop" is not
mentioned when refering to desktops in various contexts. The user can change
the default desktop name to something that does not contain the word
"desktop", and then only the surrounding context is left to discern it's
about a desktop name (such as in "On <desktop-name>" in taskbar tooltip, or
"<desktop-name>: <window-title>" in window switching dialog on Alt+Tab).
Would it be better if instead default desktop names were "1", "2", "3"...
(or "A", "B", "C"...), thus allowing for the word "desktop" in messages that
refer to them? I have no objective argument here, just an aesthetic feeling.
Hence, CC to Usability.

Non-translators stop reading here.

The second issue is grammatical declination in translation. Suppose that
nothing is changed for the first issue, default names are left at
"Destkop N", and that you want to have (the translated equivalent of) the
helper word "desktop" in order to satisfy the grammar. What you can then do
is simply to strip the initial "Desktop " if you find it in the desktop
name, for example:

  msgid "On %1"
  msgstr ""
  "На %1"
  "|/|"
  "На рабочем столе $[без-префикса 'Рабочий стол ' %1]"

без-префикса (without-prefix) scripting call would be defined in kdelibs4.js
for ru, and trivial:

  // Return the phrase without the given prefix if it has it,
  // or the full phrase otherwise.
  function without_prefix (prefix, phrase)
  {
      if (phrase.indexOf(prefix) == 0) {
          phrase = phrase.substr(prefix.length);
      }
      return phrase;
  }
  Ts.setcall("без-префикса", without_prefix);

(I didn't test this though, and JavaScript is not exactly flowing from my
fingertips...)

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100713/d5831c56/attachment.sig>


More information about the kde-core-devel mailing list