View Issue Details

IDProjectCategoryView StatusLast Update
0013577ScribusUser Interfacepublic2015-12-02 14:45
ReporterFirasH Assigned ToFirasH  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.5.1svn 
Fixed in Version1.5.1svn 
Summary0013577: Fix inconsistent colons in Properties Palette
DescriptionFix inconsistent colons in Properties Palette.
In corresponding .ui files the same strings are used and consequently translators have to translate twice for .ui and for .cpp. Can we disable the creation of those redundant translations from .ui files if we already have strings in .cpp files?
Additional Information1.5.1.svn (20600)
TagsNo tags attached.
PatchYes

Activities

FirasH

2015-11-29 21:51

developer  

13577-Patch.diff (4,321 bytes)   

diff --git a/scribus/ui/propertiespalette_shape.cpp b/scribus/ui/propertiespalette_shape.cpp
--- a/scribus/ui/propertiespalette_shape.cpp
+++ b/scribus/ui/propertiespalette_shape.cpp
@@ -544,7 +544,7 @@
 	QString suffix   = m_doc ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
 	roundRect->setSuffix(suffix);
 
-	shapeGroup->setTitle( tr("Shape:"));
+	shapeGroup->setTitle( tr("Shape"));
 	customShape->setToolTip( tr("Choose the shape of frame..."));
 	editShape->setText( tr("&Edit..."));
 	roundRect->setToolTip( tr("Set radius of corner rounding"));
diff --git a/scribus/ui/propertiespalette_xyz.cpp b/scribus/ui/propertiespalette_xyz.cpp
--- a/scribus/ui/propertiespalette_xyz.cpp
+++ b/scribus/ui/propertiespalette_xyz.cpp
@@ -216,7 +216,7 @@
 	flipH->setEnabled(false);
 	flipV->setEnabled(false);
 	xposLabel->setText( tr( "&X-Pos:" ) );
-	widthLabel->setText( tr( "&Width" ) );
+	widthLabel->setText( tr( "&Width:" ) );
 	yposLabel->setText( tr( "&Y-Pos:" ) );
 	heightLabel->setText( tr( "&Height:" ) );
 	xposSpin->showValue(0);
@@ -239,7 +239,7 @@
 	if (lineMode == 0)
 	{
 		xposLabel->setText( tr( "&X-Pos:" ) );
-		widthLabel->setText( tr( "&Width" ) );
+		widthLabel->setText( tr( "&Width:" ) );
 		yposLabel->setText( tr( "&Y-Pos:" ) );
 		heightLabel->setText( tr( "&Height:" ) );
 		rotationSpin->setEnabled(true);
@@ -367,7 +367,7 @@
 	else
 	{
 		xposLabel->setText( tr( "&X-Pos:" ) );
-		widthLabel->setText( tr( "&Width" ) );
+		widthLabel->setText( tr( "&Width:" ) );
 		yposLabel->setText( tr( "&Y-Pos:" ) );
 		heightLabel->setText( tr( "&Height:" ) );
 		rotationSpin->setEnabled(true);
diff --git a/scribus/ui/propertywidget_distance.cpp b/scribus/ui/propertywidget_distance.cpp
--- a/scribus/ui/propertywidget_distance.cpp
+++ b/scribus/ui/propertywidget_distance.cpp
@@ -434,7 +434,7 @@
 {
 	columnsLabel->setText( tr("Colu&mns:"));
 
-	verticalAlignLabel->setText( tr("Vertical Alignment"));
+	verticalAlignLabel->setText( tr("Vertical Alignment:"));
 	int oldAliLabel = verticalAlign->currentIndex();
 	verticalAlign->clear();
 	verticalAlign->addItem( tr("Top"));
diff --git a/scribus/ui/propertywidget_orphans.cpp b/scribus/ui/propertywidget_orphans.cpp
--- a/scribus/ui/propertywidget_orphans.cpp
+++ b/scribus/ui/propertywidget_orphans.cpp
@@ -93,8 +93,8 @@
 
 void PropertyWidget_Orphans::languageChange()
 {
-	keepLabelStart->setText (tr ("Don't separate first"));
-	keepLabelEnd->setText (tr ("Don't separate last"));
+	keepLabelStart->setText (tr ("Don't separate first:"));
+	keepLabelEnd->setText (tr ("Don't separate last:"));
 	keepLinesStart->setSuffix (tr (" lines"));
 	keepLinesEnd->setSuffix (tr (" lines"));
 	keepTogether->setText (tr ("Do not split paragraph"));
diff --git a/scribus/ui/propertywidget_pareffect.cpp b/scribus/ui/propertywidget_pareffect.cpp
--- a/scribus/ui/propertywidget_pareffect.cpp
+++ b/scribus/ui/propertywidget_pareffect.cpp
@@ -557,23 +557,23 @@
 void PropertyWidget_ParEffect::languageChange()
 {
 	fillPECombo();
-	dropCapLinesLabel->setText(tr("Lines"));
+	dropCapLinesLabel->setText(tr("Lines:"));
 	dropCapsGroup->setTitle(tr("Drop Caps"));
 	bullGroup->setTitle(tr("Bulleted List"));
-	bulletCharLabel->setText(tr("Bullet Char(s)"));
+	bulletCharLabel->setText(tr("Bullet Char(s):"));
 	bulletCharTableButton->setToolTip(tr("Enhanced char table to choose bullet chars"));
 	bulletCharTableButton->setText(tr("Char Table"));
 	numGroup->setTitle(tr("Numbered List"));
-	numLevelLabel->setText(tr("Level"));
-	numComboLabel->setText(tr("Set"));
-	numFormatLabel->setText(tr("Format"));
-	numStartLabel->setText(tr("Start"));
-	numPrefixLabel->setText(tr("Prefix"));
-	numSuffixLabel->setText(tr("Suffix"));
+	numLevelLabel->setText(tr("Level:"));
+	numComboLabel->setText(tr("Set:"));
+	numFormatLabel->setText(tr("Format:"));
+	numStartLabel->setText(tr("Start:"));
+	numPrefixLabel->setText(tr("Prefix:"));
+	numSuffixLabel->setText(tr("Suffix:"));
 	peGroup->setTitle(tr("Effect Parameters"));
 	peIndent->setText(tr("Auto-Indent"));
-	peOffsetLabel->setText(tr("Offset"));
-	peCharStyleLabel->setText(tr("Char Style"));
+	peOffsetLabel->setText(tr("Offset:"));
+	peCharStyleLabel->setText(tr("Char Style:"));
 	peCharStyleCombo->setToolTip(tr("Choose character style or leave blank for use default paragraph style"));
 }
 
13577-Patch.diff (4,321 bytes)   

jghali

2015-11-30 12:01

administrator   ~0037738

>> Can we disable the creation of those redundant translations from .ui files if we already have strings in .cpp files?

No. The solution is to use the retranslateUi() function generated by uic as much as possible.

FirasH

2015-11-30 17:25

developer   ~0037742

Last edited: 2015-11-30 17:31

Uploaded first part of this patch using retranslateUi().
Built and works, jghali is this correct?
If it's fine I can try to simplify the translations where possible? Thanks!

FirasH

2015-11-30 17:25

developer  

13577-propertiespalette_shape.diff (5,734 bytes)   

diff --git a/scribus/ui/propertiespalette_shapebase.ui b/scribus/ui/propertiespalette_shapebase.ui
--- a/scribus/ui/propertiespalette_shapebase.ui
+++ b/scribus/ui/propertiespalette_shapebase.ui
@@ -52,6 +52,9 @@
         </item>
         <item>
          <widget class="Autoforms" name="customShape">
+          <property name="toolTip">
+           <string>Choose the shape of frame...</string>
+          </property>
           <property name="text">
            <string>...</string>
           </property>
@@ -71,8 +74,11 @@
         <item>
          <widget class="QLabel" name="roundRectLabel">
           <property name="text">
-           <string>Round Corners</string>
+           <string>R&amp;ound Corners:</string>
           </property>
+          <property name="buddy">
+           <cstring>roundRect</cstring>
+          </property>
          </widget>
         </item>
         <item>
@@ -83,6 +89,9 @@
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
+          <property name="toolTip">
+           <string>Set radius of corner rounding</string>
+          </property>
          </widget>
         </item>
        </layout>
@@ -93,7 +102,7 @@
    <item>
     <widget class="QGroupBox" name="textFlowGroup">
      <property name="title">
-      <string>Text Flow Around Frame</string>
+      <string>Text &amp;Flow Around Frame</string>
      </property>
      <property name="flat">
       <bool>true</bool>
@@ -126,7 +135,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -139,7 +148,7 @@
          </sizepolicy>
         </property>
         <property name="text">
-         <string>Use &amp;Frame Shape</string>
+         <string>Use Frame &amp;Shape</string>
         </property>
         <property name="checkable">
          <bool>true</bool>
@@ -151,7 +160,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -176,7 +185,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -201,7 +210,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -226,7 +235,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -277,6 +286,9 @@
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
+            <property name="toolTip">
+             <string>&lt;qt&gt;Any path self-intersections or subpaths create holes in the fill&lt;/qt&gt;</string>
+            </property>
             <property name="text">
              <string>Even-Odd</string>
             </property>
@@ -290,6 +302,9 @@
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
+            <property name="toolTip">
+             <string>&lt;qt&gt;Fill is solid unless a subpath is counter-directional&lt;/qt&gt;</string>
+            </property>
             <property name="text">
              <string>Non Zero</string>
             </property>
diff --git a/scribus/ui/propertiespalette_shape.cpp b/scribus/ui/propertiespalette_shape.cpp
--- a/scribus/ui/propertiespalette_shape.cpp
+++ b/scribus/ui/propertiespalette_shape.cpp
@@ -51,8 +51,6 @@
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
 
-	roundRectLabel->setBuddy(roundRect);
-
 	textFlowDisabled->setIcon(IconManager::instance()->loadIcon("flow-none.png"));
 	textFlowUsesFrameShape->setIcon(IconManager::instance()->loadIcon("flow-frame.png"));
 	textFlowUsesBoundingBox->setIcon(IconManager::instance()->loadIcon("flow-bounding.png"));
@@ -544,24 +542,7 @@
 	QString suffix   = m_doc ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
 	roundRect->setSuffix(suffix);
 
-	shapeGroup->setTitle( tr("Shape:"));
-	customShape->setToolTip( tr("Choose the shape of frame..."));
-	editShape->setText( tr("&Edit..."));
-	roundRect->setToolTip( tr("Set radius of corner rounding"));
-	roundRectLabel->setText( tr("R&ound Corners:"));
-	fillRuleGroup->setTitle( tr("Fill Rule"));
-	evenOdd->setText( tr("Even-Odd"));
-	nonZero->setText( tr("Non Zero"));
-
-	evenOdd->setToolTip( "<qt>" + tr("Any path self-intersections or subpaths create holes in the fill")  + "</qt>");
-	nonZero->setToolTip( "<qt>" + tr("Fill is solid unless a subpath is counter-directional")  + "</qt>");
-
-	textFlowGroup->setTitle( tr("Text &Flow Around Frame"));
-	textFlowDisabled->setText( tr("Disabled"));
-	textFlowUsesFrameShape->setText( tr("Use Frame &Shape"));
-	textFlowUsesBoundingBox->setText( tr("Use &Bounding Box"));
-	textFlowUsesContourLine->setText( tr("&Use Contour Line"));
-	textFlowUsesImageClipping->setText( tr("Use Image Clip Path"));
+	retranslateUi(this);
 }
 
 void PropertiesPalette_Shape::unitChange()

jghali

2015-11-30 21:17

administrator   ~0037750

Last edited: 2015-11-30 21:18

>> Built and works, jghali is this correct?

Yep

>> If it's fine I can try to simplify the translations where possible? Thanks!

Better wait after 1.5.1 release as this change can disrupt translations because of the difference context between cpp file and ui file.

FirasH

2015-11-30 21:48

developer   ~0037752

Thanks jghali!
I'll work on completing this after 1.5.1 release.

jghali

2015-11-30 22:11

administrator   ~0037755

Applied first patch except part related to orphan options: as the label + combo box text can be read as a sentence, adding a colon between the label and combo does not make sense in that case.

FirasH

2015-12-02 14:45

developer   ~0037794

Thanks jghali!
Closing this, will open new reports for further changes after 1.5.1 release.

Issue History

Date Modified Username Field Change
2015-11-29 21:51 FirasH New Issue
2015-11-29 21:51 FirasH File Added: 13577-Patch.diff
2015-11-29 21:51 FirasH Description Updated
2015-11-29 23:48 Kunda Sticky Issue No => Yes
2015-11-30 12:01 jghali Note Added: 0037738
2015-11-30 17:25 FirasH Note Added: 0037742
2015-11-30 17:25 FirasH File Added: 13577-propertiespalette_shape.diff
2015-11-30 17:31 FirasH Note Edited: 0037742
2015-11-30 21:17 jghali Note Added: 0037750
2015-11-30 21:18 jghali Note Edited: 0037750
2015-11-30 21:48 FirasH Note Added: 0037752
2015-11-30 22:11 jghali Note Added: 0037755
2015-11-30 22:11 jghali Status new => resolved
2015-11-30 22:11 jghali Fixed in Version => 1.5.1svn
2015-11-30 22:11 jghali Resolution open => fixed
2015-11-30 22:11 jghali Assigned To => FirasH
2015-11-30 22:11 jghali Sticky Issue Yes => No
2015-12-02 14:45 FirasH Note Added: 0037794
2015-12-02 14:45 FirasH Status resolved => closed