Skip to content

Commit

Permalink
Added translation specialization for VHDL in the `trMemberFunctionDoc…
Browse files Browse the repository at this point in the history
…umentation()` method, (see method body with `OPTIMIZE_OUTPUT_VHDL` condition in the `translator_en.h` file).

This VHDL specialization string `Member Function/Procedure/Process Documentation` is based on the translation string in the `trFunctionAndProc()` method.

Added the possibility to translate the `flowchart: ` string in `htmldocvisitor.cpp` and todo remark describing this here was removed.

Appended translation section 1.9.6 to the `translator_en.h` file.
Flowchart string added as new method `trFlowchart()` to this section and string was changed to: `Flowchart: `.

Added `class TranslatorAdapter_1_9_5` to the file `translator_adapter.h`.
Changed dependency of up-to-date translations: `br`, `cz`, `nl`, `pt` to `TranslatorAdapter_1_9_5`.
  • Loading branch information
petyovsky committed Aug 30, 2022
1 parent 074296f commit c2ab72c
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/htmldocvisitor.cpp
Expand Up @@ -2026,7 +2026,7 @@ void HtmlDocVisitor::operator()(const DocVhdlFlow &vf)
forceEndParagraph(vf);
QCString fname=FlowChart::convertNameToFileName();
m_t << "<p>";
m_t << "flowchart: " ; // TODO: translate me
m_t << theTranslator->trFlowchart();
m_t << "<a href=\"";
m_t << fname;
m_t << ".svg\">";
Expand Down
7 changes: 6 additions & 1 deletion src/translator.h
@@ -1,4 +1,4 @@
/******************************************************************************
/******************************************************************************
*
*
*
Expand Down Expand Up @@ -720,6 +720,11 @@ class Translator
// new since 1.9.4
//////////////////////////////////////////////////////////////////////////
virtual QCString trPackageList() = 0;

//////////////////////////////////////////////////////////////////////////
// new since 1.9.6
//////////////////////////////////////////////////////////////////////////
virtual QCString trFlowchart() = 0;
};

#endif
12 changes: 11 additions & 1 deletion src/translator_adapter.h
Expand Up @@ -40,7 +40,17 @@ class TranslatorAdapterBase : public Translator

};

class TranslatorAdapter_1_9_4 : public TranslatorAdapterBase
class TranslatorAdapter_1_9_5 : public TranslatorAdapterBase
{
public:
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.9.5"); }

virtual QCString trFlowchart()
{ return english.trFlowchart(); }
};

class TranslatorAdapter_1_9_4 : public TranslatorAdapter_1_9_5
{
public:
virtual QCString updateNeededMessage()
Expand Down
2 changes: 1 addition & 1 deletion src/translator_br.h
Expand Up @@ -56,7 +56,7 @@
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H

class TranslatorBrazilian : public Translator
class TranslatorBrazilian : public TranslatorAdapter_1_9_5
{
public:

Expand Down
2 changes: 1 addition & 1 deletion src/translator_cz.h
Expand Up @@ -126,7 +126,7 @@
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
*/
class TranslatorCzech : public Translator
class TranslatorCzech : public TranslatorAdapter_1_9_5
{
public:

Expand Down
26 changes: 25 additions & 1 deletion src/translator_en.h
Expand Up @@ -107,7 +107,16 @@ class TranslatorEnglish : public Translator

/*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
{ return "Member Function Documentation"; }
{
if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
{
return "Member Function/Procedure/Process Documentation";
}
else
{
return "Member Function Documentation";
}
}

/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
Expand Down Expand Up @@ -2317,6 +2326,21 @@ class TranslatorEnglish : public Translator

virtual QCString trPackageList()
{ return "Package List"; }

//////////////////////////////////////////////////////////////////////////
// new since 1.9.6
//////////////////////////////////////////////////////////////////////////

/*! This is used for translation of the word that will be
* followed by a single name of the VHDL process flowchart.
*/
virtual QCString trFlowchart()
{ return "Flowchart: "; }

/*! Please translate also updated body of the method
* trMemberFunctionDocumentation(), now better adapted for
* VHDL sources documentation.
*/
};

#endif
2 changes: 1 addition & 1 deletion src/translator_nl.h
Expand Up @@ -18,7 +18,7 @@
#ifndef TRANSLATOR_NL_H
#define TRANSLATOR_NL_H

class TranslatorDutch : public Translator
class TranslatorDutch : public TranslatorAdapter_1_9_5
{
public:
QCString idLanguage()
Expand Down
2 changes: 1 addition & 1 deletion src/translator_pt.h
Expand Up @@ -67,7 +67,7 @@
#define TRANSLATOR_PT_H


class TranslatorPortuguese : public Translator
class TranslatorPortuguese : public TranslatorAdapter_1_9_5
{
public:

Expand Down

0 comments on commit c2ab72c

Please sign in to comment.