From: Frederik Gladhorn Date: Sun, 24 Feb 2008 13:17:39 +0000 (+0000) Subject: declination -> declension X-Git-Tag: v4.0.71~51 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=2a861d4826e2f15fe61105982d5f56ef9658976f;p=libqmvoc.git declination -> declension Better not use german grammar terms ;) Thank you very much for discovering this so early Yukiko! CCMAIL: ybando@k6.dion.ne.jp svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=778727 --- diff --git a/keduvocdocument/CMakeLists.txt b/keduvocdocument/CMakeLists.txt index 9d6695b..d3a2b87 100644 --- a/keduvocdocument/CMakeLists.txt +++ b/keduvocdocument/CMakeLists.txt @@ -13,7 +13,7 @@ keduvocdocument.cpp keduvocgrammar.cpp keduvocconjugation.cpp keduvocpersonalpronoun.cpp - keduvocdeclination.cpp + keduvocdeclension.cpp keduvocwordtype.cpp keduvockvtmlcompability.cpp keduvockvtmlreader.cpp diff --git a/keduvocdocument/keduvocdeclination.cpp b/keduvocdocument/keduvocdeclension.cpp similarity index 53% rename from keduvocdocument/keduvocdeclination.cpp rename to keduvocdocument/keduvocdeclension.cpp index c5df8a6..25b42d0 100644 --- a/keduvocdocument/keduvocdeclination.cpp +++ b/keduvocdocument/keduvocdeclension.cpp @@ -1,6 +1,6 @@ /*************************************************************************** - C++ Implementation: keduvocdeclination + C++ Implementation: keduvocdeclension ----------------------------------------------------------------------- @@ -20,60 +20,60 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include "keduvocdeclination.h" +#include "keduvocdeclension.h" #include -class KEduVocDeclination::Private +class KEduVocDeclension::Private { public: - QMap m_declinations; + QMap m_declensions; }; -KEduVocDeclination::KEduVocDeclination() +KEduVocDeclension::KEduVocDeclension() :d (new Private) { } -KEduVocDeclination::KEduVocDeclination(const KEduVocDeclination & other) +KEduVocDeclension::KEduVocDeclension(const KEduVocDeclension & other) :d (new Private) { - d->m_declinations = other.d->m_declinations; + d->m_declensions = other.d->m_declensions; } -KEduVocDeclination & KEduVocDeclination::operator =(const KEduVocDeclination & other) +KEduVocDeclension & KEduVocDeclension::operator =(const KEduVocDeclension & other) { - d->m_declinations = other.d->m_declinations; + d->m_declensions = other.d->m_declensions; return *this; } -KEduVocDeclination::~KEduVocDeclination() +KEduVocDeclension::~KEduVocDeclension() { delete d; } -QString KEduVocDeclination::declination(DeclinationNumber number, DeclinationCase decCase) +QString KEduVocDeclension::declension(DeclensionNumber number, DeclensionCase decCase) { - if ( d->m_declinations.contains(indexOf(number, decCase)) ) { - return d->m_declinations.value(indexOf(number, decCase)); + if ( d->m_declensions.contains(indexOf(number, decCase)) ) { + return d->m_declensions.value(indexOf(number, decCase)); } else { return QString(); } } -void KEduVocDeclination::setDeclination(const QString & declination, DeclinationNumber number, DeclinationCase decCase) +void KEduVocDeclension::setDeclension(const QString & declension, DeclensionNumber number, DeclensionCase decCase) { - d->m_declinations[indexOf(number, decCase)] = declination; + d->m_declensions[indexOf(number, decCase)] = declension; } -int KEduVocDeclination::indexOf(DeclinationNumber number, DeclinationCase decCase) +int KEduVocDeclension::indexOf(DeclensionNumber number, DeclensionCase decCase) { - return number * DeclinationCaseMAX + decCase; + return number * DeclensionCaseMAX + decCase; } -bool KEduVocDeclination::isEmpty() +bool KEduVocDeclension::isEmpty() { - return d->m_declinations.isEmpty(); + return d->m_declensions.isEmpty(); } diff --git a/keduvocdocument/keduvocdeclination.h b/keduvocdocument/keduvocdeclension.h similarity index 74% rename from keduvocdocument/keduvocdeclination.h rename to keduvocdocument/keduvocdeclension.h index 7252579..5669cc3 100644 --- a/keduvocdocument/keduvocdeclination.h +++ b/keduvocdocument/keduvocdeclension.h @@ -1,6 +1,6 @@ /*************************************************************************** - C++ Interface: keduvocdeclination + C++ Interface: keduvocdeclension ----------------------------------------------------------------------- @@ -26,19 +26,19 @@ #include /** -A declination contains all forms that a NOUN possibly can have. +A declension contains all forms that a NOUN possibly can have. @author Frederik Gladhorn */ -class KEduVocDeclination{ +class KEduVocDeclension{ public: - enum DeclinationNumber { + enum DeclensionNumber { Singular = 1, Dual, Plural }; - enum DeclinationCase { + enum DeclensionCase { Nominative = 1, Genitive, Dative, @@ -46,34 +46,34 @@ public: Ablative, Locative, Vocative, - DeclinationCaseMAX + DeclensionCaseMAX }; /** * The constructor without arguments */ - explicit KEduVocDeclination(); + explicit KEduVocDeclension(); /** copy constructor * @param other comparison object to copy */ - KEduVocDeclination( const KEduVocDeclination &other ); + KEduVocDeclension( const KEduVocDeclension &other ); - ~KEduVocDeclination(); + ~KEduVocDeclension(); /** equality operator * @param a object to compare to * @returns true if comparisons are the same, false otherwise */ // will probably not be necessary -// bool operator == ( const KEduVocDeclination& a ) const; +// bool operator == ( const KEduVocDeclension& a ) const; /** assignment operator for d-pointer copying * @param other object to copy from * @returns reference to this object */ - KEduVocDeclination& operator= ( const KEduVocDeclination& other ); + KEduVocDeclension& operator= ( const KEduVocDeclension& other ); /** * The grammatical number, there is singular and plural for english, some languages have dual for exactly two items. @@ -81,20 +81,20 @@ public: * @param decCase * @return */ - QString declination(DeclinationNumber number, DeclinationCase decCase); + QString declension(DeclensionNumber number, DeclensionCase decCase); /** - * Set a declination + * Set a declension * @param * @param number * @param decCase */ - void setDeclination(const QString& declination, DeclinationNumber number, DeclinationCase decCase); + void setDeclension(const QString& declension, DeclensionNumber number, DeclensionCase decCase); bool isEmpty(); private: - int indexOf(DeclinationNumber number, DeclinationCase decCase); + int indexOf(DeclensionNumber number, DeclensionCase decCase); class Private; Private * const d; diff --git a/keduvocdocument/keduvoctranslation.cpp b/keduvocdocument/keduvoctranslation.cpp index 155f9bb..6f34b57 100644 --- a/keduvocdocument/keduvoctranslation.cpp +++ b/keduvocdocument/keduvoctranslation.cpp @@ -21,7 +21,7 @@ #include -#include "keduvocdeclination.h" +#include "keduvocdeclension.h" #include "keduvocwordtype.h" class KEduVocTranslation::KEduVocTranslationPrivate @@ -65,7 +65,7 @@ public: QString m_comparative; QString m_superlative; - KEduVocDeclination* m_declination; + KEduVocDeclension* m_declension; /// One false friend string per other language QMap m_falseFriends; @@ -76,13 +76,13 @@ KEduVocTranslation::KEduVocTranslationPrivate::KEduVocTranslationPrivate(KEduVoc { m_entry = parent; m_wordType = 0; - m_declination = 0; + m_declension = 0; } KEduVocTranslation::KEduVocTranslationPrivate::~ KEduVocTranslationPrivate() { - delete m_declination; + delete m_declension; } KEduVocTranslation::KEduVocTranslation(KEduVocExpression* entry) : d( new KEduVocTranslationPrivate(entry) ) @@ -112,7 +112,7 @@ KEduVocTranslation::KEduVocTranslation( const KEduVocTranslation &other ) d->m_falseFriends = other.d->m_falseFriends; d->m_imageUrl = other.d->m_imageUrl; d->m_soundUrl = other.d->m_soundUrl; - /// @todo add declinations + /// @todo add declensions } KEduVocTranslation::~KEduVocTranslation() diff --git a/keduvocdocument/tests/keduvocdocumentvalidatortest.cpp b/keduvocdocument/tests/keduvocdocumentvalidatortest.cpp index 36d1c12..42b0c48 100644 --- a/keduvocdocument/tests/keduvocdocumentvalidatortest.cpp +++ b/keduvocdocument/tests/keduvocdocumentvalidatortest.cpp @@ -22,7 +22,7 @@ #include "keduvocexpression.h" #include "keduvoctranslation.h" #include "keduvocconjugation.h" -#include "keduvocdeclination.h" +#include "keduvocdeclension.h" #include "keduvocwordtype.h"