Minor string cleanup (#248)

- Simplified some strings to not include unnecessary markup.
- Fix translator comments so that they actually make it to glabels_C.ts file
      - Reconciled the style of these comments.
      - Added translator comments
This commit is contained in:
Jaye Evins
2025-11-10 17:46:07 -05:00
committed by GitHub
parent e6e08872e0
commit 9d516b7e1f
12 changed files with 78 additions and 60 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ namespace glabels
mColorNode = newColorNode;
// TRANSLATORS
//: %1 = color specification in hex. String must not contain a colon (:).
//: %1 = color specification in hex. String must not contain a colon (:).
mColorHistory->addColor( mColorNode.color(),
QString(tr("Custom Color %1")).arg(mColorNode.color().name()) );
+4 -2
View File
@@ -921,7 +921,8 @@ namespace glabels
if ( mUndoRedoModel->canUndo() )
{
editUndoAction->setEnabled( true );
/* Translators: %1 is the action description to undo. */
// TRANSLATORS
//: %1 is the action name/description (e.g. move, delete, ...) to undo.
editUndoAction->setText( QString( tr("Undo %1") ).arg( mUndoRedoModel->undoDescription() ) );
}
else
@@ -932,7 +933,8 @@ namespace glabels
if ( mUndoRedoModel->canRedo() )
{
editRedoAction->setEnabled( true );
/* Translators: %1 is the action description to redo. */
// TRANSLATORS
//: %1 is the action name/description (e.g. move, delete, ...) to redo.
editRedoAction->setText( QString( tr("Redo %1") ).arg( mUndoRedoModel->redoDescription() ) );
}
else
+2
View File
@@ -1580,6 +1580,8 @@ namespace glabels
QMessageBox msgBox( wizard() );
msgBox.setWindowTitle( tr("Save Product Template") );
msgBox.setIcon( QMessageBox::Warning );
// TRANSLATORS
//: %1 = brand name of product (e.g. Avery), %2 = part number of product (e.g. 5026).
msgBox.setText( tr("User product template (%1 %2) already exists.").arg(brand).arg(part) );
msgBox.setInformativeText( tr("Do you want to replace it?") );
msgBox.setStandardButtons( QMessageBox::Yes | QMessageBox::No );
+11 -6
View File
@@ -263,7 +263,8 @@
<string>Uncollated (e.g. 1,1,1 2,2,2 3,3,3)</string>
</property>
<property name="icon">
<iconset theme="glabels-uncollated"/>
<iconset theme="glabels-uncollated">
<normaloff>.</normaloff>.</iconset>
</property>
</item>
<item>
@@ -271,7 +272,8 @@
<string>Collated (e.g. 1,2,3 1,2,3 1,2,3)</string>
</property>
<property name="icon">
<iconset theme="glabels-collated"/>
<iconset theme="glabels-collated">
<normaloff>.</normaloff>.</iconset>
</property>
</item>
</widget>
@@ -292,7 +294,8 @@
<string>Merge groups are contiguous</string>
</property>
<property name="icon">
<iconset theme="glabels-merge-group-contiguous"/>
<iconset theme="glabels-merge-group-contiguous">
<normaloff>.</normaloff>.</iconset>
</property>
</item>
<item>
@@ -300,7 +303,8 @@
<string>Merge groups start on a new page</string>
</property>
<property name="icon">
<iconset theme="glabels-merge-group-page"/>
<iconset theme="glabels-merge-group-page">
<normaloff>.</normaloff>.</iconset>
</property>
</item>
</widget>
@@ -448,7 +452,8 @@
<string>Print...</string>
</property>
<property name="icon">
<iconset theme="glabels-print"/>
<iconset theme="glabels-print">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="iconSize">
<size>
@@ -491,7 +496,7 @@
</size>
</property>
<property name="text">
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;(Will print a total of xxxx items on nnn pages.)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">(Will print a total of xxxx items on nnn pages.)</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
+7 -4
View File
@@ -248,7 +248,7 @@
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select another product for this gLabels project.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Select another product for this gLabels project.</string>
</property>
<property name="styleSheet">
<string notr="true">text-align:left; padding:3px;</string>
@@ -257,7 +257,8 @@
<string>Change product</string>
</property>
<property name="icon">
<iconset theme="glabels-select-product"/>
<iconset theme="glabels-select-product">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="iconSize">
<size>
@@ -351,7 +352,8 @@
<string>Horizontal orientation</string>
</property>
<property name="icon">
<iconset theme="glabels-label-orientation-horiz"/>
<iconset theme="glabels-label-orientation-horiz">
<normaloff>.</normaloff>.</iconset>
</property>
</item>
<item>
@@ -359,7 +361,8 @@
<string>Vertical orientation</string>
</property>
<property name="icon">
<iconset theme="glabels-label-orientation-vert"/>
<iconset theme="glabels-label-orientation-vert">
<normaloff>.</normaloff>.</iconset>
</property>
</item>
</widget>
+1 -1
View File
@@ -32,7 +32,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click &amp;quot;Cancel&amp;quot; to quit, or click &amp;quot;Back&amp;quot; to begin with a different product.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Click &quot;Cancel&quot; to quit, or click &quot;Back&quot; to begin with a different product.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
+4 -1
View File
@@ -32,7 +32,10 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This dialog will help you create a custom product template. Let's get started:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>This dialog will help you create a custom product template. Let's get started:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
+1 -1
View File
@@ -32,7 +32,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click &amp;quot;Cancel&amp;quot; to quit, or click &amp;quot;Back&amp;quot; to begin with a different product.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Click &quot;Cancel&quot; to quit, or click &quot;Back&quot; to begin with a different product.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
+3 -3
View File
@@ -66,7 +66,7 @@
<item>
<widget class="QPushButton" name="addButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Add variable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Add variable</string>
</property>
<property name="text">
<string>Add</string>
@@ -76,7 +76,7 @@
<item>
<widget class="QPushButton" name="editButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Edit selected variable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Edit selected variable</string>
</property>
<property name="text">
<string>Edit</string>
@@ -86,7 +86,7 @@
<item>
<widget class="QPushButton" name="deleteButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Delete selected variable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Delete selected variable</string>
</property>
<property name="text">
<string>Delete</string>
+6 -6
View File
@@ -120,17 +120,17 @@ namespace glabels
// Update layout description
if ( mLayouts.size() == 1 )
{
/*
* Translators: %1 = number of labels across a page,
* %2 = number of labels down a page,
* %3 = total number of labels on a page (sheet).
*/
// TRANSLATORS
//: %1 = number of labels across a page,
//: %2 = number of labels down a page,
//: %3 = total number of labels on a page (sheet).
mLayoutDescription = QString( tr("%1 x %2 (%3 per sheet)") )
.arg(layout.nx()).arg(layout.ny()).arg(mNLabels);
}
else
{
/* Translators: %1 is the total number of labels on a page (sheet). */
// TRANSLATORS
//: %1 is the total number of labels on a page (sheet).
mLayoutDescription = QString( tr("%1 per sheet") ).arg(mNLabels);
}
}
@@ -1,24 +1,22 @@
<?xml version="1.0"?>
<Glabels-document xmlns="http://glabels.org/xmlns/2.3/">
<Template brand="Avery" part="5395" size="US-Letter" description="Name Badge Labels">
<Label-rectangle id="0" width="3.375in" height="2.33333in" round="0.1875in" x_waste="0.0625in" y_waste="0.0625in">
<Markup-margin size="0.0625in"/>
<Layout nx="2" ny="4" x0="0.6875in" y0="0.583333in" dx="3.75in" dy="2.5in"/>
<Glabels-document version="4.0">
<Template description="Name Badge Labels" size="US-Letter" brand="Avery" part="5395">
<Label-rectangle round="13.5pt" id="0" y_waste="4.5pt" height="168pt" width="243pt" x_waste="4.5pt">
<Markup-margin size="4.5pt"/>
<Layout dy="180pt" dx="270pt" x0="49.5pt" nx="2" ny="4" y0="42pt"/>
</Label-rectangle>
</Template>
<Objects id="0" rotate="False">
<Object-text x="0.150603in" y="0.2625in" w="0in" h="0in" justify="Left" auto_shrink="False" a0="1" a1="0" a2="0" a3="1" a4="0" a5="0">
<Span color="0x3366ffff" font_family="Sans" font_size="16" font_weight="Bold" font_italic="False" line_spacing="1">Hello, my name is</Span>
<Objects id="0" rotate="false">
<Object-text font_underline="false" font_italic="false" shadow_x="0pt" w="147.266pt" auto_shrink="false" a2="0" h="28pt" font_family="Sans" valign="top" line_spacing="1" a4="0" shadow="false" font_weight="bold" align="left" a5="0" wrap="word" shadow_color="0x0" x="10.8434pt" color="0x3366ffff" lock_aspect_ratio="false" font_size="12" a3="1" shadow_opacity="1" a0="1" shadow_y="0pt" a1="0" y="18.9pt">
<p>Hello, my name is</p>
</Object-text>
<Object-text x="0.150603in" y="0.645in" w="3.1125in" h="0.361111in" justify="Left" auto_shrink="False" a0="1" a1="0" a2="0" a3="1" a4="0" a5="0">
<Span color="0x000000ff" font_family="Sans" font_size="20" font_weight="Regular" font_italic="False" line_spacing="1">
<Field name="Name"/>
</Span>
<Object-text font_underline="false" font_italic="false" shadow_x="0pt" w="227.157pt" auto_shrink="false" a2="0" h="34pt" font_family="Sans" valign="top" line_spacing="1" a4="0" shadow="false" font_weight="normal" align="left" a5="0" wrap="word" shadow_color="0x0" x="10.8434pt" color="0xff" lock_aspect_ratio="false" font_size="15" a3="1" shadow_opacity="1" a0="1" shadow_y="0pt" a1="0" y="46.44pt">
<p>${Name}</p>
</Object-text>
<Object-text x="0.150603in" y="1.14in" w="0in" h="0in" justify="Left" auto_shrink="False" a0="1" a1="0" a2="0" a3="1" a4="0" a5="0">
<Span color="0x000000ff" font_family="Sans" font_size="11" font_weight="Regular" font_italic="False" line_spacing="1">Department: <Field name="Department"/></Span>
<Object-text font_underline="false" font_italic="false" shadow_x="0pt" w="152.172pt" auto_shrink="false" a2="0" h="21pt" font_family="Sans" valign="top" line_spacing="1" a4="0" shadow="false" font_weight="normal" align="left" a5="0" wrap="word" shadow_color="0x0" x="10.8434pt" color="0xff" lock_aspect_ratio="false" font_size="8.25" a3="1" shadow_opacity="1" a0="1" shadow_y="0pt" a1="0" y="82.08pt">
<p>Department: ${Department}</p>
</Object-text>
<Object-barcode x="0.150603in" y="1.395in" w="3.06944in" h="0.847222in" backend="built-in" style="Code39" text="True" checksum="True" color="0x000000ff" field="SN" format="10" a0="1" a1="0" a2="0" a3="1" a4="0" a5="0"/>
<Object-barcode style="code39" w="221pt" a2="0" h="61pt" backend="" a4="0" a5="0" text="true" checksum="true" x="10.8434pt" color="0xff" lock_aspect_ratio="false" a3="1" data="${SN}" a0="1" a1="0" y="100.44pt"/>
</Objects>
<Merge type="Text/Comma/Line1Keys" src="/home/evins/GLabels/test-data/crew-orientation-list.csv"/>
<Data/>
+25 -20
View File
@@ -241,10 +241,12 @@
<name>Frame</name>
<message>
<source>%1 x %2 (%3 per sheet)</source>
<extracomment>%1 = number of labels across a page, %2 = number of labels down a page, %3 = total number of labels on a page (sheet).</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>%1 per sheet</source>
<extracomment>%1 is the total number of labels on a page (sheet).</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
@@ -659,10 +661,6 @@
<source>Layout:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select another product for this gLabels project.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Change product</source>
<translation type="unfinished"></translation>
@@ -695,6 +693,10 @@
<source>Similar Products</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select another product for this gLabels project.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ReportBugDialog</name>
@@ -882,7 +884,7 @@
<context>
<name>TemplateDesignerContinuousPage</name>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click &amp;quot;Cancel&amp;quot; to quit, or click &amp;quot;Back&amp;quot; to begin with a different product.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<source>Click &quot;Cancel&quot; to quit, or click &quot;Back&quot; to begin with a different product.</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -907,10 +909,6 @@
</context>
<context>
<name>TemplateDesignerIntroPage</name>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This dialog will help you create a custom product template. Let&apos;s get started:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy/Edit Product</source>
<translation type="unfinished"></translation>
@@ -927,6 +925,10 @@
<source>Create a new product template from scratch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This dialog will help you create a custom product template. Let&apos;s get started:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TemplateDesignerNLayoutsPage</name>
@@ -1035,7 +1037,7 @@
<context>
<name>TemplateDesignerPathPage</name>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click &amp;quot;Cancel&amp;quot; to quit, or click &amp;quot;Back&amp;quot; to begin with a different product.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<source>Click &quot;Cancel&quot; to quit, or click &quot;Back&quot; to begin with a different product.</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1199,28 +1201,28 @@
</context>
<context>
<name>VariablesView</name>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Add variable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Edit selected variable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Delete selected variable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete</source>
<source>Add variable</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit selected variable</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete selected variable</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1894,10 +1896,12 @@
</message>
<message>
<source>Undo %1</source>
<extracomment>%1 is the action name/description (e.g. move, delete, ...) to undo.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Redo %1</source>
<extracomment>%1 is the action name/description (e.g. move, delete, ...) to redo.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@@ -2189,6 +2193,7 @@
</message>
<message>
<source>User product template (%1 %2) already exists.</source>
<extracomment>%1 = brand name of product (e.g. Avery), %2 = part number of product (e.g. 5026).</extracomment>
<translation type="unfinished"></translation>
</message>
<message>