[Digikam-devel] i18nc vs i18n, possible patch for https://bugs.kde.org/show_bug.cgi?id=219430

Gilles Caulier caulier.gilles at gmail.com
Sun Jan 3 19:15:04 GMT 2010


yes, it's fine for me. lets go

Gilles Caulier

2010/1/3 Alexander Potashev <aspotashev at gmail.com>:
> Hi,
>
> This patch replaces a few "i18n"s and a "i18np" with "i18nc"s and a
> "i18ncp" to split translations of them.
>
> Shall I commit it?
>
>
>
>
> Index: digikam/contextmenuhelper.cpp
> ===================================================================
> --- digikam/contextmenuhelper.cpp       (revision 1069542)
> +++ digikam/contextmenuhelper.cpp       (working copy)
> @@ -633,8 +633,8 @@
>
>  void ContextMenuHelper::addActionItemDelete(QObject* recv, const char* slot, int quantity)
>  {
> -    QAction *trashAction = new QAction(SmallIcon("user-trash"), i18np("Move to Trash",
> -                                       "Move %1 Files to Trash", quantity), d->parent);
> +    QAction *trashAction = new QAction(SmallIcon("user-trash"), i18ncp("@action:inmenu Pluralized",
> +                                       "Move to Trash", "Move %1 Files to Trash", quantity), d->parent);
>     connect(trashAction, SIGNAL(triggered()),
>             recv, slot);
>     addAction(trashAction);
> Index: digikam/digikamapp.cpp
> ===================================================================
> --- digikam/digikamapp.cpp      (revision 1069542)
> +++ digikam/digikamapp.cpp      (working copy)
> @@ -848,7 +848,7 @@
>     // -----------------------------------------------------------
>
>     // Pop up dialog to ask user whether to move to trash
> -    d->imageDeleteAction = new KAction(KIcon("user-trash"), i18n("Move to Trash"), this);
> +    d->imageDeleteAction = new KAction(KIcon("user-trash"), i18nc("Non-pluralized", "Move to Trash"), this);
>     d->imageDeleteAction->setShortcut(KShortcut(Qt::Key_Delete));
>     connect(d->imageDeleteAction, SIGNAL(triggered()), d->view, SLOT(slotImageDelete()));
>     actionCollection()->addAction("image_delete", d->imageDeleteAction);
> Index: showfoto/showfoto.cpp
> ===================================================================
> --- showfoto/showfoto.cpp       (revision 1069542)
> +++ showfoto/showfoto.cpp       (working copy)
> @@ -544,7 +544,7 @@
>     if (d->deleteItem2Trash)
>     {
>         m_fileDeleteAction->setIcon(KIcon("user-trash"));
> -        m_fileDeleteAction->setText(i18n("Move to Trash"));
> +        m_fileDeleteAction->setText(i18nc("Non-pluralized", "Move to Trash"));
>     }
>     else
>     {
> Index: utilities/lighttable/lighttablepreview.cpp
> ===================================================================
> --- utilities/lighttable/lighttablepreview.cpp  (revision 1069542)
> +++ utilities/lighttable/lighttablepreview.cpp  (working copy)
> @@ -363,7 +363,7 @@
>     QAction *fitWindowAction = new QAction(SmallIcon("zoom-fit-best"), i18n("Fit to &Window"), this);
>     QAction *slideshowAction = new QAction(SmallIcon("view-presentation"), i18n("Slideshow"), this);
>     QAction *editAction      = new QAction(SmallIcon("editimage"), i18n("Edit..."), this);
> -    QAction *trashAction     = new QAction(SmallIcon("user-trash"), i18n("Move to Trash"), this);
> +    QAction *trashAction     = new QAction(SmallIcon("user-trash"), i18nc("Non-pluralized", "Move to Trash"), this);
>
>     // --------------------------------------------------------
>
> Index: utilities/lighttable/lighttablewindow.cpp
> ===================================================================
> --- utilities/lighttable/lighttablewindow.cpp   (revision 1069542)
> +++ utilities/lighttable/lighttablewindow.cpp   (working copy)
> @@ -449,7 +449,7 @@
>     connect(d->clearListAction, SIGNAL(triggered()), this, SLOT(slotClearItemsList()));
>     actionCollection()->addAction("lighttable_clearlist", d->clearListAction);
>
> -    d->fileDeleteAction = new KAction(KIcon("user-trash"), i18n("Move to Trash"), this);
> +    d->fileDeleteAction = new KAction(KIcon("user-trash"), i18nc("Non-pluralized", "Move to Trash"), this);
>     d->fileDeleteAction->setShortcut(KShortcut(Qt::Key_Delete));
>     d->fileDeleteAction->setEnabled(false);
>     connect(d->fileDeleteAction, SIGNAL(triggered()), this, SLOT(slotDeleteItem()));
> Index: utilities/imageeditor/editor/editorwindow.cpp
> ===================================================================
> --- utilities/imageeditor/editor/editorwindow.cpp       (revision 1069542)
> +++ utilities/imageeditor/editor/editorwindow.cpp       (working copy)
> @@ -339,7 +339,7 @@
>     connect(d->filePrintAction, SIGNAL(triggered()), this, SLOT(slotFilePrint()));
>     actionCollection()->addAction("editorwindow_print", d->filePrintAction);
>
> -    m_fileDeleteAction = new KAction(KIcon("user-trash"), i18n("Move to Trash"), this);
> +    m_fileDeleteAction = new KAction(KIcon("user-trash"), i18nc("Non-pluralized", "Move to Trash"), this);
>     m_fileDeleteAction->setShortcut(KShortcut(Qt::Key_Delete));
>     connect(m_fileDeleteAction, SIGNAL(triggered()), this, SLOT(slotDeleteCurrentItem()));
>     actionCollection()->addAction("editorwindow_delete", m_fileDeleteAction);
>
>
>
> --
> Alexander Potashev
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>



More information about the Digikam-devel mailing list