Handle plural vs. singular cases in PrintView (#47)
This commit is contained in:
@@ -90,8 +90,23 @@ namespace glabels
|
||||
{
|
||||
copiesStartSpin->setRange( 1, mModel->frame()->nLabels() );
|
||||
|
||||
if ( mRenderer.nPages() == 1 )
|
||||
{
|
||||
if ( mRenderer.nItems() == 1 )
|
||||
{
|
||||
copiesDescriptionLabel->setText( tr("(Will print a total of 1 item on 1 page.)") );
|
||||
}
|
||||
else
|
||||
{
|
||||
copiesDescriptionLabel->setText( tr("(Will print a total of %1 items on 1 page.)")
|
||||
.arg(mRenderer.nItems()) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
copiesDescriptionLabel->setText( tr("(Will print a total of %1 items on %2 pages.)")
|
||||
.arg(mRenderer.nItems()).arg(mRenderer.nPages()) );
|
||||
}
|
||||
|
||||
pageSpin->setRange( 1, mRenderer.nPages() );
|
||||
nPagesLabel->setText( QString::number( mRenderer.nPages() ) );
|
||||
|
||||
@@ -1921,6 +1921,14 @@
|
||||
<source>(Will print a total of %1 items on %2 pages.)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(Will print a total of 1 item on 1 page.)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(Will print a total of %1 items on 1 page.)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>glabels::PropertiesView</name>
|
||||
|
||||
Reference in New Issue
Block a user