Skip to content

Commit 8e0e2cc

Browse files
committed
Moving punctuation dependency to translator
The translator.py script is very sensitive regarding the layout and content of the translator.h file and the tests performed (regarding tests on functions with prototypes).
1 parent 29de244 commit 8e0e2cc

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

doc/translator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,8 @@ def __collectPublicMethodPrototypes(self, tokenIterator):
880880
prototype=="virtual QCString latexDocumentPre()" or
881881
prototype=="virtual QCString latexCommandName()" or
882882
prototype=="virtual QCString latexFont()" or
883-
prototype=="virtual QCString latexFontenc()")):
883+
prototype=="virtual QCString latexFontenc()" or
884+
prototype=="virtual bool needsPunctuation()")):
884885
self.prototypeDic[uniPrototype] = prototype
885886
status = 2 # body consumed
886887
methodId = None # outside of any method

src/translator.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ class Translator
142142
*/
143143
virtual QCString getLanguageString() = 0;
144144

145-
/** add punctuation at the end of a brief description when needed and supported by the language */
146-
virtual inline bool needsPunctuation() {return true;}
145+
/**
146+
* add punctuation at the end of a brief description when needed and supported by the language
147+
*/
148+
virtual bool needsPunctuation() { return true; }
147149

148150
// --- Language translation methods -------------------
149151

src/translator_cn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class TranslatorChinese : public Translator
7575
{
7676
return "\\end{CJK}\n";
7777
}
78-
virtual inline bool needsPunctuation()
78+
virtual bool needsPunctuation()
7979
{
8080
return false;
8181
}

src/translator_jp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
9999
{
100100
return "\\end{CJK}\n";
101101
}
102-
virtual inline bool needsPunctuation()
102+
virtual bool needsPunctuation()
103103
{
104104
return false;
105105
}

src/translator_kr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
102102
{
103103
return "0x412 Korean";
104104
}
105-
virtual inline bool needsPunctuation()
105+
virtual bool needsPunctuation()
106106
{
107107
return false;
108108
}

0 commit comments

Comments
 (0)