Skip to content

Commit 3261e6f

Browse files
committed
issue #9713 Variables show in "Related Functions" section
Created new translation text for related symbols, by default the old text is used. (variables, typedefs and enums were already shown with the Related Functions header, so are now under the new header).
1 parent eba7dee commit 3261e6f

12 files changed

+88
-14
lines changed

src/context.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ class TranslateContext::Private
942942
}
943943
TemplateVariant related() const
944944
{
945-
return theTranslator->trRelatedFunctions();
945+
return theTranslator->trRelatedSymbols();
946946
}
947947
TemplateVariant macros() const
948948
{
@@ -2123,7 +2123,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
21232123
}
21242124
TemplateVariant createRelated() const
21252125
{
2126-
return createMemberList(MemberListType_related,theTranslator->trRelatedFunctions());
2126+
return createMemberList(MemberListType_related,theTranslator->trRelatedSymbols());
21272127
}
21282128
TemplateVariant createDetailedTypedefs() const
21292129
{
@@ -2151,7 +2151,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
21512151
}
21522152
TemplateVariant createDetailedRelated() const
21532153
{
2154-
return createMemberList(MemberListType_relatedMembers,theTranslator->trRelatedFunctionDocumentation());
2154+
return createMemberList(MemberListType_relatedMembers,theTranslator->trRelatedSymbolDocumentation());
21552155
}
21562156
TemplateVariant createDetailedVariables() const
21572157
{
@@ -2264,7 +2264,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
22642264
ctx->addMemberList(m_classDef,MemberListType_priStaticMethods,theTranslator->trStaticPrivateMembers());
22652265
ctx->addMemberList(m_classDef,MemberListType_priAttribs,theTranslator->trPrivateAttribs());
22662266
ctx->addMemberList(m_classDef,MemberListType_priStaticAttribs,theTranslator->trStaticPrivateAttribs());
2267-
ctx->addMemberList(m_classDef,MemberListType_related,theTranslator->trRelatedFunctions());
2267+
ctx->addMemberList(m_classDef,MemberListType_related,theTranslator->trRelatedSymbols());
22682268
return list;
22692269
}
22702270
void addMembers(MemberList &list,const ClassDef *cd,MemberListType lt) const

src/index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,7 @@ static const CmhlInfo *getCmhlInfo(size_t hl)
29582958
CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
29592959
CmhlInfo("functions_prop",theTranslator->trProperties()),
29602960
CmhlInfo("functions_evnt",theTranslator->trEvents()),
2961-
CmhlInfo("functions_rela",theTranslator->trRelatedFunctions())
2961+
CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
29622962
};
29632963
return &cmhlInfo[hl];
29642964
}

src/layout.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,8 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
947947
endCb()
948948
} },
949949
{ "class/memberdecl/related", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_related,
950-
[]() { return compileOptions(theTranslator->trRelatedFunctions()); },
951-
[]() { return compileOptions(theTranslator->trRelatedSubscript()); }),
950+
[]() { return compileOptions(theTranslator->trRelatedSymbols()); },
951+
[]() { return compileOptions(theTranslator->trRelatedSymbolsSubscript()); }),
952952
endCb()
953953
} },
954954
{ "class/memberdef", { startCb(&LayoutParser::startMemberDef),
@@ -986,7 +986,7 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
986986
endCb()
987987
} },
988988
{ "class/memberdef/related", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_relatedMembers,
989-
[]() { return compileOptions(theTranslator->trRelatedFunctionDocumentation()); }),
989+
[]() { return compileOptions(theTranslator->trRelatedSymbolDocumentation()); }),
990990
endCb()
991991
} },
992992
{ "class/memberdef/variables", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_variableMembers,

src/translator.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,13 @@ class Translator
727727
// new since 1.9.6
728728
//////////////////////////////////////////////////////////////////////////
729729
virtual QCString trFlowchart() = 0;
730+
731+
//////////////////////////////////////////////////////////////////////////
732+
// new since 1.9.7
733+
//////////////////////////////////////////////////////////////////////////
734+
virtual QCString trRelatedSymbols() = 0;
735+
virtual QCString trRelatedSymbolsSubscript() = 0;
736+
virtual QCString trRelatedSymbolDocumentation() = 0;
730737
};
731738

732739
#endif

src/translator_adapter.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,22 @@ class TranslatorAdapterBase : public Translator
4040

4141
};
4242

43-
class TranslatorAdapter_1_9_5 : public TranslatorAdapterBase
43+
class TranslatorAdapter_1_9_6 : public TranslatorAdapterBase
44+
{
45+
public:
46+
virtual QCString updateNeededMessage()
47+
{ return createUpdateNeededMessage(idLanguage(),"release 1.9.5"); }
48+
49+
/*! Small trick to use the original functions as the wording has been changed */
50+
virtual QCString trRelatedSymbols()
51+
{ return trRelatedFunctions(); }
52+
virtual QCString trRelatedSymbolsSubscript()
53+
{ return trRelatedSubscript(); }
54+
virtual QCString trRelatedSymbolDocumentation()
55+
{ return trRelatedFunctionDocumentation(); }
56+
};
57+
58+
class TranslatorAdapter_1_9_5 : public TranslatorAdapter_1_9_6
4459
{
4560
public:
4661
virtual QCString updateNeededMessage()

src/translator_br.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#ifndef TRANSLATOR_BR_H
5959
#define TRANSLATOR_BR_H
6060

61-
class TranslatorBrazilian : public Translator
61+
class TranslatorBrazilian : public TranslatorAdapter_1_9_6
6262
{
6363
public:
6464

src/translator_cz.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
Translator class (by the local maintainer) when the localized
130130
translator is made up-to-date again.
131131
*/
132-
class TranslatorCzech : public Translator
132+
class TranslatorCzech : public TranslatorAdapter_1_9_6
133133
{
134134
public:
135135

src/translator_en.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,6 +2349,32 @@ class TranslatorEnglish : public Translator
23492349
* trMemberFunctionDocumentation(), now better adapted for
23502350
* VHDL sources documentation.
23512351
*/
2352+
2353+
//////////////////////////////////////////////////////////////////////////
2354+
// new since 1.9.7
2355+
//////////////////////////////////////////////////////////////////////////
2356+
/*! used in the compound documentation before a list of related symbols.
2357+
*
2358+
* Supersedes trRelatedFunctions
2359+
*/
2360+
virtual QCString trRelatedSymbols()
2361+
{ return "Related Symbols"; }
2362+
2363+
/*! subscript for the related symbols
2364+
*
2365+
* Supersedes trRelatedSubscript
2366+
*/
2367+
virtual QCString trRelatedSymbolsSubscript()
2368+
{ return "(Note that these are not member symbols.)"; }
2369+
2370+
/*! used in the class documentation as a header before the list of all
2371+
* related classes.
2372+
*
2373+
* Supersedes trRelatedFunctionDocumentation
2374+
*/
2375+
virtual QCString trRelatedSymbolDocumentation()
2376+
{ return "Friends And Related Symbol Documentation"; }
2377+
23522378
};
23532379

23542380
#endif

src/translator_es.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Updated to 1.8.4 by Bartomeu Creus Navarro (17-julio-2013)
3232
* Updated to 1.9.6 by David H. Martín (28-diciembre-2022)
3333
*/
34-
class TranslatorSpanish : public Translator
34+
class TranslatorSpanish : public TranslatorAdapter_1_9_6
3535
{
3636
public:
3737

src/translator_nl.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,32 @@ class TranslatorDutch : public Translator
19001900
* VHDL sources documentation.
19011901
* Done.
19021902
*/
1903+
1904+
//////////////////////////////////////////////////////////////////////////
1905+
// new since 1.9.7
1906+
//////////////////////////////////////////////////////////////////////////
1907+
/*! used in the compound documentation before a list of related symbols.
1908+
*
1909+
* Supersedes trRelatedFunctions
1910+
*/
1911+
virtual QCString trRelatedSymbols()
1912+
{ return "Gerelateerde symbolen"; }
1913+
1914+
/*! subscript for the related symbols
1915+
*
1916+
* Supersedes trRelatedSubscript
1917+
*/
1918+
virtual QCString trRelatedSymbolsSubscript()
1919+
{ return "(Merk op dat dit geen member symbolen zijn.)"; }
1920+
1921+
/*! used in the class documentation as a header before the list of all
1922+
* related classes.
1923+
*
1924+
* Supersedes trRelatedFunctionDocumentation
1925+
*/
1926+
virtual QCString trRelatedSymbolDocumentation()
1927+
{ return "Documentatie van friends en gerelateerde symbolen"; }
1928+
19031929
};
19041930

19051931
#endif

0 commit comments

Comments
 (0)