mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
Fix typos found by codespell
This commit is contained in:
parent
f945e74f75
commit
5d5432dbad
|
@ -409,7 +409,7 @@ div.xdxf
|
|||
padding-left: 81px;
|
||||
}
|
||||
|
||||
.dsl_p, .dsl_p :not(a) /* DSL Feature: Enforce the style even if the childen tags say otherwise, except links */
|
||||
.dsl_p, .dsl_p :not(a) /* DSL Feature: Enforce the style even if the children tags say otherwise, except links */
|
||||
{
|
||||
color: green !important; /* DSL label color must have highest priority */
|
||||
font-style: italic;
|
||||
|
@ -453,7 +453,7 @@ div.xdxf
|
|||
.dsl_opt,
|
||||
.dsl_opt .dsl_ex,
|
||||
.dsl_opt .dsl_ex :not(a),
|
||||
.dsl_opt .dsl_ex font[color] /* DSL Feature: Enforce the optional zone color even if the childen tags say otherwise */
|
||||
.dsl_opt .dsl_ex font[color] /* DSL Feature: Enforce the optional zone color even if the children tags say otherwise */
|
||||
{
|
||||
color: gray;
|
||||
}
|
||||
|
|
|
@ -771,7 +771,7 @@ void ArticleRequest::bodyFinished()
|
|||
{
|
||||
// No definitions were ever found, say so to the user.
|
||||
|
||||
// Larger words are usually whole sentences - don't clutter the ouput
|
||||
// Larger words are usually whole sentences - don't clutter the output
|
||||
// with their full bodies.
|
||||
footer += ArticleMaker::makeNotFoundBody( word.size() < 40 ? word : "", group );
|
||||
|
||||
|
|
|
@ -1822,7 +1822,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
|
|||
allDictionaries[ x ]->getIcon(),
|
||||
QString::fromUtf8( allDictionaries[ x ]->getName().c_str() ),
|
||||
&menu );
|
||||
// Force icons in menu on all platfroms,
|
||||
// Force icons in menu on all platforms,
|
||||
// since without them it will be much harder
|
||||
// to find things.
|
||||
action->setIconVisibleInMenu( true );
|
||||
|
|
|
@ -13,7 +13,7 @@ class ArticleInspector;
|
|||
/// Currently the only added features:
|
||||
/// 1. Ability to know if the middle mouse button is pressed or not according
|
||||
/// to the view's current state. This is used to open links in new tabs when
|
||||
/// they are clicked with middle button. There's also an added posibility to
|
||||
/// they are clicked with middle button. There's also an added possibility to
|
||||
/// get double-click events after the fact with the doubleClicked() signal.
|
||||
/// 2. Manage our own QWebInspector instance. In order to show inspector correctly,
|
||||
/// use triggerPageAction( QWebPage::InspectElement ) instead.
|
||||
|
|
2
bgl.cc
2
bgl.cc
|
@ -1098,7 +1098,7 @@ sptr< Dictionary::DataRequest > BglDictionary::getResource( string const & name
|
|||
idxHeader.resourcesCount, name );
|
||||
}
|
||||
|
||||
/// Replaces <CHARSET c="t">1234;</CHARSET> occurences with ሴ
|
||||
/// Replaces <CHARSET c="t">1234;</CHARSET> occurrences with ሴ
|
||||
void BglDictionary::replaceCharsetEntities( string & text )
|
||||
{
|
||||
QString str = QString::fromUtf8( text.c_str() );
|
||||
|
|
|
@ -797,7 +797,7 @@ char const * BtreeIndex::findChainOffsetExactOrPrefix( wstring const & target,
|
|||
if ( wcharBuffer.size() <= wordSize )
|
||||
wcharBuffer.resize( wordSize + 1 );
|
||||
|
||||
//DPRINTF( "checking agaist word %s, left = %u\n", ptr, leafEntries );
|
||||
//DPRINTF( "checking against word %s, left = %u\n", ptr, leafEntries );
|
||||
|
||||
long result = Utf8::decode( ptr, wordSize, &wcharBuffer.front() );
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
QSet< QString > * headwords,
|
||||
QAtomicInt * isCancelled = 0 );
|
||||
|
||||
/// Retrieve headwords for presented article adresses
|
||||
/// Retrieve headwords for presented article addresses
|
||||
void getHeadwordsFromOffsets( QList< uint32_t > & offsets,
|
||||
QVector< QString > & headwords,
|
||||
QAtomicInt * isCancelled = 0 );
|
||||
|
|
|
@ -206,7 +206,7 @@ protected:
|
|||
vector< char > data;
|
||||
};
|
||||
|
||||
/// A helper class for syncronous word search implementations.
|
||||
/// A helper class for synchronous word search implementations.
|
||||
class WordSearchRequestInstant: public WordSearchRequest
|
||||
{
|
||||
public:
|
||||
|
@ -224,7 +224,7 @@ public:
|
|||
{ uncertain = value; }
|
||||
};
|
||||
|
||||
/// A helper class for syncronous data read implementations.
|
||||
/// A helper class for synchronous data read implementations.
|
||||
class DataRequestInstant: public DataRequest
|
||||
{
|
||||
public:
|
||||
|
@ -370,7 +370,7 @@ public:
|
|||
/// up alongside with it. Transliteration dictionaries implement this. The
|
||||
/// default implementation returns an empty list. Note that this function is
|
||||
/// supposed to be very fast and simple, and the results are thus returned
|
||||
/// syncronously.
|
||||
/// synchronously.
|
||||
virtual vector< wstring > getAlternateWritings( wstring const & )
|
||||
throw();
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ private:
|
|||
|
||||
void nextChar() THROW_SPEC( eot );
|
||||
|
||||
/// Infomation for diagnostic purposes
|
||||
/// Information for diagnostic purposes
|
||||
string dictionaryName;
|
||||
wstring headword;
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ void normalizeWhitespace( wstring & );
|
|||
|
||||
/// Same as apply( wstring ), but without any heap operations, therefore
|
||||
/// preferable when there're many strings to process. Returns -1 if the
|
||||
/// operation succeded, or otherwise the minimum value of outSize required
|
||||
/// operation succeeded, or otherwise the minimum value of outSize required
|
||||
/// to succeed.
|
||||
/// Currently commented out, consider implementing it in case indices'
|
||||
/// generation would be too slow.
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
/// An item in history
|
||||
struct Item
|
||||
{
|
||||
/// Group the search was perfomed in
|
||||
/// Group the search was performed in
|
||||
unsigned groupId;
|
||||
/// The word that was searched
|
||||
QString word;
|
||||
|
|
2
iconv.hh
2
iconv.hh
|
@ -20,7 +20,7 @@ public:
|
|||
DEF_EX_STR( exCantInit, "Can't initialize iconv conversion:", Ex )
|
||||
DEF_EX( exIncorrectSeq, "Invalid character sequence encountered during character conversion", Ex )
|
||||
DEF_EX( exPrematureEnd, "Character sequence ended prematurely during character conversion", Ex )
|
||||
DEF_EX_STR( exOther, "An error has occured during character conversion:", Ex )
|
||||
DEF_EX_STR( exOther, "An error has occurred during character conversion:", Ex )
|
||||
|
||||
// Some predefined character sets' names
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ void loadDictionaries( QWidget * parent, bool showInitially,
|
|||
|
||||
dictionaries = loadDicts.getDictionaries();
|
||||
|
||||
///// We create transliterations syncronously since they are very simple
|
||||
///// We create transliterations synchronously since they are very simple
|
||||
|
||||
#ifdef MAKE_CHINESE_CONVERSION_SUPPORT
|
||||
// Make Chinese conversion
|
||||
|
@ -325,7 +325,7 @@ void loadDictionaries( QWidget * parent, bool showInitially,
|
|||
dictionaries.insert( dictionaries.end(), dicts.begin(), dicts.end() );
|
||||
}
|
||||
|
||||
///// We create MediaWiki dicts syncronously, since they use netmgr
|
||||
///// We create MediaWiki dicts synchronously, since they use netmgr
|
||||
|
||||
{
|
||||
vector< sptr< Dictionary::Class > > dicts =
|
||||
|
@ -334,7 +334,7 @@ void loadDictionaries( QWidget * parent, bool showInitially,
|
|||
dictionaries.insert( dictionaries.end(), dicts.begin(), dicts.end() );
|
||||
}
|
||||
|
||||
///// WebSites are very simple, no need to create them asyncronously
|
||||
///// WebSites are very simple, no need to create them asynchronously
|
||||
{
|
||||
vector< sptr< Dictionary::Class > > dicts =
|
||||
WebSite::makeDictionaries( cfg.webSites, dictNetMgr );
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
std::vector< sptr< Dictionary::Class > > const & getDictionaries() const
|
||||
{ return dictionaries; }
|
||||
|
||||
/// Empty string means to exception occured
|
||||
/// Empty string means to exception occurred
|
||||
std::string const & getExceptionText() const
|
||||
{ return exceptionText; }
|
||||
|
||||
|
|
|
@ -3357,7 +3357,7 @@ static void filterAndCollectResources( QString & html, QRegExp & rx, const QStri
|
|||
|
||||
if ( resourceIncluded.insert( hash.result() ).second )
|
||||
{
|
||||
// Gather resouce information (url, filename) to be download later
|
||||
// Gather resource information (url, filename) to be download later
|
||||
downloadResources.push_back( pair<QUrl, QString>( url, folder + host + resourcePath ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ ChangeWindowMessageFilterExFunc changeWindowMessageFilterExFunc = NULL;
|
|||
QDir::toNativeSeparators( QDir( QCoreApplication::applicationDirPath() ).filePath( "GdTextOutHook.dll" ) ).toWCharArray( GlobalData->LibName );
|
||||
#endif
|
||||
|
||||
// Create the window to recive spying results to
|
||||
// Create the window to receive spying results to
|
||||
|
||||
WNDCLASSEX wcex;
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ Section "Uninstall"
|
|||
|
||||
StrCmp $2 "1" skip_cfg
|
||||
|
||||
MessageBox MB_YESNO "Delete all configuration data and index? This will save a lot of space, but at the expense of reconfiguring and reindexing everyting if GoldenDict is ever installed again." IDNO skip_cfg
|
||||
MessageBox MB_YESNO "Delete all configuration data and index? This will save a lot of space, but at the expense of reconfiguring and reindexing everything if GoldenDict is ever installed again." IDNO skip_cfg
|
||||
|
||||
RMDir /r $APPDATA\GoldenDict
|
||||
|
||||
|
|
|
@ -403,7 +403,7 @@ Section "Uninstall"
|
|||
|
||||
StrCmp $2 "1" skip_cfg
|
||||
|
||||
MessageBox MB_YESNO "Delete all configuration data and index? This will save a lot of space, but at the expense of reconfiguring and reindexing everyting if GoldenDict is ever installed again." IDNO skip_cfg
|
||||
MessageBox MB_YESNO "Delete all configuration data and index? This will save a lot of space, but at the expense of reconfiguring and reindexing everything if GoldenDict is ever installed again." IDNO skip_cfg
|
||||
|
||||
RMDir /r $APPDATA\GoldenDict
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ Sources::Sources( QWidget * parent, Config::Class const & cfg):
|
|||
Config::Transliteration const & trs = cfg.transliteration;
|
||||
Config::Forvo const & forvo = cfg.forvo;
|
||||
|
||||
// TODO: will programTypeEditorCreator and itemEditorFactory be destoryed by
|
||||
// TODO: will programTypeEditorCreator and itemEditorFactory be destroyed by
|
||||
// anyone?
|
||||
QItemEditorCreatorBase * programTypeEditorCreator =
|
||||
new QStandardItemEditorCreator< ProgramTypeEditor >();
|
||||
|
|
|
@ -162,7 +162,7 @@ inline HRESULT SpGetDescription(ISpObjectToken * pObjToken, WCHAR ** ppszDescrip
|
|||
{
|
||||
LONG lErrorCode = ERROR_SUCCESS;
|
||||
|
||||
pRegKeyPath = wcschr(pszTemp, L'\\'); // Find the first occurance of '\\' in the absolute registry key path
|
||||
pRegKeyPath = wcschr(pszTemp, L'\\'); // Find the first occurrence of '\\' in the absolute registry key path
|
||||
if(pRegKeyPath)
|
||||
{
|
||||
*pRegKeyPath = L'\0';
|
||||
|
|
|
@ -209,7 +209,7 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
/// Retrives the article's offset/size in .dict file, and its headword.
|
||||
/// Retrieves the article's offset/size in .dict file, and its headword.
|
||||
void getArticleProps( uint32_t articleAddress,
|
||||
string & headword,
|
||||
uint32_t & offset, uint32_t & size );
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <QRunnable>
|
||||
#include "dictionary.hh"
|
||||
|
||||
/// This component takes care of finding words. The search is asyncronous.
|
||||
/// This component takes care of finding words. The search is asynchronous.
|
||||
/// This means the GUI doesn't get blocked during the sometimes lenghtly
|
||||
/// process of finding words.
|
||||
class WordFinder: public QObject
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/// compatibility instead. It's stuck in the middle of nowhere, really.
|
||||
///
|
||||
/// The question is, what are we going to do with all this? When we do Unicode
|
||||
/// processing in GoldenDict, we want to use real Unicode charaters, not some
|
||||
/// processing in GoldenDict, we want to use real Unicode characters, not some
|
||||
/// UTF-16 encoded ones. To that end, we have two options under Windows: first,
|
||||
/// use QString, and second, use basic_string< unsigned int >.
|
||||
/// While we use QStrings for the GUI and other non-critical code, there is a
|
||||
|
|
|
@ -157,7 +157,7 @@ string convert( string const & in, DICT_TYPE type, map < string, string > const
|
|||
el.setAttribute( "class", "xdxf_ex_old" );
|
||||
}
|
||||
|
||||
nodes = dd.elementsByTagName( "mrkd" ); // marked out words in tranlations/examples of usage
|
||||
nodes = dd.elementsByTagName( "mrkd" ); // marked out words in translations/examples of usage
|
||||
|
||||
while( nodes.size() )
|
||||
{
|
||||
|
|
2
zim.cc
2
zim.cc
|
@ -831,7 +831,7 @@ string ZimDictionary::convert( const string & in )
|
|||
}
|
||||
#endif
|
||||
|
||||
// Occassionally words needs to be displayed in vertical, but <br/> were changed to <br\> somewhere
|
||||
// Occasionally words needs to be displayed in vertical, but <br/> were changed to <br\> somewhere
|
||||
// proper style: <a href="gdlookup://localhost/Neoptera" ... >N<br/>e<br/>o<br/>p<br/>t<br/>e<br/>r<br/>a</a>
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QRegularExpression rxBR( "(<a href=\"gdlookup://localhost/[^\"]*\"\\s*[^>]*>)\\s*((\\w\\s*<br(\\\\|/|)>\\s*)+\\w)\\s*</a>",
|
||||
|
|
Loading…
Reference in a new issue