]> Git trees. - libqmvoc.git/commitdiff
Some cleanup, spelling, i18nc++. Fix i18nc for lesson default name. Explicit for...
authorFrederik Gladhorn <gladhorn@kde.org>
Sun, 7 Oct 2007 21:14:26 +0000 (21:14 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Sun, 7 Oct 2007 21:14:26 +0000 (21:14 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=722670

keduvocdocument/keduvocexpression.h
keduvocdocument/keduvockvtmlcompability.cpp
keduvocdocument/keduvockvtmlcompability.h
keduvocdocument/keduvockvtmlreader.cpp
keduvocdocument/keduvoctranslation.h
keduvocdocument/keduvocwordtype.cpp
keduvocdocument/tests/loader.cpp

index 5520f25765c4f231ec2e606ace6eab107b8ef900..7f447f0160173fd3046847342701b2a69647c0f1 100644 (file)
@@ -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 );
 
index 4ff9d313e4691157fe3423660bda543c0f60dcb0..c1f8a84bb36f839c3b4fce29ae6f080acc776600 100644 (file)
@@ -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;
 }
index 861d92499a5d0ffeba31d5b3a26ec554fa4ecff7..fe42ab4d5e5245acbe247118cf67ec9156af2e9f 100644 (file)
  *                                                                         *
  ***************************************************************************/
 
-#ifndef KEDUVOCKVTML1COMPABILITY_P_H
-#define KEDUVOCKVTML1COMPABILITY_P_H
+#ifndef KEDUVOCKVTMLCOMPABILITY_H
+#define KEDUVOCKVTMLCOMPABILITY_H
 
+#include <KDE/KLocalizedString>
 #include <QtCore/QString>
 #include <QtCore/QMap>
 #include <QtCore/QSet>
 
-#include <KLocalizedString>
-
-
-
-
 
 // internal types, indented are subtypes
 
@@ -171,6 +167,4 @@ private:
     static const QString KVTML_1_SEPERATOR;
 };
 
-
-
-#endif // KEDUVOCKVTML1COMPABILITY_P_H
+#endif // KEDUVOCKVTMLCOMPABILITY_H
index cd10a82156c7e1974b502153fb3d98f873000d28..efd92b16ba2234089f7dbcb78737cdcb4e5f9020 100644 (file)
@@ -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"
index f70cfe7df3cfd278cb24bdca633e20b32b0ccdec..174e89bb38cefedb226eae8bdbae76effd0d6fbe 100644 (file)
@@ -21,7 +21,7 @@
 #include "keduvocgrammar.h"
 #include "keduvocconjugation.h"
 #include "keduvocmultiplechoice.h"
-#include <KUrl>
+#include <KDE/KUrl>
 #include <QtCore/QString>
 
 
@@ -211,7 +211,7 @@ public:
     QStringList conjugationTenses() const;
 
     /**
-     * Bad, only compability. Deprecated.
+     * Bad, only compatibility. Deprecated.
      * @return
      */
     QMap <QString, KEduVocConjugation> conjugations() const;
index 83eb50449f639e1243938a7c069604c685812d69..80854e9f7a2ce8a29df412b26089bac625e4805f 100644 (file)
 #include <KLocale>
 #include <kdebug.h>
 
-// #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:
index 3864d4bb5bdb4d9d12865a57d65194d0eb4668a1..4f18664fd0cc100fe907612503d72acfc80757f0 100644 (file)
@@ -1,7 +1,18 @@
+/***************************************************************************
+    Copyright 2002 Ewald Arnold <kvoctrain@ewald-arnold.de>
+    Copyright 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;
 }