[Kst] [Bug 145477] Non-translatable strings due to string composition

Andrew Walker arwalker at sumusltd.com
Thu May 17 00:51:03 CEST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=145477         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2007-05-17 00:50 -------
SVN commit 665440 by arwalker:

BUG:145477 List new and edit strings of objects explicitly to avoid problems in translation

 M  +2 -1      kstcsddialog_i.h  
 M  +2 -1      kstcurvedialog_i.h  
 M  +2 -1      kstdatadialog.ui  
 M  +9 -3      kstdatadialog.ui.h  
 M  +1 -1      ksteditviewobjectdialog_i.cpp  
 M  +2 -1      ksteqdialog_i.h  
 M  +2 -1      ksteventmonitor_i.h  
 M  +2 -1      ksthsdialog_i.h  
 M  +2 -1      kstimagedialog_i.h  
 M  +2 -1      kstmatrixdialog_i.h  
 M  +2 -1      kstpsddialog_i.h  
 M  +2 -1      kstvectordialog_i.h  
 M  +2 -0      kstviewarrow.cpp  
 M  +2 -0      kstviewbox.cpp  
 M  +2 -0      kstviewellipse.cpp  
 M  +2 -0      kstviewlabel.cpp  
 M  +2 -0      kstviewline.cpp  
 M  +4 -0      kstviewobject.cpp  
 M  +2 -0      kstviewobject.h  
 M  +2 -0      kstviewpicture.cpp  
 M  +2 -1      kstvvdialog_i.h  


--- branches/work/kst/1.5/kst/src/libkstapp/kstcsddialog_i.h #665439:665440
 @ -33,7 +33,8  @
     KST_EXPORT static KstCsdDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Spectrogram"); }
+    QString editTitle() { return tr("Edit Spectrogram"); }
+    QString newTitle() { return tr("New Spectrogram"); }
  
   public slots:
     /** update the entries in the psd dialog to represent current psds */
--- branches/work/kst/1.5/kst/src/libkstapp/kstcurvedialog_i.h #665439:665440
 @ -33,7 +33,8  @
     KST_EXPORT static KstCurveDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Curve"); }
+    QString editTitle() { return tr("Edit Curve"); }
+    QString newTitle() { return tr("New Curve"); }
  
   public slots:
     void update();
--- branches/work/kst/1.5/kst/src/libkstapp/kstdatadialog.ui #665439:665440
 @ -219,7 +219,8  @
     <slot>toggleEditMultiple()</slot>
 </slots>
 <functions>
-    <function access="protected" returnType="QString">objectName()</function>
+    <function access="protected" returnType="QString">editTitle()</function>
+    <function access="protected" returnType="QString">newTitle()</function>
     <function access="protected">fillFieldsForEdit()</function>
     <function access="protected">fillFieldsForNew()</function>
     <function access="protected" returnType="KstObjectPtr">findObject( const QString &amp; name )</function>
--- branches/work/kst/1.5/kst/src/libkstapp/kstdatadialog.ui.h #665439:665440
 @ -88,7 +88,7  @
     _tagName->setEnabled(true);
     _legendText->setEnabled(true);
 
-    setCaption(i18n("New %1").arg(objectName()));
+    setCaption(newTitle());
     QDialog::show();
     raise();
     _ok->setEnabled(true);
 @ -119,7 +119,7  @
     update();
     fillFieldsForEdit();
 
-    setCaption(i18n("Edit %1").arg(objectName()));
+    setCaption(editTitle());
     QDialog::show();
     raise();
     _ok->setEnabled(true);
 @ -127,12 +127,18  @
 }
 
 
-QString KstDataDialog::objectName()
+QString KstDataDialog::editTitle()
 {
     return QString::null;
 }
 
 
+QString KstDataDialog::newTitle()
+{
+    return QString::null;
+}
+
+
 void KstDataDialog::fillFieldsForEdit()
 {
 }
--- branches/work/kst/1.5/kst/src/libkstapp/ksteditviewobjectdialog_i.cpp #665439:665440
 @ -80,7 +80,7  @
   _top = top;
   updateWidgets();
   if (_viewObject) {
-    setCaption(i18n("Edit %1").arg(_viewObject->type()));
+    setCaption(_viewObject->editTitle());
   }
   _apply->setEnabled(false);
   show();
--- branches/work/kst/1.5/kst/src/libkstapp/ksteqdialog_i.h #665439:665440
 @ -33,7 +33,8  @
     static KstEqDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Equation"); }
+    QString editTitle() { return tr("Edit Equation"); }
+    QString newTitle() { return tr("New Equation"); }
  
   public slots:
     void update();
--- branches/work/kst/1.5/kst/src/libkstapp/ksteventmonitor_i.h #665439:665440
 @ -31,7 +31,8  @
     static KstEventMonitorI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Event Monitor"); }
+    QString editTitle() { return tr("Edit Event Monitor"); }
+    QString newTitle() { return tr("New Event Monitor"); }
  
   public slots:
     void update();
--- branches/work/kst/1.5/kst/src/libkstapp/ksthsdialog_i.h #665439:665440
 @ -33,7 +33,8  @
     static KstHsDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Histogram"); }
+    QString editTitle() { return tr("Edit Histogram"); }
+    QString newTitle() { return tr("New Histogram"); }
  
   public slots:
     void update();
--- branches/work/kst/1.5/kst/src/libkstapp/kstimagedialog_i.h #665439:665440
 @ -33,7 +33,8  @
     static KstImageDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Image"); }
+    QString editTitle() { return tr("Edit Image"); }
+    QString newTitle() { return tr("New Image"); }
  
   public slots:
     void update();
--- branches/work/kst/1.5/kst/src/libkstapp/kstmatrixdialog_i.h #665439:665440
 @ -34,7 +34,8  @
     static KstMatrixDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Matrix"); }
+    QString editTitle() { return tr("Edit Matrix"); }
+    QString newTitle() { return tr("New Matrix"); }
  
   public slots:
     void update();
--- branches/work/kst/1.5/kst/src/libkstapp/kstpsddialog_i.h #665439:665440
 @ -34,7 +34,8  @
     KST_EXPORT static KstPsdDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Spectrum"); }
+    QString editTitle() { return tr("Edit Spectrum"); }
+    QString newTitle() { return tr("New Spectrum"); }
  
   public slots:
     /** update the entries in the psd dialog to represent current psds */
--- branches/work/kst/1.5/kst/src/libkstapp/kstvectordialog_i.h #665439:665440
 @ -32,7 +32,8  @
     static KstVectorDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Vector"); }
+    QString editTitle() { return tr("Edit Vector"); }
+    QString newTitle() { return tr("New Vector"); }
  
   public slots:
     bool newObject();
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewarrow.cpp #665439:665440
 @ -31,6 +31,7  @
 
 KstViewArrow::KstViewArrow()
 : KstViewLine("Arrow") {
+  _editTitle = i18n("Edit Arrow");
   _hasFromArrow = false;
   _hasToArrow = true;
   _fromArrowScaling = 1.0;
 @ -58,6 +59,7  @
   
   // always has this value
   _type = "Arrow";
+  _editTitle = i18n("Edit Arrow");
   _standardActions |= Delete | Edit;
 }
 
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewbox.cpp #665439:665440
 @ -31,6 +31,7  @
 
 KstViewBox::KstViewBox()
 : KstViewObject("Box"), _borderColor(QColor(0, 0, 0)), _borderWidth(0) {
+  _editTitle = i18n("Edit Box");
   _xRound = 0;
   _yRound = 0;
   _cornerStyle = Qt::MiterJoin;
 @ -58,6 +59,7  @
   
   // these always have these values
   _type = "Box";
+  _editTitle = i18n("Edit Box");
   _standardActions |= Delete | Edit;
   _layoutActions |= Delete | Raise | Lower | RaiseToTop | LowerToBottom | Rename | MoveTo | Copy | CopyTo;
   _fallThroughTransparency = false;
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewellipse.cpp #665439:665440
 @ -28,6 +28,7  @
 
 KstViewEllipse::KstViewEllipse()
 : KstViewObject("Ellipse"), _borderWidth(1) {
+  _editTitle = i18n("Edit Ellipse");
   setTransparent(true);
   _transparentFill = false;
   _standardActions |= Delete | Edit;
 @ -50,6 +51,7  @
   
   // always have these values
   _type = "Ellipse";
+  _editTitle = i18n("Edit Ellipse");
   setTransparent(true);
   _standardActions |= Delete | Edit;
   _layoutActions |= Delete | Raise | Lower | RaiseToTop | LowerToBottom | Rename | MoveTo | Copy | CopyTo;
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewlabel.cpp #665439:665440
 @ -72,6 +72,7  @
   _parsed = 0L;
   _labelMargin = 0;
   _isResizable = false;
+  _editTitle = i18n("Edit Label");
   reparse();
   computeTextSize(_parsed);
 }
 @ -83,6 +84,7  @
   _fallThroughTransparency = false;
   _container = false;
   _type = "Label";
+  _editTitle = i18n("Edit Label");
   _dataPrecision = 8;
   _interpret = true;
   _replace = true;
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewline.cpp #665439:665440
 @ -30,6 +30,7  @
 
 KstViewLine::KstViewLine(const QString& type)
 : KstViewObject(type), _width(0) {
+  _editTitle = i18n("Edit Line");
   setTransparent(true);
   _container = false;
   _capStyle = Qt::FlatCap; 
 @ -77,6 +78,7  @
   // always these values
   setTransparent(true);
   _type = "Line";
+  _editTitle = i18n("Edit Line");
   setMinimumSize(QSize(1, 1));
   _standardActions |= Delete | Edit;
 }
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewobject.cpp #665439:665440
 @ -1824,6 +1824,10  @
 }
 
 
+const QString& KstViewObject::editTitle() const {
+  return _editTitle;
+}
+
 void KstViewObject::setMinimumSize(const QSize& sz) {
   _minimumSize = sz.expandedTo(QSize(1, 1)); // 1,1 is the absolute minimum
 }
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewobject.h #665439:665440
 @ -204,6 +204,7  @
     virtual void detach(); // remove from its parent
 
     const QString& type() const;
+    const QString& editTitle() const;
 
     virtual bool mouseHandler() const;
     virtual void mouseMoveEvent(QWidget *view, QMouseEvent *e);
 @ -323,6 +324,7  @
     QSize _idealSize; //ideal size for object. useful when _maintainAspect==true
     KstAspectRatio _aspectOldZoomedObject;
     QString _type;
+    QString _editTitle;
     QRegion _clipMask; // The mask of this object
     QMap<int, QString> _moveToMap;
     QMap<int, QString> _copyToMap;
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewpicture.cpp #665439:665440
 @ -37,6 +37,7  @
 
 KstViewPicture::KstViewPicture()
 : KstBorderedViewObject("Picture") {
+  _editTitle = i18n("Edit Picture");
   _refresh = 0;
   _timer = 0L;
   setTransparent(true);
 @ -63,6 +64,7  @
 
   // always have these values
   _type = "Picture";
+  _editTitle = i18n("Edit Picture");
   setTransparent(true);
   _standardActions |= Delete | Edit;
 }
--- branches/work/kst/1.5/kst/src/libkstapp/kstvvdialog_i.h #665439:665440
 @ -32,7 +32,8  @
     static KstVvDialogI *globalInstance();
 
   protected:
-    QString objectName() { return tr("Vector View"); }
+    QString editTitle() { return tr("Edit Vector View"); }
+    QString newTitle() { return tr("New Vector View"); }
  
   public slots:
     void update();


More information about the Kst mailing list