Browse Source

refine English names of notebooks, folders

Le Tan 8 years ago
parent
commit
c8ec95eb3d
5 changed files with 43 additions and 42 deletions
  1. 1 1
      src/dialog/vdirinfodialog.cpp
  2. 1 0
      src/dialog/vnewdirdialog.cpp
  3. 29 29
      src/vdirectorytree.cpp
  4. 4 4
      src/vfilelist.cpp
  5. 8 8
      src/vmainwindow.cpp

+ 1 - 1
src/dialog/vdirinfodialog.cpp

@@ -18,7 +18,7 @@ void VDirInfoDialog::setupUI()
     if (!info.isEmpty()) {
         infoLabel = new QLabel(info);
     }
-    nameLabel = new QLabel(tr("Directory &name:"));
+    nameLabel = new QLabel(tr("Folder &name:"));
     nameEdit = new QLineEdit(defaultName);
     nameEdit->selectAll();
     nameLabel->setBuddy(nameEdit);

+ 1 - 0
src/dialog/vnewdirdialog.cpp

@@ -15,6 +15,7 @@ void VNewDirDialog::setupUI()
     QLabel *infoLabel = NULL;
     if (!info.isEmpty()) {
         infoLabel = new QLabel(info);
+        infoLabel->setWordWrap(true);
     }
 
     nameLabel = new QLabel(name);

+ 29 - 29
src/vdirectorytree.cpp

@@ -34,48 +34,48 @@ VDirectoryTree::VDirectoryTree(VNote *vnote, QWidget *parent)
 void VDirectoryTree::initActions()
 {
     newRootDirAct = new QAction(QIcon(":/resources/icons/create_rootdir.svg"),
-                                tr("New &Root Directory"), this);
-    newRootDirAct->setToolTip(tr("Create a new root directory in current notebook"));
+                                tr("New &Root Folder"), this);
+    newRootDirAct->setToolTip(tr("Create a new root folder in current notebook"));
     connect(newRootDirAct, &QAction::triggered,
             this, &VDirectoryTree::newRootDirectory);
 
-    newSubDirAct = new QAction(tr("&New Sub-Directory"), this);
-    newSubDirAct->setToolTip(tr("Create a new sub-directory"));
+    newSubDirAct = new QAction(tr("&New Subfolder"), this);
+    newSubDirAct->setToolTip(tr("Create a new subfolder"));
     connect(newSubDirAct, &QAction::triggered,
             this, &VDirectoryTree::newSubDirectory);
 
     deleteDirAct = new QAction(QIcon(":/resources/icons/delete_dir.svg"),
                                tr("&Delete"), this);
-    deleteDirAct->setToolTip(tr("Delete selected directory"));
+    deleteDirAct->setToolTip(tr("Delete selected folder"));
     connect(deleteDirAct, &QAction::triggered,
             this, &VDirectoryTree::deleteDirectory);
 
     dirInfoAct = new QAction(QIcon(":/resources/icons/dir_info.svg"),
                              tr("&Info"), this);
-    dirInfoAct->setToolTip(tr("View and edit current directory's information"));
+    dirInfoAct->setToolTip(tr("View and edit current folder's information"));
     connect(dirInfoAct, &QAction::triggered,
             this, &VDirectoryTree::editDirectoryInfo);
 
     copyAct = new QAction(QIcon(":/resources/icons/copy.svg"),
                           tr("&Copy"), this);
-    copyAct->setToolTip(tr("Copy selected directories"));
+    copyAct->setToolTip(tr("Copy selected folders"));
     connect(copyAct, &QAction::triggered,
             this, &VDirectoryTree::copySelectedDirectories);
 
     cutAct = new QAction(QIcon(":/resources/icons/cut.svg"),
                           tr("C&ut"), this);
-    cutAct->setToolTip(tr("Cut selected directories"));
+    cutAct->setToolTip(tr("Cut selected folders"));
     connect(cutAct, &QAction::triggered,
             this, &VDirectoryTree::cutSelectedDirectories);
 
     pasteAct = new QAction(QIcon(":/resources/icons/paste.svg"),
                           tr("&Paste"), this);
-    pasteAct->setToolTip(tr("Paste directories under this directory"));
+    pasteAct->setToolTip(tr("Paste folders in this folder"));
     connect(pasteAct, &QAction::triggered,
             this, &VDirectoryTree::pasteDirectoriesInCurDir);
 
-    m_openLocationAct = new QAction(tr("&Open Directory Location"), this);
-    m_openLocationAct->setToolTip(tr("Open the folder containing this directory in operating system"));
+    m_openLocationAct = new QAction(tr("&Open Folder Location"), this);
+    m_openLocationAct->setToolTip(tr("Open the folder containing this folder in operating system"));
     connect(m_openLocationAct, &QAction::triggered,
             this, &VDirectoryTree::openDirectoryLocation);
 }
@@ -164,7 +164,7 @@ void VDirectoryTree::updateDirectoryTreeOne(QTreeWidgetItem *p_parent, int depth
     VDirectory *dir = getVDirectory(p_parent);
     if (!dir->open()) {
         VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
-                            tr("Fail to open directory <span style=\"%1\">%2</span>.")
+                            tr("Fail to open folder <span style=\"%1\">%2</span>.")
                               .arg(vconfig.c_dataTextStyle).arg(dir->getName()), "",
                             QMessageBox::Ok, QMessageBox::Ok, this);
         return;
@@ -328,17 +328,17 @@ void VDirectoryTree::newSubDirectory()
     }
     VDirectory *curDir = getVDirectory(curItem);
 
-    QString info = tr("Create sub-directory under <span style=\"%1\">%2</span>.")
+    QString info = tr("Create a subfolder in <span style=\"%1\">%2</span>.")
                      .arg(vconfig.c_dataTextStyle).arg(curDir->getName());
-    QString text(tr("Directory &name:"));
-    QString defaultText("new_directory");
+    QString text(tr("Folder &name:"));
+    QString defaultText("new_folder");
 
     do {
-        VNewDirDialog dialog(tr("Create Directory"), info, text, defaultText, this);
+        VNewDirDialog dialog(tr("Create Folder"), info, text, defaultText, this);
         if (dialog.exec() == QDialog::Accepted) {
             QString name = dialog.getNameInput();
             if (curDir->findSubDirectory(name)) {
-                info = tr("Name already exists under <span style=\"%1\">%2</span>. Please choose another name.")
+                info = tr("Name already exists in <span style=\"%1\">%2</span>. Please choose another name.")
                          .arg(vconfig.c_dataTextStyle).arg(curDir->getName());
                 defaultText = name;
                 continue;
@@ -346,7 +346,7 @@ void VDirectoryTree::newSubDirectory()
             VDirectory *subDir = curDir->createSubDirectory(name);
             if (!subDir) {
                 VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
-                                    tr("Fail to create directory <span style=\"%1\">%2</span>.")
+                                    tr("Fail to create folder <span style=\"%1\">%2</span>.")
                                       .arg(vconfig.c_dataTextStyle).arg(name), "",
                                     QMessageBox::Ok, QMessageBox::Ok, this);
                 return;
@@ -363,13 +363,13 @@ void VDirectoryTree::newRootDirectory()
     if (!m_notebook) {
         return;
     }
-    QString info = tr("Create root directory in notebook <span style=\"%1\">%2</span>.")
+    QString info = tr("Create a root folder in notebook <span style=\"%1\">%2</span>.")
                      .arg(vconfig.c_dataTextStyle).arg(m_notebook->getName());
-    QString text(tr("Directory &name:"));
-    QString defaultText("new_directory");
+    QString text(tr("Folder &name:"));
+    QString defaultText("new_folder");
     VDirectory *rootDir = m_notebook->getRootDir();
     do {
-        VNewDirDialog dialog(tr("Create Root Directory"), info, text, defaultText, this);
+        VNewDirDialog dialog(tr("Create Root Folder"), info, text, defaultText, this);
         if (dialog.exec() == QDialog::Accepted) {
             QString name = dialog.getNameInput();
             if (rootDir->findSubDirectory(name)) {
@@ -381,7 +381,7 @@ void VDirectoryTree::newRootDirectory()
             VDirectory *subDir = rootDir->createSubDirectory(name);
             if (!subDir) {
                 VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
-                                    tr("Fail to create directory <span style=\"%1\">%2</span>.")
+                                    tr("Fail to create folder <span style=\"%1\">%2</span>.")
                                       .arg(vconfig.c_dataTextStyle).arg(name), "",
                                     QMessageBox::Ok, QMessageBox::Ok, this);
                 return;
@@ -401,7 +401,7 @@ void VDirectoryTree::deleteDirectory()
     }
     VDirectory *curDir = getVDirectory(curItem);
     int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
-                                  tr("Are you sure to delete directory <span style=\"%1\">%2</span>?")
+                                  tr("Are you sure to delete folder <span style=\"%1\">%2</span>?")
                                     .arg(vconfig.c_dataTextStyle).arg(curDir->getName()),
                                   tr("<span style=\"%1\">WARNING</span>: "
                                      "VNote will delete the whole directory (<b>ANY</b> files) "
@@ -445,7 +445,7 @@ void VDirectoryTree::editDirectoryInfo()
     QString defaultName = curName;
 
     do {
-        VDirInfoDialog dialog(tr("Directory Information"), info, defaultName, this);
+        VDirInfoDialog dialog(tr("Folder Information"), info, defaultName, this);
         if (dialog.exec() == QDialog::Accepted) {
             QString name = dialog.getNameInput();
             if (name == curName) {
@@ -458,7 +458,7 @@ void VDirectoryTree::editDirectoryInfo()
             }
             if (!curDir->rename(name)) {
                 VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
-                                    tr("Fail to rename directory <span style=\"%1\">%2</span>.")
+                                    tr("Fail to rename folder <span style=\"%1\">%2</span>.")
                                       .arg(vconfig.c_dataTextStyle).arg(curName), "",
                                     QMessageBox::Ok, QMessageBox::Ok, this);
                 return;
@@ -645,9 +645,9 @@ bool VDirectoryTree::copyDirectory(VDirectory *p_destDir, const QString &p_destN
         emit directoryUpdated(destDir);
     } else {
         VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
-                            tr("Fail to copy directory <span style=\"%1\">%2</span>.")
+                            tr("Fail to copy folder <span style=\"%1\">%2</span>.")
                               .arg(vconfig.c_dataTextStyle).arg(srcName),
-                            tr("Please check if there already exists a directory with the same name."),
+                            tr("Please check if there already exists a folder with the same name."),
                             QMessageBox::Ok, QMessageBox::Ok, this);
     }
 
@@ -693,7 +693,7 @@ QTreeWidgetItem *VDirectoryTree::findVDirectory(const VDirectory *p_dir, bool &p
 bool VDirectoryTree::locateDirectory(const VDirectory *p_directory)
 {
     if (p_directory) {
-        qDebug() << "locate directory" << p_directory->retrivePath()
+        qDebug() << "locate folder" << p_directory->retrivePath()
                  << "in" << m_notebook->getName();
         if (p_directory->getNotebook() != m_notebook) {
             return false;

+ 4 - 4
src/vfilelist.cpp

@@ -47,7 +47,7 @@ void VFileList::initActions()
 {
     newFileAct = new QAction(QIcon(":/resources/icons/create_note.svg"),
                              tr("&New Note"), this);
-    newFileAct->setToolTip(tr("Create a note in current directory"));
+    newFileAct->setToolTip(tr("Create a note in current folder"));
     connect(newFileAct, SIGNAL(triggered(bool)),
             this, SLOT(newFile()));
 
@@ -77,7 +77,7 @@ void VFileList::initActions()
 
     pasteAct = new QAction(QIcon(":/resources/icons/paste.svg"),
                           tr("&Paste"), this);
-    pasteAct->setToolTip(tr("Paste notes in current directory"));
+    pasteAct->setToolTip(tr("Paste notes in current folder"));
     connect(pasteAct, &QAction::triggered,
             this, &VFileList::pasteFilesInCurDir);
 
@@ -98,7 +98,7 @@ void VFileList::setDirectory(VDirectory *p_directory)
         return;
     }
 
-    qDebug() << "filelist set directory" << m_directory->getName();
+    qDebug() << "filelist set folder" << m_directory->getName();
     updateFileList();
 }
 
@@ -445,7 +445,7 @@ void VFileList::pasteFiles(VDirectory *p_destDir)
             VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
                                 tr("Fail to copy note <span style=\"%1\">%2</span>.")
                                   .arg(vconfig.c_dataTextStyle).arg(srcFile->getName()),
-                                tr("Please check if there already exists a file with the same name in the target directory."),
+                                tr("Please check if there already exists a file with the same name in the target folder."),
                                 QMessageBox::Ok, QMessageBox::Ok, this);
         }
     }

+ 8 - 8
src/vmainwindow.cpp

@@ -114,10 +114,10 @@ void VMainWindow::setupUI()
 
 QWidget *VMainWindow::setupDirectoryPanel()
 {
-    notebookLabel = new QLabel(tr("Notebook"));
+    notebookLabel = new QLabel(tr("Notebooks"));
     notebookLabel->setProperty("TitleLabel", true);
     notebookLabel->setProperty("NotebookPanel", true);
-    directoryLabel = new QLabel(tr("Directory"));
+    directoryLabel = new QLabel(tr("Folders"));
     directoryLabel->setProperty("TitleLabel", true);
     directoryLabel->setProperty("NotebookPanel", true);
 
@@ -165,13 +165,13 @@ void VMainWindow::initViewToolBar()
 
     QAction *onePanelViewAct = new QAction(QIcon(":/resources/icons/one_panel.svg"),
                                            tr("&Single Panel"), this);
-    onePanelViewAct->setStatusTip(tr("Display only the note list panel"));
+    onePanelViewAct->setStatusTip(tr("Display only the notes list panel"));
     connect(onePanelViewAct, &QAction::triggered,
             this, &VMainWindow::onePanelView);
 
     QAction *twoPanelViewAct = new QAction(QIcon(":/resources/icons/two_panels.svg"),
                                            tr("&Two Panels"), this);
-    twoPanelViewAct->setStatusTip(tr("Display both the directory and note list panel"));
+    twoPanelViewAct->setStatusTip(tr("Display both the folders and notes list panel"));
     connect(twoPanelViewAct, &QAction::triggered,
             this, &VMainWindow::twoPanelView);
 
@@ -198,14 +198,14 @@ void VMainWindow::initFileToolBar()
     fileToolBar->setMovable(false);
 
     newRootDirAct = new QAction(QIcon(":/resources/icons/create_rootdir_tb.svg"),
-                                tr("New &Root Directory"), this);
-    newRootDirAct->setStatusTip(tr("Create a root directory in current notebook"));
+                                tr("New &Root Folder"), this);
+    newRootDirAct->setStatusTip(tr("Create a root folder in current notebook"));
     connect(newRootDirAct, &QAction::triggered,
             directoryTree, &VDirectoryTree::newRootDirectory);
 
     newNoteAct = new QAction(QIcon(":/resources/icons/create_note_tb.svg"),
                              tr("New &Note"), this);
-    newNoteAct->setStatusTip(tr("Create a note in current directory"));
+    newNoteAct->setStatusTip(tr("Create a note in current folder"));
     newNoteAct->setShortcut(QKeySequence::New);
     connect(newNoteAct, &QAction::triggered,
             fileList, &VFileList::newFile);
@@ -445,7 +445,7 @@ void VMainWindow::initFileMenu()
     // Import notes from files.
     m_importNoteAct = new QAction(QIcon(":/resources/icons/import_note.svg"),
                                   tr("&Import Notes From Files"), this);
-    m_importNoteAct->setToolTip(tr("Import notes from files into current directory"));
+    m_importNoteAct->setToolTip(tr("Import notes from external files into current folder"));
     connect(m_importNoteAct, &QAction::triggered,
             this, &VMainWindow::importNoteFromFile);
     m_importNoteAct->setEnabled(false);