<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>89095</bug_id>
          
          <creation_ts>2004-09-08 17:07:28 +0000</creation_ts>
          <short_desc>scripts don&apos;t work in non-english language because the arguments are translated</short_desc>
          <delta_ts>2010-08-29 23:26:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kstars</product>
          <component>general</component>
          <version>1.0</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>UNMAINTAINED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ludovic Grossard">grossard</reporter>
          <assigned_to name="Jasem Mutlaq">mutlaqja</assigned_to>
          <cc>akarsh.simha</cc>
    
    <cc>lueck</cc>
    
    <cc>mboquien</cc>
    
    <cc>nicolasg</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>266890</commentid>
    <comment_count>0</comment_count>
    <who name="Ludovic Grossard">grossard</who>
    <bug_when>2004-09-08 17:07:28 +0000</bug_when>
    <thetext>Version:           1.0 (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.3.4 (Debian 1:3.3.4-9)
OS:                Linux (i686) release 2.4.20-xfs

As an example, if I ask kstars to find the Sun with a script, the following line is saved in the .kstars file:
dcop $KSTARS $MAIN  lookTowards Soleil
instead of
dcop $KSTARS $MAIN  lookTowards Sun

The script does not work because the argument is translated!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>269714</commentid>
    <comment_count>1</comment_count>
    <who name="">kstars</who>
    <bug_when>2004-09-18 16:39:49 +0000</bug_when>
    <thetext>CVS commit by harris: 

Fixing bug #89095 (scripts don&apos;t work in non-english language because
the arguments are translated).  Fixed in both HEAD and 3_3_BRANCH.
Thanks for the report.
CCMAIL: 89095-done@bugs.kde.org


  M +1 -1      scriptbuilder.cpp   1.37


--- kdeedu/kstars/kstars/tools/scriptbuilder.cpp  #1.36:1.37
@@ -1058,5 +1058,5 @@ void ScriptBuilder::slotFindObject() {
                 setUnsavedChanges( true );
 
-                argLookToward-&gt;FocusEdit-&gt;setCurrentText( fd.currentItem()-&gt;objName()-&gt;translatedText() );
+                argLookToward-&gt;FocusEdit-&gt;setCurrentText( fd.currentItem()-&gt;objName()-&gt;text() );
         }
 }


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>304075</commentid>
    <comment_count>2</comment_count>
    <who name="Ludovic Grossard">grossard</who>
    <bug_when>2005-01-18 07:30:40 +0000</bug_when>
    <thetext>I tried again with kstars cvs HEAD and it does not work, objects are translated in the script file. I&apos;ve checked that the above fix is applied in the sources I&apos;ve compiled.
Moreover, even with english language, lookTowards does not work for some objects, for example:

KSTARS=`dcopfind -a &apos;kstars*&apos;`
MAIN=KStarsInterface
CLOCK=clock#1
dcop $KSTARS $MAIN  defaultZoom
dcop $KSTARS $MAIN  lookTowards &quot;Machholz (2004 Q2)&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>408213</commentid>
    <comment_count>3</comment_count>
    <who name="">kstars</who>
    <bug_when>2006-01-23 03:31:35 +0000</bug_when>
    <thetext>I&apos;m sorry it&apos;s been so long since you reopened this bug.

Can you try the following patch?

Index: tools/scriptbuilder.cpp
===================================================================
--- tools/scriptbuilder.cpp     (revision 500731)
+++ tools/scriptbuilder.cpp     (working copy)
@@ -1832,7 +1832,7 @@
        if ( fd.exec() == QDialog::Accepted &amp;&amp; fd.currentItem() ) {
                setUnsavedChanges( true );

-               argLookToward-&gt;FocusEdit-&gt;setCurrentText( fd.currentItem()-&gt;objName()-&gt;text() );
+               argLookToward-&gt;FocusEdit-&gt;setCurrentText( fd.currentItem()-&gt;objName()-&gt;skyObject()-&gt;name() );
        }
 }

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>507556</commentid>
    <comment_count>4</comment_count>
    <who name="Soenke Dibbern">s_dibbern</who>
    <bug_when>2007-02-08 01:52:39 +0000</bug_when>
    <thetext>More than one year later, this still doesn&apos;t work. Neither with localized directions, as per .po file, nor with localized object names. I&apos;ve the directions now left untranslated in my .po file, to keep up the dialog&apos;s usability for the user. Could you please drop a note on kde-i18n-doc once you fixed this, to notify translators that it&apos;s now worthwhile to complete the translation of kstars.po? TIA</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011209</commentid>
    <comment_count>5</comment_count>
    <who name="Jasem Mutlaq">mutlaqja</who>
    <bug_when>2010-08-29 23:26:43 +0000</bug_when>
    <thetext>DCOP is not longer used in KStars.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>