Fwd: Re: kdereview/plasma/dataengines/nowplaying

Alex Merry huntedhacker at tiscali.co.uk
Tue Apr 1 20:37:20 CEST 2008


I think we should sort out how translations work in dataengines 
conclusively...

Alex


----------  Forwarded Message  ----------

Subject: Re: kdereview/plasma/dataengines/nowplaying
Date: Tuesday 01 April 2008
From: Albert Astals Cid <aacid at kde.org>
To: kde-i18n-doc at kde.org

A Dimarts 01 Abril 2008, Alex Merry va escriure:
> SVN commit 792560 by alexmerry:
>
> Add some i18n support.
>
> I'm slightly concerned that the translations may not be easy without
> context, but including context means that applets can't just call
> i18n() on all strings (which is kind of the point of the I18N_NOOP calls).
> CC'ing the kde-i18n-doc list for comments.
>
> This should finally address all the issues raised by the review process.

In my opinion this is a very weird and wrong behaviour, if the clients do not 
have to use the text, don't mark it with I18N_NOOP, if they have to use it, 
give it already i18n'ed and add context to help translation.

Albert

>
> CCMAIL: kde-i18n-doc at kde.org
>
>
>
>  M  +6 -0      CMakeLists.txt
>  AM            Messages.sh
>  M  +35 -36    nowplayingengine.cpp
>
>
> --- trunk/kdereview/plasma/dataengines/nowplaying/CMakeLists.txt
> #792559:792560 @@ -20,6 +20,9 @@
>     QT4_ADD_DBUS_INTERFACE(nowplaying_engine_SRCS ${juk_xml} juk_interface)
>     set(nowplaying_engine_SRCS ${nowplaying_engine_SRCS} juk.cpp)
>     set(JUK_FOUND ON)
> +   message(STATUS "Found JuK D-Bus interface specification: the nowplaying
> dataengine will support JuK") +else(EXISTS ${juk_xml})
> +   message(STATUS "JuK D-Bus interface specification NOT found: the
> nowplaying dataengine will NOT support JuK") endif(EXISTS ${juk_xml})
>  macro_log_feature(JUK_FOUND "JuK" "Jukebox and music manager for KDE"
> "http://developer.kde.org/~wheeler/juk.html" FALSE "" "Support for JuK in
> the Now Playing data engine")
>
> @@ -31,6 +34,9 @@
>        include_directories(${XMMS_INCLUDE_DIRS})
>        include_directories(${GLIB2_INCLUDE_DIR})
>        set(nowplaying_engine_SRCS ${nowplaying_engine_SRCS} xmms.cpp)
> +      message(STATUS "Found XMMS: the nowplaying dataengine will support
> XMMS 1.x") +   else(XMMS_FOUND)
> +      message(STATUS "Could NOT find XMMS: the nowplaying dataengine will
> NOT support XMMS 1.x") endif(XMMS_FOUND)
>  endif(GLIB2_FOUND)
>
> ** trunk/kdereview/plasma/dataengines/nowplaying/Messages.sh #property
> svn:executable + *
> --- trunk/kdereview/plasma/dataengines/nowplaying/nowplayingengine.cpp
> #792559:792560 @@ -68,8 +68,8 @@
>      kDebug() << "Source" << source << "was requested";
>      QString lowerSource = source.toLower();
>      if (lowerSource == "help") {
> -        setData(source, "Use 'players' to get a list of players.\n"
> -                        "Use 'properties' to get a list of all properties
> that may be returned." +        setData(source, I18N_NOOP("Use 'players' to
> get a list of players.\n" +                        "Use 'properties' to get
> a list of all properties that may be returned.") /*
>                          "\n"
>                          "Players can be controlled with\n"
> @@ -89,26 +89,26 @@
>                          );
>          return true;
>      } else if (lowerSource == "properties") {
> -        setData(source, "State",           "QString -
> playing|paused|stopped"); -        setData(source, "Artist",         
> "QString - the artist metadata for the\n" -                                
>           "          current track, if available"); -       
> setData(source, "Album",           "QString - the album metadata for the\n"
> -                                           "          current track, if
> available"); -        setData(source, "Title",           "QString - the
> title metadata for the\n" -                                           "    
>      current track, if available"); -        setData(source, "Track
> number",    "int     - the album/collection track number\n" -              
>                             "          (eg: on a CD) if known, 0
> otherwise"); -        setData(source, "Comment",         "QString - the
> comment metadata for the\n" -                                           "  
>        current track, if available"); -        setData(source, "Genre",    
>       "QString - the comment metadata for the\n" -                         
>                  "          current track, if available"); -       
> setData(source, "Length",          "int     - the length of the current
> track\n" -                                           "          in seconds,
> 0 if unknown"); -        setData(source, "Position",        "int     - the
> position of the current track\n" -                                         
>  "          in seconds, 0 if unknown"); -        setData(source, "Volume", 
>         "float   - the volume, given as a float\n" -                       
>                    "          between 0 and 1, or -1 if unknown"); -       
> setData(source, "Artwork",         "QPixmap - the album artwork, if
> available"); +        setData(source, "State",           I18N_NOOP("QString
> - playing|paused|stopped")); +        setData(source, "Artist",         
> I18N_NOOP("QString - the artist metadata for the\n" +                      
>                               "          current track, if available")); + 
>       setData(source, "Album",           I18N_NOOP("QString - the album
> metadata for the\n" +                                                     "
>          current track, if available")); +        setData(source, "Title", 
>          I18N_NOOP("QString - the title metadata for the\n" +              
>                                       "          current track, if
> available")); +        setData(source, "Track number",    I18N_NOOP("int   
>  - the album/collection track number\n" +                                  
>                   "          (eg: on a CD) if known, 0 otherwise")); +     
>   setData(source, "Comment",         I18N_NOOP("QString - the comment
> metadata for the\n" +                                                     "
>          current track, if available")); +        setData(source, "Genre", 
>          I18N_NOOP("QString - the comment metadata for the\n" +            
>                                         "          current track, if
> available")); +        setData(source, "Length",          I18N_NOOP("int   
>  - the length of the current track\n" +                                    
>                 "          in seconds, 0 if unknown")); +       
> setData(source, "Position",        I18N_NOOP("int     - the position of the
> current track\n" +                                                     "   
>       in seconds, 0 if unknown")); +        setData(source, "Volume",      
>    I18N_NOOP("float   - the volume, given as a float\n" +                  
>                                   "          between 0 and 1, or -1 if
> unknown")); +        setData(source, "Artwork",         I18N_NOOP("QPixmap
> - the album artwork, if available")); #if 0
>          setData(source, "Can play",        "bool    - whether the 'play'
> command can be\n" "          expected to have any effect\n" @@ -143,7
> +143,6 @@
>      } else if (lowerSource == "players") {
>          setData(source, sources());
>          return true;
> -    } else if (lowerSource == "players") {
>      //FIXME: this belongs in a dataSink, or whatever we're calling it
>  #if 0
>      } else if (source.contains(':')) {
> @@ -238,26 +237,26 @@
>
>      switch(player->state()) {
>          case Player::Playing:
> -            setData(source, "State", "playing");
> +            setData(source, I18N_NOOP("State"), I18N_NOOP("playing"));
>              break;
>          case Player::Paused:
> -            setData(source, "State", "paused");
> +            setData(source, I18N_NOOP("State"), I18N_NOOP("paused"));
>              break;
>          case Player::Stopped:
> -            setData(source, "State", "stopped");
> +            setData(source, I18N_NOOP("State"), I18N_NOOP("stopped"));
>              break;
>      }
>
> -    setData(source, "Artist", player->artist());
> -    setData(source, "Album", player->album());
> -    setData(source, "Title", player->title());
> -    setData(source, "Track number", player->trackNumber());
> -    setData(source, "Comment", player->comment());
> -    setData(source, "Genre", player->genre());
> -    setData(source, "Length", player->length());
> -    setData(source, "Position", player->position());
> -    setData(source, "Volume", player->volume());
> -    setData(source, "Artwork", player->artwork());
> +    setData(source, I18N_NOOP("Artist"), player->artist());
> +    setData(source, I18N_NOOP("Album"), player->album());
> +    setData(source, I18N_NOOP("Title"), player->title());
> +    setData(source, I18N_NOOP("Track number"), player->trackNumber());
> +    setData(source, I18N_NOOP("Comment"), player->comment());
> +    setData(source, I18N_NOOP("Genre"), player->genre());
> +    setData(source, I18N_NOOP("Length"), player->length());
> +    setData(source, I18N_NOOP("Position"), player->position());
> +    setData(source, I18N_NOOP("Volume"), player->volume());
> +    setData(source, I18N_NOOP("Artwork"), player->artwork());
>      // FIXME: re-enable when we have a dataSink
>  #if 0
>      setData(source, "Can play", player->canPlay());



-------------------------------------------------------

-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080401/e1d9d254/attachment.pgp 


More information about the Panel-devel mailing list