Commit eceb09c3 authored by Pino Toscano's avatar Pino Toscano

add more contexts in i18n calls

svn path=/trunk/KDE/kdegraphics/okular/; revision=855876
parent 085bdae8
...@@ -141,32 +141,32 @@ const Okular::DocumentInfo * DjVuGenerator::generateDocumentInfo() ...@@ -141,32 +141,32 @@ const Okular::DocumentInfo * DjVuGenerator::generateDocumentInfo()
{ {
// compile internal structure reading properties from KDjVu // compile internal structure reading properties from KDjVu
QString title = m_djvu->metaData( "title" ).toString(); QString title = m_djvu->metaData( "title" ).toString();
m_docInfo->set( Okular::DocumentInfo::Title, title.isEmpty() ? i18n( "Unknown" ) : title ); m_docInfo->set( Okular::DocumentInfo::Title, title.isEmpty() ? i18nc( "Unknown title", "Unknown" ) : title );
QString author = m_djvu->metaData( "author" ).toString(); QString author = m_djvu->metaData( "author" ).toString();
m_docInfo->set( Okular::DocumentInfo::Author, author.isEmpty() ? i18n( "Unknown" ) : author ); m_docInfo->set( Okular::DocumentInfo::Author, author.isEmpty() ? i18nc( "Unknown author", "Unknown" ) : author );
QString editor = m_djvu->metaData( "editor" ).toString(); QString editor = m_djvu->metaData( "editor" ).toString();
m_docInfo->set( "editor", editor.isEmpty() ? i18n( "Unknown" ) : editor, i18n( "Editor" ) ); m_docInfo->set( "editor", editor.isEmpty() ? i18nc( "Unknown editor", "Unknown" ) : editor, i18n( "Editor" ) );
QString publisher = m_djvu->metaData( "publisher" ).toString(); QString publisher = m_djvu->metaData( "publisher" ).toString();
m_docInfo->set( "publisher", publisher.isEmpty() ? i18n( "Unknown" ) : publisher, i18n( "Publisher" ) ); m_docInfo->set( "publisher", publisher.isEmpty() ? i18nc( "Unknown publisher", "Unknown" ) : publisher, i18n( "Publisher" ) );
QString year = m_djvu->metaData( "year" ).toString(); QString year = m_djvu->metaData( "year" ).toString();
m_docInfo->set( Okular::DocumentInfo::CreationDate, year.isEmpty() ? i18n( "Unknown" ) : year ); m_docInfo->set( Okular::DocumentInfo::CreationDate, year.isEmpty() ? i18nc( "Unknown creation date", "Unknown" ) : year );
QString volume = m_djvu->metaData( "volume" ).toString(); QString volume = m_djvu->metaData( "volume" ).toString();
m_docInfo->set( "volume", volume.isEmpty() ? i18n( "Unknown" ) : volume, i18n( "Volume" ) ); m_docInfo->set( "volume", volume.isEmpty() ? i18nc( "Unknown volume information", "Unknown" ) : volume, i18n( "Volume" ) );
QString doctype = m_djvu->metaData( "documentType" ).toString(); QString doctype = m_djvu->metaData( "documentType" ).toString();
m_docInfo->set( "documentType", doctype.isEmpty() ? i18n( "Unknown" ) : doctype, i18n( "Type of document" ) ); m_docInfo->set( "documentType", doctype.isEmpty() ? i18nc( "Unknown type of document", "Unknown" ) : doctype, i18n( "Type of document" ) );
QVariant numcomponents = m_djvu->metaData( "componentFile" ); QVariant numcomponents = m_djvu->metaData( "componentFile" );
m_docInfo->set( "componentFile", numcomponents.type() != QVariant::Int ? i18n( "Unknown" ) : numcomponents.toString(), i18n( "Component Files" ) ); m_docInfo->set( "componentFile", numcomponents.type() != QVariant::Int ? i18nc( "Unknown number of component files", "Unknown" ) : numcomponents.toString(), i18n( "Component Files" ) );
} }
else else
{ {
m_docInfo->set( Okular::DocumentInfo::Title, i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::Title, i18nc( "Unknown title", "Unknown" ) );
m_docInfo->set( Okular::DocumentInfo::Author, i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::Author, i18nc( "Unknown author", "Unknown" ) );
m_docInfo->set( "editor", i18n( "Unknown" ), i18n( "Editor" ) ); m_docInfo->set( "editor", i18nc( "Unknown editor", "Unknown" ), i18n( "Editor" ) );
m_docInfo->set( "publisher", i18n( "Unknown" ), i18n( "Publisher" ) ); m_docInfo->set( "publisher", i18nc( "Unknown publisher", "Unknown" ), i18n( "Publisher" ) );
m_docInfo->set( Okular::DocumentInfo::CreationDate, i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::CreationDate, i18nc( "Unknown creation date", "Unknown" ) );
m_docInfo->set( "volume", i18n( "Unknown" ), i18n( "Volume" ) ); m_docInfo->set( "volume", i18nc( "Unknown volume information", "Unknown" ), i18n( "Volume" ) );
m_docInfo->set( "documentType", i18n( "Unknown" ), i18n( "Type of document" ) ); m_docInfo->set( "documentType", i18nc( "Unknown type of document", "Unknown" ), i18n( "Type of document" ) );
m_docInfo->set( "componentFile", i18n( "Unknown" ), i18n( "Component Files" ) ); m_docInfo->set( "componentFile", i18nc( "Unknown number of component files", "Unknown" ), i18n( "Component Files" ) );
} }
return m_docInfo; return m_docInfo;
......
...@@ -338,24 +338,24 @@ const Okular::DocumentInfo * TIFFGenerator::generateDocumentInfo() ...@@ -338,24 +338,24 @@ const Okular::DocumentInfo * TIFFGenerator::generateDocumentInfo()
char* buffer = 0; char* buffer = 0;
TIFFGetField( d->tiff, TIFFTAG_IMAGEDESCRIPTION, &buffer ); TIFFGetField( d->tiff, TIFFTAG_IMAGEDESCRIPTION, &buffer );
m_docInfo->set( Okular::DocumentInfo::Description, buffer ? QString::fromLatin1( buffer ) : i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::Description, buffer ? QString::fromLatin1( buffer ) : i18nc( "Unknown description", "Unknown" ) );
buffer = 0; buffer = 0;
TIFFGetField( d->tiff, TIFFTAG_SOFTWARE, &buffer ); TIFFGetField( d->tiff, TIFFTAG_SOFTWARE, &buffer );
m_docInfo->set( Okular::DocumentInfo::Producer, buffer ? QString::fromLatin1( buffer ) : i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::Producer, buffer ? QString::fromLatin1( buffer ) : i18nc( "Unknown producer", "Unknown" ) );
buffer = 0; buffer = 0;
TIFFGetField( d->tiff, TIFFTAG_COPYRIGHT, &buffer ); TIFFGetField( d->tiff, TIFFTAG_COPYRIGHT, &buffer );
m_docInfo->set( Okular::DocumentInfo::Copyright, buffer ? QString::fromLatin1( buffer ) : i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::Copyright, buffer ? QString::fromLatin1( buffer ) : i18nc( "Unknown copyright statement", "Unknown" ) );
buffer = 0; buffer = 0;
TIFFGetField( d->tiff, TIFFTAG_ARTIST, &buffer ); TIFFGetField( d->tiff, TIFFTAG_ARTIST, &buffer );
m_docInfo->set( Okular::DocumentInfo::Author, buffer ? QString::fromLatin1( buffer ) : i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::Author, buffer ? QString::fromLatin1( buffer ) : i18nc( "Unknown author", "Unknown" ) );
buffer = 0; buffer = 0;
TIFFGetField( d->tiff, TIFFTAG_DATETIME, &buffer ); TIFFGetField( d->tiff, TIFFTAG_DATETIME, &buffer );
QDateTime date = convertTIFFDateTime( buffer ); QDateTime date = convertTIFFDateTime( buffer );
m_docInfo->set( Okular::DocumentInfo::CreationDate, date.isValid() ? KGlobal::locale()->formatDateTime( date, KLocale::LongDate, true ) : i18n( "Unknown" ) ); m_docInfo->set( Okular::DocumentInfo::CreationDate, date.isValid() ? KGlobal::locale()->formatDateTime( date, KLocale::LongDate, true ) : i18nc( "Unknown creation date", "Unknown" ) );
return m_docInfo; return m_docInfo;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment