From f46b023d1bfe8a857cdaa98e289998bcbfb5633a Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sat, 4 Mar 2017 14:28:09 +0800 Subject: [PATCH] refine more messages to use tr() --- src/dialog/vsettingsdialog.cpp | 4 +- src/translations/vnote_zh_CN.qm | Bin 15066 -> 18072 bytes src/translations/vnote_zh_CN.ts | 151 +++++++++++++++++++++++++++++++- src/vdirectory.cpp | 2 +- src/vdirectorytree.cpp | 28 +++--- src/vedittab.cpp | 6 +- src/vfilelist.cpp | 17 ++-- src/vmainwindow.cpp | 2 +- src/vnotebookselector.cpp | 4 +- 9 files changed, 181 insertions(+), 33 deletions(-) diff --git a/src/dialog/vsettingsdialog.cpp b/src/dialog/vsettingsdialog.cpp index c24ebf8e..bf609a91 100644 --- a/src/dialog/vsettingsdialog.cpp +++ b/src/dialog/vsettingsdialog.cpp @@ -38,7 +38,7 @@ void VSettingsDialog::loadConfiguration() return; err: VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to load configuration."), "", + tr("Fail to load configuration."), "", QMessageBox::Ok, QMessageBox::Ok, NULL); QMetaObject::invokeMethod(this, "reject", Qt::QueuedConnection); } @@ -57,7 +57,7 @@ void VSettingsDialog::saveConfiguration() return; err: VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to save configuration. Please try it again."), "", + tr("Fail to save configuration. Please try it again."), "", QMessageBox::Ok, QMessageBox::Ok, NULL); } diff --git a/src/translations/vnote_zh_CN.qm b/src/translations/vnote_zh_CN.qm index 6a5b7e54bfc551adb299a4f7e2af559b417cb7f7..252c9c08516195d66f14d032db92fb1a804efe92 100644 GIT binary patch delta 3845 zcmaJ?2~<;O7QP8tUUqgcC_a@ayDXvv(O4B~7lSN<6t_SgBsJtQNkFMfs?}PJ)aJZu z)v0!@yH-V0ox1kSjN;M})Y_go&N$j>nQ^Jsv5Fo$>fAq%XtY+(@q7t+|98Lp-S7VI zeB+81fjj>TbL`2VK3;aJPtPx>u03>NB!FZyh$b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tm`?wB$>s!slpgt2Es{ z5fZB(ON-<+P@+RBE4YnqH%pF3*Wl;jHU9hL*=)GqZ+JPO4g zN-vUUqQjSZvl@X7S^CeSow4=P_3J-0LAXZ>HOUJ3NQL^>diz_0us@W8s4@TZvVO~D z6yi5czpvVYXVRrV-8PCSDo5X+igQbyVcf1gSjGoK%vLjh@xq5Be+)$_XHt`lB^`IX(sxBiahN;VFUPsB{`8I#*% zp}=E><|<=qoQO_ijMH5qt@jFJ+PdG+;bG&9#_iaJjmBzbC;WVjb%~SFX`-<{?+Bz# zGd9~QkeJORiY7H~T$VokH02{b4WS?!N~sh~aRQNiU1M{k@-G<2KGDI*0n#_}ztU(~ z?R3a7!C7SF11{_3!>*yS{~%9Cl3NTbcbUJGPkCICOT5bELhnvT Directory &name: - 目录名 (&V): + 目录名 (&N): @@ -16,6 +16,11 @@ Warning 警告 + + + Fail to copy image %1. + 复制图片失败: %1。 + Please check if there already exists a file with the same name and then manually copy it. @@ -105,16 +110,63 @@ Warning 警告 + + + Fail to open notebook %1. + 打开笔记本失败: %1。 + + + + Fail to open directory %1. + 打开目录失败: %1。 + + + + Create sub-directory under %1. + 在目录 %1 中新建一个子目录。 + + + + + Directory &name: + 目录名 (&N): + Create Directory 新建目录 + + + Name already exists under %1. Please choose another name. + 该目录名已存在于目录 %1 中。请选择另一个名字。 + + + + + Fail to create directory %1. + 新建目录失败: %1。 + + + + Create root directory in notebook %1. + 在笔记本 %1 中新建根目录。 + Create Root Directory 新建根目录 + + + Name already exists in notebook %1. Please choose another name. + 该目录名已存在于笔记本 %1 中。请选择另一个名字。 + + + + Are you sure to delete directory %1? + 确认删除目录: %1? + This will delete any files under this directory. @@ -125,6 +177,21 @@ Directory Information 目录信息 + + + Fail to rename directory %1. + 重命名目录失败: %1。 + + + + Fail to copy directory %1. + 复制目录失败: %1。 + + + + Please check if there alread exists a directory with the same name. + 请检查目标文件夹中是否已经存在同名文件夹。 + VEditTab @@ -133,6 +200,11 @@ Information 信息 + + + Note %1 has been modified. + 笔记 %1 已被更改。 + Do you want to save your changes? @@ -150,6 +222,16 @@ Fail to save note. 保存笔记失败。 + + + %1 being written has been removed. + 要写入的文件已被删除: %1。 + + + + Fail to write to disk when saving a note. Please try it again. + 保存笔记时,写入文件失败。请稍后再试。 + VEditWindow @@ -279,18 +361,58 @@ Note Information 笔记信息 + + + Create a note in %1. + 在目录 %1 中新建一个笔记。 + + + + Note &name: + 笔记名 (&N): + + + + Create Note + 新建笔记 + + + + Name already exists. Please choose another name. + 该笔记本名已存在。请选择另一个名字。 + - + Warning 警告 + + + Fail to create note %1. + 新建笔记失败: %1。 + + Are you sure to delete note %1? + 确认删除笔记: %1? + + + This may be unrecoverable! 该操作不可撤消! + + + The renaming will change the note type. + 重命名会更改笔记类型。 + + + + You should close the note %1 before continue. + 请在继续前先关闭笔记: %1。 + VFindReplaceDialog @@ -720,6 +842,11 @@ Import Notes From File 导入文件 + + + Imported notes: %1 succeed, %2 failed. + 已导入笔记: %1 成功, %2 失败。 + Use system's background color configuration for Markdown rendering @@ -961,6 +1088,16 @@ Visit https://github.com/tamlok/vnote.git for more information. Warning 警告 + + + Are you sure to delete notebook %1? + 确认删除笔记本: %1? + + + + This will delete any files in this notebook (%1). + 该操作会删除该笔记本中的所有文件 (%1)。 + Notebook Information @@ -985,5 +1122,15 @@ Visit https://github.com/tamlok/vnote.git for more information. Warning 警告 + + + Fail to load configuration. + 读取配置失败。 + + + + Fail to save configuration. Please try it again. + 保存配置失败。请稍后再试。 + diff --git a/src/vdirectory.cpp b/src/vdirectory.cpp index 5059f6a5..09dd097f 100644 --- a/src/vdirectory.cpp +++ b/src/vdirectory.cpp @@ -522,7 +522,7 @@ VFile *VDirectory::copyFile(VDirectory *p_destDir, const QString &p_destName, nrPasted++; } else { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to copy image %1.").arg(images[i]), + tr("Fail to copy image %1.").arg(images[i]), tr("Please check if there already exists a file with the same name and then manually copy it."), QMessageBox::Ok, QMessageBox::Ok, NULL); } diff --git a/src/vdirectorytree.cpp b/src/vdirectorytree.cpp index 0cec293a..f39249fe 100644 --- a/src/vdirectorytree.cpp +++ b/src/vdirectorytree.cpp @@ -91,7 +91,7 @@ void VDirectoryTree::setNotebook(VNotebook *p_notebook) } if (!m_notebook->open()) { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to open notebook %1.").arg(m_notebook->getName()), "", + tr("Fail to open notebook %1.").arg(m_notebook->getName()), "", QMessageBox::Ok, QMessageBox::Ok, this); clear(); return; @@ -134,7 +134,7 @@ void VDirectoryTree::updateDirectoryTreeOne(QTreeWidgetItem *p_parent, int depth VDirectory *dir = getVDirectory(p_parent); if (!dir->open()) { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to open directory %1.").arg(dir->getName()), "", + tr("Fail to open directory %1.").arg(dir->getName()), "", QMessageBox::Ok, QMessageBox::Ok, this); return; } @@ -295,8 +295,8 @@ void VDirectoryTree::newSubDirectory() } VDirectory *curDir = getVDirectory(curItem); - QString info = QString("Create sub-directory under %1.").arg(curDir->getName()); - QString text("Directory &name:"); + QString info = tr("Create sub-directory under %1.").arg(curDir->getName()); + QString text(tr("Directory &name:")); QString defaultText("new_directory"); do { @@ -304,14 +304,14 @@ void VDirectoryTree::newSubDirectory() if (dialog.exec() == QDialog::Accepted) { QString name = dialog.getNameInput(); if (curDir->findSubDirectory(name)) { - info = QString("Name already exists under %1. Please choose another name.").arg(curDir->getName()); + info = tr("Name already exists under %1. Please choose another name.").arg(curDir->getName()); defaultText = name; continue; } VDirectory *subDir = curDir->createSubDirectory(name); if (!subDir) { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to create directory %1.").arg(name), "", + tr("Fail to create directory %1.").arg(name), "", QMessageBox::Ok, QMessageBox::Ok, this); return; } @@ -327,8 +327,8 @@ void VDirectoryTree::newRootDirectory() if (!m_notebook) { return; } - QString info = QString("Create root directory in notebook %1.").arg(m_notebook->getName()); - QString text("Directory &name:"); + QString info = tr("Create root directory in notebook %1.").arg(m_notebook->getName()); + QString text(tr("Directory &name:")); QString defaultText("new_directory"); VDirectory *rootDir = m_notebook->getRootDir(); do { @@ -336,14 +336,14 @@ void VDirectoryTree::newRootDirectory() if (dialog.exec() == QDialog::Accepted) { QString name = dialog.getNameInput(); if (rootDir->findSubDirectory(name)) { - info = QString("Name already exists in notebook %1. Please choose another name.").arg(m_notebook->getName()); + info = tr("Name already exists in notebook %1. Please choose another name.").arg(m_notebook->getName()); defaultText = name; continue; } VDirectory *subDir = rootDir->createSubDirectory(name); if (!subDir) { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to create directory %1.").arg(name), "", + tr("Fail to create directory %1.").arg(name), "", QMessageBox::Ok, QMessageBox::Ok, this); return; } @@ -362,7 +362,7 @@ void VDirectoryTree::deleteDirectory() } VDirectory *curDir = getVDirectory(curItem); int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Are you sure to delete directory %1?").arg(curDir->getName()), + tr("Are you sure to delete directory %1?").arg(curDir->getName()), tr("This will delete any files under this directory."), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this); if (ret == QMessageBox::Ok) { @@ -410,7 +410,7 @@ void VDirectoryTree::editDirectoryInfo() } if (!curDir->rename(name)) { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to rename directory %1.").arg(curName), "", + tr("Fail to rename directory %1.").arg(curName), "", QMessageBox::Ok, QMessageBox::Ok, this); return; } @@ -552,8 +552,8 @@ bool VDirectoryTree::copyDirectory(VDirectory *p_destDir, const QString &p_destN emit directoryUpdated(destDir); } else { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to copy directory %1.").arg(srcName), - QString("Please check if there alread exists a directory with the same name."), + tr("Fail to copy directory %1.").arg(srcName), + tr("Please check if there alread exists a directory with the same name."), QMessageBox::Ok, QMessageBox::Ok, this); } diff --git a/src/vedittab.cpp b/src/vedittab.cpp index 1ee11d2f..f2f8e426 100644 --- a/src/vedittab.cpp +++ b/src/vedittab.cpp @@ -206,7 +206,7 @@ void VEditTab::readFile() if (m_textEditor->isModified()) { // Prompt to save the changes int ret = VUtils::showMessage(QMessageBox::Information, tr("Information"), - QString("Note %1 has been modified.").arg(m_file->getName()), + tr("Note %1 has been modified.").arg(m_file->getName()), tr("Do you want to save your changes?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save, this); @@ -241,7 +241,7 @@ bool VEditTab::saveFile() if (!QFile(filePath).exists()) { qWarning() << filePath << "being written has been removed"; VUtils::showMessage(QMessageBox::Warning, tr("Warning"), tr("Fail to save note."), - QString("%1 being written has been removed.").arg(filePath), + tr("%1 being written has been removed.").arg(filePath), QMessageBox::Ok, QMessageBox::Ok, this); return false; } @@ -249,7 +249,7 @@ bool VEditTab::saveFile() ret = m_file->save(); if (!ret) { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), tr("Fail to save note."), - QString("Fail to write to disk when saving a note. Please try it again."), + tr("Fail to write to disk when saving a note. Please try it again."), QMessageBox::Ok, QMessageBox::Ok, this); m_textEditor->setModified(true); } diff --git a/src/vfilelist.cpp b/src/vfilelist.cpp index bb511254..0be3255e 100644 --- a/src/vfilelist.cpp +++ b/src/vfilelist.cpp @@ -173,22 +173,22 @@ void VFileList::newFile() if (!m_directory) { return; } - QString info = QString("Create a note under %1.").arg(m_directory->getName()); - QString text("&Note name:"); + QString info = tr("Create a note in %1.").arg(m_directory->getName()); + QString text(tr("Note &name:")); QString defaultText("new_note"); do { - VNewFileDialog dialog(QString("Create Note"), info, text, defaultText, this); + VNewFileDialog dialog(tr("Create Note"), info, text, defaultText, this); if (dialog.exec() == QDialog::Accepted) { QString name = dialog.getNameInput(); if (m_directory->findFile(name)) { - info = "Name already exists. Please choose another name."; + info = tr("Name already exists. Please choose another name."); defaultText = name; continue; } VFile *file = m_directory->createFile(name); if (!file) { VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Fail to create note %1.").arg(name), "", + tr("Fail to create note %1.").arg(name), "", QMessageBox::Ok, QMessageBox::Ok, this); return; } @@ -245,7 +245,8 @@ void VFileList::deleteFile(VFile *p_file) VDirectory *dir = p_file->getDirectory(); QString fileName = p_file->getName(); int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Are you sure to delete note %1?").arg(fileName), tr("This may be unrecoverable!"), + tr("Are you sure to delete note %1?").arg(fileName), + tr("This may be unrecoverable!"), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this); if (ret == QMessageBox::Ok) { editArea->closeFile(p_file, true); @@ -430,8 +431,8 @@ bool VFileList::copyFile(VDirectory *p_destDir, const QString &p_destName, VFile if (docType != newDocType) { if (editArea->isFileOpened(p_file)) { int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("The renaming will change the note type."), - QString("You should close the note %1 before continue.").arg(p_file->getName()), + tr("The renaming will change the note type."), + tr("You should close the note %1 before continue.").arg(p_file->getName()), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this); if (QMessageBox::Ok == ret) { if (!editArea->closeFile(p_file, false)) { diff --git a/src/vmainwindow.cpp b/src/vmainwindow.cpp index 49cf05ed..102735f5 100644 --- a/src/vmainwindow.cpp +++ b/src/vmainwindow.cpp @@ -540,7 +540,7 @@ void VMainWindow::importNoteFromFile() } } QMessageBox msgBox(QMessageBox::Information, tr("Import Notes From File"), - QString("Imported notes: %1 succeed, %2 failed.") + tr("Imported notes: %1 succeed, %2 failed.") .arg(files.size() - failedFiles.size()).arg(failedFiles.size()), QMessageBox::Ok, this); if (!failedFiles.isEmpty()) { diff --git a/src/vnotebookselector.cpp b/src/vnotebookselector.cpp index 93060a2b..46682e0f 100644 --- a/src/vnotebookselector.cpp +++ b/src/vnotebookselector.cpp @@ -213,8 +213,8 @@ void VNotebookSelector::deleteNotebook() QString curPath = notebook->getPath(); int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), - QString("Are you sure to delete notebook %1?").arg(curName), - QString("This will delete any files in this notebook (%1).").arg(curPath), + tr("Are you sure to delete notebook %1?").arg(curName), + tr("This will delete any files in this notebook (%1).").arg(curPath), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this); if (ret == QMessageBox::Ok) { m_editArea->closeFile(notebook, true);