From 589f14fa222b03cbfa0cb8982aa16794ed07757e Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Sun, 7 Oct 2007 21:14:26 +0000 Subject: [PATCH] Some cleanup, spelling, i18nc++. Fix i18nc for lesson default name. Explicit for KEduVocExpression( const QStringList & translations, int lesson = -1 ); svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=722670 --- keduvocdocument/keduvocexpression.h | 2 +- keduvocdocument/keduvockvtmlcompability.cpp | 94 ++++++++++----------- keduvocdocument/keduvockvtmlcompability.h | 14 +-- keduvocdocument/keduvockvtmlreader.cpp | 4 +- keduvocdocument/keduvoctranslation.h | 4 +- keduvocdocument/keduvocwordtype.cpp | 31 ------- keduvocdocument/tests/loader.cpp | 15 +++- 7 files changed, 68 insertions(+), 96 deletions(-) diff --git a/keduvocdocument/keduvocexpression.h b/keduvocdocument/keduvocexpression.h index 5520f25..7f447f0 100644 --- a/keduvocdocument/keduvocexpression.h +++ b/keduvocdocument/keduvocexpression.h @@ -51,7 +51,7 @@ public: * @param separator expression will be split into an original and one or more translations using separator * @param lesson lesson number, 0 for none */ - KEduVocExpression( const QStringList & translations, int lesson = -1 ); + explicit KEduVocExpression( const QStringList & translations, int lesson = -1 ); KEduVocExpression( const KEduVocExpression &expression ); diff --git a/keduvocdocument/keduvockvtmlcompability.cpp b/keduvocdocument/keduvockvtmlcompability.cpp index 4ff9d31..c1f8a84 100644 --- a/keduvocdocument/keduvockvtmlcompability.cpp +++ b/keduvocdocument/keduvockvtmlcompability.cpp @@ -54,53 +54,53 @@ QMap< QString, QString > KEduVocKvtmlCompability::usageMap() { QMap< QString, QString > usages; - usages["Am" ] = i18n( "Americanism" ); - usages["abbr" ] = i18n( "abbreviation" ); - usages["anat" ] = i18n( "anatomy" ); - usages["astr" ] = i18n( "astronomy" ); - usages["biol" ] = i18n( "biology" ); - usages["bs" ] = i18n( "bad sense" ); - usages["contp" ] = i18n( "contemptuously" ); - usages["eccl" ] = i18n( "ecclesiastical" ); - usages["fig" ] = i18n( "figuratively" ); - usages["geol" ] = i18n( "geology" ); - usages["hist" ] = i18n( "historical" ); - usages["icht" ] = i18n( "ichthyology" ); - usages["ifm" ] = i18n( "informal" ); - usages["iro" ] = i18n( "ironic" ); - usages["irr" ] = i18n( "irregular" ); - usages["lit" ] = i18n( "literary" ); - usages["metal" ] = i18n( "metallurgy" ); - usages["meteo" ] = i18n( "meteorology" ); - usages["miner" ] = i18n( "mineralogy" ); - usages["mot" ] = i18n( "motoring" ); - usages["mount" ] = i18n( "mountaineering" ); - usages["myth" ] = i18n( "mythology" ); - usages["npr" ] = i18n( "proper name" ); - usages["opt" ] = i18n( "optics" ); - usages["orn" ] = i18n( "ornithology" ); - usages["os" ] = i18n( "oneself" ); - usages["p" ] = i18n( "person" ); - usages["parl" ] = i18n( "parliamentary" ); - usages["pharm" ] = i18n( "pharmacy" ); - usages["phls" ] = i18n( "philosophy" ); - usages["phot" ] = i18n( "photography" ); - usages["phys" ] = i18n( "physics" ); - usages["physio"] = i18n( "physiology" ); - usages["pl" ] = i18n( "plural" ); - usages["poet" ] = i18n( "poetry" ); - usages["pol" ] = i18n( "politics" ); - usages["prov" ] = i18n( "provincialism" ); - usages["psych" ] = i18n( "psychology" ); - usages["rhet" ] = i18n( "rhetoric" ); - usages["surv" ] = i18n( "surveying" ); - usages["telg" ] = i18n( "telegraphy" ); - usages["telph" ] = i18n( "telephony" ); - usages["thea" ] = i18n( "theater" ); - usages["typo" ] = i18n( "typography" ); - usages["univ" ] = i18n( "university" ); - usages["vet" ] = i18n( "veterinary medicine" ); - usages["zoo" ] = i18n( "zoology" ); + usages["Am" ] = i18nc("usage label - context in which a word is used", "Americanism" ); + usages["abbr" ] = i18nc("usage label - context in which a word is used", "abbreviation" ); + usages["anat" ] = i18nc("usage label - context in which a word is used", "anatomy" ); + usages["astr" ] = i18nc("usage label - context in which a word is used", "astronomy" ); + usages["biol" ] = i18nc("usage label - context in which a word is used", "biology" ); + usages["bs" ] = i18nc("usage label - context in which a word is used", "bad sense" ); + usages["contp" ] = i18nc("usage label - context in which a word is used", "contemptuously" ); + usages["eccl" ] = i18nc("usage label - context in which a word is used", "ecclesiastical" ); + usages["fig" ] = i18nc("usage label - context in which a word is used", "figuratively" ); + usages["geol" ] = i18nc("usage label - context in which a word is used", "geology" ); + usages["hist" ] = i18nc("usage label - context in which a word is used", "historical" ); + usages["icht" ] = i18nc("usage label - context in which a word is used", "ichthyology" ); + usages["ifm" ] = i18nc("usage label - context in which a word is used", "informal" ); + usages["iro" ] = i18nc("usage label - context in which a word is used", "ironic" ); + usages["irr" ] = i18nc("usage label - context in which a word is used", "irregular" ); + usages["lit" ] = i18nc("usage label - context in which a word is used", "literary" ); + usages["metal" ] = i18nc("usage label - context in which a word is used", "metallurgy" ); + usages["meteo" ] = i18nc("usage label - context in which a word is used", "meteorology" ); + usages["miner" ] = i18nc("usage label - context in which a word is used", "mineralogy" ); + usages["mot" ] = i18nc("usage label - context in which a word is used", "motoring" ); + usages["mount" ] = i18nc("usage label - context in which a word is used", "mountaineering" ); + usages["myth" ] = i18nc("usage label - context in which a word is used", "mythology" ); + usages["npr" ] = i18nc("usage label - context in which a word is used", "proper name" ); + usages["opt" ] = i18nc("usage label - context in which a word is used", "optics" ); + usages["orn" ] = i18nc("usage label - context in which a word is used", "ornithology" ); + usages["os" ] = i18nc("usage label - context in which a word is used", "oneself" ); + usages["p" ] = i18nc("usage label - context in which a word is used", "person" ); + usages["parl" ] = i18nc("usage label - context in which a word is used", "parliamentary" ); + usages["pharm" ] = i18nc("usage label - context in which a word is used", "pharmacy" ); + usages["phls" ] = i18nc("usage label - context in which a word is used", "philosophy" ); + usages["phot" ] = i18nc("usage label - context in which a word is used", "photography" ); + usages["phys" ] = i18nc("usage label - context in which a word is used", "physics" ); + usages["physio"] = i18nc("usage label - context in which a word is used", "physiology" ); + usages["pl" ] = i18nc("usage label - context in which a word is used", "plural" ); + usages["poet" ] = i18nc("usage label - context in which a word is used", "poetry" ); + usages["pol" ] = i18nc("usage label - context in which a word is used", "politics" ); + usages["prov" ] = i18nc("usage label - context in which a word is used", "provincialism" ); + usages["psych" ] = i18nc("usage label - context in which a word is used", "psychology" ); + usages["rhet" ] = i18nc("usage label - context in which a word is used", "rhetoric" ); + usages["surv" ] = i18nc("usage label - context in which a word is used", "surveying" ); + usages["telg" ] = i18nc("usage label - context in which a word is used", "telegraphy" ); + usages["telph" ] = i18nc("usage label - context in which a word is used", "telephony" ); + usages["thea" ] = i18nc("usage label - context in which a word is used", "theater" ); + usages["typo" ] = i18nc("usage label - context in which a word is used", "typography" ); + usages["univ" ] = i18nc("usage label - context in which a word is used", "university" ); + usages["vet" ] = i18nc("usage label - context in which a word is used", "veterinary medicine" ); + usages["zoo" ] = i18nc("usage label - context in which a word is used", "zoology" ); return usages; } diff --git a/keduvocdocument/keduvockvtmlcompability.h b/keduvocdocument/keduvockvtmlcompability.h index 861d924..fe42ab4 100644 --- a/keduvocdocument/keduvockvtmlcompability.h +++ b/keduvocdocument/keduvockvtmlcompability.h @@ -21,18 +21,14 @@ * * ***************************************************************************/ -#ifndef KEDUVOCKVTML1COMPABILITY_P_H -#define KEDUVOCKVTML1COMPABILITY_P_H +#ifndef KEDUVOCKVTMLCOMPABILITY_H +#define KEDUVOCKVTMLCOMPABILITY_H +#include #include #include #include -#include - - - - // internal types, indented are subtypes @@ -171,6 +167,4 @@ private: static const QString KVTML_1_SEPERATOR; }; - - -#endif // KEDUVOCKVTML1COMPABILITY_P_H +#endif // KEDUVOCKVTMLCOMPABILITY_H diff --git a/keduvocdocument/keduvockvtmlreader.cpp b/keduvocdocument/keduvockvtmlreader.cpp index cd10a82..efd92b1 100644 --- a/keduvocdocument/keduvockvtmlreader.cpp +++ b/keduvocdocument/keduvockvtmlreader.cpp @@ -1024,7 +1024,7 @@ bool KEduVocKvtmlReader::readExpression( QDomElement &domElementParent ) // it's from a lesson that hasn't been added yet // so make sure this lesson is in the document kDebug() << "Warning: lesson > m_doc->lessonCount() in readExpression."; - m_doc->appendLesson( i18nc("A generic name for a new lesson and its number.", "Lesson %1" ), lesson ); + m_doc->appendLesson( i18nc("A generic name for a new lesson and its number.", "Lesson %1", lesson )); } } @@ -1237,6 +1237,4 @@ bool KEduVocKvtmlReader::addLanguage( int languageId, const QString& locale) } - - #include "keduvockvtmlreader.moc" diff --git a/keduvocdocument/keduvoctranslation.h b/keduvocdocument/keduvoctranslation.h index f70cfe7..174e89b 100644 --- a/keduvocdocument/keduvoctranslation.h +++ b/keduvocdocument/keduvoctranslation.h @@ -21,7 +21,7 @@ #include "keduvocgrammar.h" #include "keduvocconjugation.h" #include "keduvocmultiplechoice.h" -#include +#include #include @@ -211,7 +211,7 @@ public: QStringList conjugationTenses() const; /** - * Bad, only compability. Deprecated. + * Bad, only compatibility. Deprecated. * @return */ QMap conjugations() const; diff --git a/keduvocdocument/keduvocwordtype.cpp b/keduvocdocument/keduvocwordtype.cpp index 83eb504..80854e9 100644 --- a/keduvocdocument/keduvocwordtype.cpp +++ b/keduvocdocument/keduvocwordtype.cpp @@ -26,37 +26,6 @@ #include #include -// #define QM_VERB "v" // go -// #define QM_VERB_IRR "ir" -// #define QM_VERB_REG "re" -// #define QM_NOUN "n" // table, coffee -// #define QM_NOUN_F "f" -// #define QM_NOUN_M "m" -// #define QM_NOUN_S "s" -// #define QM_NAME "nm" -// #define QM_ART "ar" // article -// #define QM_ART_DEF "def" // definite a/an -// #define QM_ART_IND "ind" // indefinite the -// #define QM_ADJ "aj" // adjective expensive, good -// #define QM_ADV "av" // adverb today, strongly -// #define QM_PRON "pr" // pronoun you, she -// #define QM_PRON_POS "pos" // possessive my, your -// #define QM_PRON_PER "per" // personal -// #define QM_PHRASE "ph" -// #define QM_NUM "num" // numeral -// #define QM_NUM_ORD "ord" // ordinal first, second -// #define QM_NUM_CARD "crd" // cardinal one, two -// #define QM_INFORMAL "ifm" -// #define QM_FIG "fig" -// #define QM_CON "con" // conjuncton and, but -// #define QM_PREP "pre" // preposition behind, between -// #define QM_QUEST "qu" // question who, what - -// type delimiters - -// #define QM_USER_TYPE "#" // designates number of user type -// #define QM_TYPE_DIV ":" // divide main from subtype - class KEduVocWordType::Private { public: diff --git a/keduvocdocument/tests/loader.cpp b/keduvocdocument/tests/loader.cpp index 3864d4b..4f18664 100644 --- a/keduvocdocument/tests/loader.cpp +++ b/keduvocdocument/tests/loader.cpp @@ -1,7 +1,18 @@ +/*************************************************************************** + Copyright 2002 Ewald Arnold + Copyright 2007 Frederik Gladhorn + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ int main( void ) { - - return 0; } -- 2.47.3