예제 #1
0
void CoreEditingPlugin::retranslateUi()
{
    // Retranslate our Edit menu

    retranslateMenu(mEditMenu, tr("&Edit"));

    // Retranslate our different Edit actions

    retranslateAction(mEditUndoAction, tr("&Undo"),
                      tr("Undo the last action"));
    retranslateAction(mEditRedoAction, tr("&Redo"),
                      tr("Redo the last action"));

    retranslateAction(mEditCutAction, tr("Cu&t"),
                      tr("Cut the selected object"));
    retranslateAction(mEditCopyAction, tr("&Copy"),
                      tr("Copy the selected object"));
    retranslateAction(mEditPasteAction, tr("&Paste"),
                      tr("Paste the contents of the clipboard"));
    retranslateAction(mEditDeleteAction, tr("&Delete"),
                      tr("Delete the selected object"));

    retranslateAction(mEditFindAction, tr("&Find..."),
                      tr("Search for a specific object"));
    retranslateAction(mEditFindNextAction, tr("Find &Next"),
                      tr("Search forwards for the same object"));
    retranslateAction(mEditPreviousAction, tr("Find Pre&vious"),
                      tr("Search backwards for the same object"));
    retranslateAction(mEditReplaceAction, tr("Re&place"),
                      tr("Search for a specific object and replace it with another"));

    retranslateAction(mEditSelectAllAction, tr("Select &All"),
                      tr("Select all the objects"));
}
예제 #2
0
void CoreEditingPlugin::retranslateUi()
{
    // Retranslate our different File|New action

    retranslateAction(mFileNewFileAction, tr("File"),
                      tr("Create a new file"));

    // Retranslate our Edit menu

    retranslateMenu(mEditMenu, tr("Edit"));

    // Unpopulate our Edit menu
    // Note #1: this is required on OS X otherwise we get several console
    //          messages that read
    //              void QCocoaMenu::insertNative(QCocoaMenuItem *, QCocoaMenuItem *) Menu item is already in a menu, remove it from the other menu first before inserting
    // Note #2: beforeAction is used to keep track of where our first action
    //          should really be. Indeed, on OS X, our Edit menu gets additional
    //          menu items (they are automatically added by OS X at the end of
    //          our Edit menu, should in the system locale), so we cannot just
    //          use mEditMenu->clear() to unpopulate our Edit menu since
    //          otherwise when repopulating it those extra menu items will end
    //          up before (rather than after) our menu items...

    QAction *beforeAction = mEditMenu->insertSeparator(mEditUndoAction);

    unpopulateEditMenu();

    // Retranslate our different Edit actions

    retranslateAction(mEditUndoAction, tr("Undo"),
                      tr("Undo the last action"));
    retranslateAction(mEditRedoAction, tr("Redo"),
                      tr("Redo the last action"));

    retranslateAction(mEditCutAction, tr("Cut"),
                      tr("Cut the selected text"));
    retranslateAction(mEditCopyAction, tr("Copy"),
                      tr("Copy the selected text to the clipboard"));
    retranslateAction(mEditPasteAction, tr("Paste"),
                      tr("Paste the contents of the clipboard"));
    retranslateAction(mEditDeleteAction, tr("Delete"),
                      tr("Delete the selected text"));

    retranslateAction(mEditFindReplaceAction, tr("Find/Replace..."),
                      tr("Search/replace a specific text"));
    retranslateAction(mEditFindNextAction, tr("Find Next"),
                      tr("Search forwards for the same text"));
    retranslateAction(mEditFindPreviousAction, tr("Find Previous"),
                      tr("Search backwards for the same text"));

    retranslateAction(mEditSelectAllAction, tr("Select All"),
                      tr("Select all the text"));

    // (Re)populate our Edit menu

    populateEditMenu(beforeAction);

    mEditMenu->removeAction(beforeAction);
}
예제 #3
0
void CorePlugin::retranslateUi()
{
    // Retranslate our different File actions

    retranslateAction(mFileOpenAction, tr("Open..."),
                      tr("Open a file"));
    retranslateAction(mFileOpenRemoteAction, tr("Open Remote..."),
                      tr("Open a remote file"));

    retranslateAction(mFileReloadAction, tr("Reload"),
                      tr("Reload the current file"));

    retranslateAction(mFileDuplicateAction, tr("Duplicate"),
                      tr("Duplicate the current file"));

    retranslateAction(mFileLockedAction, tr("Locked"),
                      tr("Toggle the locked state of the current file"));

    retranslateAction(mFileSaveAction, tr("Save"),
                      tr("Save the current file"));
    retranslateAction(mFileSaveAsAction, tr("Save As..."),
                      tr("Save the current file under a different name"));
    retranslateAction(mFileSaveAllAction, tr("Save All"),
                      tr("Save all the files"));

    retranslateAction(mFilePreviousAction, tr("Previous"),
                      tr("Select the previous file"));
    retranslateAction(mFileNextAction, tr("Next"),
                      tr("Select the next file"));

    retranslateAction(mFileCloseAction, tr("Close"),
                      tr("Close the current file"));
    retranslateAction(mFileCloseAllAction, tr("Close All"),
                      tr("Close all the files"));

    // Retranslate our File sub-menu and its action

    retranslateMenu(mFileReopenSubMenu, tr("Reopen"));

    retranslateAction(mFileReopenMostRecentFileAction, tr("Most Recent"),
                      tr("Reopen the most recently closed file"));
    retranslateAction(mFileClearReopenSubMenuAction, tr("Clear Menu"),
                      tr("Clear the menu"));

    // Retranslate our central widget

    mCentralWidget->retranslateUi();
}