Skip to content

Commit 0da84b7

Browse files
committed
translate chinese upto version 1.9.2
C++20 had well translated to Chinese, I think it's time to support it in doxygen.
1 parent 4a722f3 commit 0da84b7

File tree

1 file changed

+277
-2
lines changed

1 file changed

+277
-2
lines changed

src/translator_cn.h

Lines changed: 277 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
#define CN_SPC " "
2626

27-
class TranslatorChinese : public TranslatorAdapter_1_8_15
27+
class TranslatorChinese : public TranslatorAdapter_1_9_2
2828
{
2929
public:
3030
/*! Used for identification of the language. The identification
@@ -65,7 +65,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
6565
}
6666
virtual QCString latexDocumentPre()
6767
{
68-
return "\\begin{CJK}{UTF8}{min}\n";
68+
return "\\begin{CJK}{UTF8}{gbsn}\n";
6969
}
7070
virtual QCString latexDocumentPost()
7171
{
@@ -1916,6 +1916,281 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
19161916
return "该单例的文档由下列文件生成:";
19171917
}
19181918

1919+
//////////////////////////////////////////////////////////////////////////
1920+
// new since 1.8.15
1921+
//////////////////////////////////////////////////////////////////////////
1922+
1923+
/** VHDL design unit hierarchy */
1924+
virtual QCString trDesignUnitHierarchy()
1925+
{ return "设计单元层次结构"; }
1926+
/** VHDL design unit list */
1927+
virtual QCString trDesignUnitList()
1928+
{ return "设计单元列表"; }
1929+
/** VHDL design unit members */
1930+
virtual QCString trDesignUnitMembers()
1931+
{ return "设计单元成员"; }
1932+
/** VHDL design unit list description */
1933+
virtual QCString trDesignUnitListDescription()
1934+
{
1935+
return "这是所有设计单元成员的列表,以及指向他们所属实体的链接:";
1936+
}
1937+
/** VHDL design unit index */
1938+
virtual QCString trDesignUnitIndex()
1939+
{ return "设计单元索引"; }
1940+
/** VHDL design units */
1941+
virtual QCString trDesignUnits()
1942+
{ return "设计单元"; }
1943+
/** VHDL functions/procedures/processes */
1944+
virtual QCString trFunctionAndProc()
1945+
{ return "函数/调用过程/进程语句"; }
1946+
/** VHDL type */
1947+
virtual QCString trVhdlType(uint64 type,bool single)
1948+
{
1949+
switch(type)
1950+
{
1951+
case VhdlDocGen::LIBRARY:
1952+
return "";
1953+
case VhdlDocGen::PACKAGE:
1954+
return "";
1955+
case VhdlDocGen::SIGNAL:
1956+
return "信号";
1957+
case VhdlDocGen::COMPONENT:
1958+
return "元件";
1959+
case VhdlDocGen::CONSTANT:
1960+
return "常量";
1961+
case VhdlDocGen::ENTITY:
1962+
return "实体";
1963+
case VhdlDocGen::TYPE:
1964+
return "类型";
1965+
case VhdlDocGen::SUBTYPE:
1966+
return "子类型";
1967+
case VhdlDocGen::FUNCTION:
1968+
return "函数";
1969+
case VhdlDocGen::RECORD:
1970+
return "记录";
1971+
case VhdlDocGen::PROCEDURE:
1972+
return "过程";
1973+
case VhdlDocGen::ARCHITECTURE:
1974+
return "结构体";
1975+
case VhdlDocGen::ATTRIBUTE:
1976+
return "属性";
1977+
case VhdlDocGen::PROCESS:
1978+
return "进程语句";
1979+
case VhdlDocGen::PORT:
1980+
return "端口";
1981+
case VhdlDocGen::USE:
1982+
if (single) return "使用语句";
1983+
else return "使用语句";
1984+
case VhdlDocGen::GENERIC:
1985+
return "类属";
1986+
case VhdlDocGen::PACKAGE_BODY:
1987+
return "包体";
1988+
case VhdlDocGen::UNITS:
1989+
return "单元";
1990+
case VhdlDocGen::SHAREDVARIABLE:
1991+
return "共享变量";
1992+
case VhdlDocGen::VFILE:
1993+
return "文件";
1994+
case VhdlDocGen::GROUP:
1995+
return "";
1996+
case VhdlDocGen::INSTANTIATION:
1997+
return "实例化";
1998+
case VhdlDocGen::ALIAS:
1999+
return "别名";
2000+
case VhdlDocGen::CONFIG:
2001+
return " 配置";
2002+
case VhdlDocGen::MISCELLANEOUS:
2003+
return "混合运算";
2004+
case VhdlDocGen::UCF_CONST:
2005+
return "约束";
2006+
default:
2007+
return "";
2008+
}
2009+
}
2010+
virtual QCString trCustomReference(const QCString &name)
2011+
{ return QCString(name)+" 引用"; }
2012+
2013+
/* Slice */
2014+
virtual QCString trConstants()
2015+
{
2016+
return "常量";
2017+
}
2018+
virtual QCString trConstantDocumentation()
2019+
{
2020+
return "常量文档";
2021+
}
2022+
virtual QCString trSequences()
2023+
{
2024+
return "序列";
2025+
}
2026+
virtual QCString trSequenceDocumentation()
2027+
{
2028+
return "序列文档";
2029+
}
2030+
virtual QCString trDictionaries()
2031+
{
2032+
return "字典";
2033+
}
2034+
virtual QCString trDictionaryDocumentation()
2035+
{
2036+
return "字典文档";
2037+
}
2038+
virtual QCString trSliceInterfaces()
2039+
{
2040+
return "接口";
2041+
}
2042+
virtual QCString trInterfaceIndex()
2043+
{
2044+
return "接口索引";
2045+
}
2046+
virtual QCString trInterfaceList()
2047+
{
2048+
return "接口列表";
2049+
}
2050+
virtual QCString trInterfaceListDescription()
2051+
{
2052+
return "以下是带有简要说明的接口:";
2053+
}
2054+
virtual QCString trInterfaceHierarchy()
2055+
{
2056+
return "接口层次结构";
2057+
}
2058+
virtual QCString trInterfaceHierarchyDescription()
2059+
{
2060+
return "此继承列表按字母顺序粗略排序:";
2061+
}
2062+
virtual QCString trInterfaceDocumentation()
2063+
{
2064+
return "接口文档";
2065+
}
2066+
virtual QCString trStructs()
2067+
{
2068+
return "结构";
2069+
}
2070+
virtual QCString trStructIndex()
2071+
{
2072+
return "结构索引";
2073+
}
2074+
virtual QCString trStructList()
2075+
{
2076+
return "结构列表";
2077+
}
2078+
virtual QCString trStructListDescription()
2079+
{
2080+
return "以下是带有简要说明的结构:";
2081+
}
2082+
virtual QCString trStructDocumentation()
2083+
{
2084+
return "结构文档";
2085+
}
2086+
virtual QCString trExceptionIndex()
2087+
{
2088+
return "异常索引";
2089+
}
2090+
virtual QCString trExceptionList()
2091+
{
2092+
return "异常列表";
2093+
}
2094+
virtual QCString trExceptionListDescription()
2095+
{
2096+
return "以下是带有简要说明的异常:";
2097+
}
2098+
virtual QCString trExceptionHierarchy()
2099+
{
2100+
return "异常层次结构";
2101+
}
2102+
virtual QCString trExceptionHierarchyDescription()
2103+
{
2104+
return "此继承列表按字母顺序粗略排序:";
2105+
}
2106+
virtual QCString trExceptionDocumentation()
2107+
{
2108+
return "异常文档";
2109+
}
2110+
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
2111+
{
2112+
QCString result=(QCString)clName;
2113+
if (isLocal) result+=" 局部";
2114+
switch(compType)
2115+
{
2116+
case ClassDef::Class: result+=""; break;
2117+
case ClassDef::Struct: result+=" 结构"; break;
2118+
case ClassDef::Union: result+=" 联合"; break;
2119+
case ClassDef::Interface: result+=" 接口"; break;
2120+
case ClassDef::Protocol: result+=" 协议"; break;
2121+
case ClassDef::Category: result+=" 类别"; break;
2122+
case ClassDef::Exception: result+=" 异常"; break;
2123+
default: break;
2124+
}
2125+
result+=" 引用";
2126+
return result;
2127+
}
2128+
virtual QCString trOperations()
2129+
{
2130+
return "操作";
2131+
}
2132+
virtual QCString trOperationDocumentation()
2133+
{
2134+
return "操作文档";
2135+
}
2136+
virtual QCString trDataMembers()
2137+
{
2138+
return "数据成员";
2139+
}
2140+
virtual QCString trDataMemberDocumentation()
2141+
{
2142+
return "数据成员文档";
2143+
}
2144+
2145+
//////////////////////////////////////////////////////////////////////////
2146+
// new since 1.8.19
2147+
//////////////////////////////////////////////////////////////////////////
2148+
2149+
/** VHDL design unit documentation */
2150+
virtual QCString trDesignUnitDocumentation()
2151+
{ return "设计单元文档"; }
2152+
2153+
//////////////////////////////////////////////////////////////////////////
2154+
// new since 1.9.2
2155+
//////////////////////////////////////////////////////////////////////////
2156+
2157+
/** C++20 concept */
2158+
virtual QCString trConcept(bool first_capital, bool singular)
2159+
{
2160+
return "概念";
2161+
}
2162+
/*! used as the title of the HTML page of a C++20 concept page */
2163+
virtual QCString trConceptReference(const QCString &conceptName)
2164+
{
2165+
QCString result=conceptName;
2166+
result+=" 概念引用";
2167+
return result;
2168+
}
2169+
2170+
/*! used as the title of page containing all the index of all concepts. */
2171+
virtual QCString trConceptList()
2172+
{ return "概念列表"; }
2173+
2174+
/*! used as the title of chapter containing the index listing all concepts. */
2175+
virtual QCString trConceptIndex()
2176+
{ return "概念索引"; }
2177+
2178+
/*! used as the title of chapter containing all information about concepts. */
2179+
virtual QCString trConceptDocumentation()
2180+
{ return "概念文档"; }
2181+
2182+
/*! used as an introduction to the concept list */
2183+
virtual QCString trConceptListDescription(bool extractAll)
2184+
{
2185+
return "以下是带有简要说明的概念";
2186+
}
2187+
2188+
/*! used to introduce the definition of the C++20 concept */
2189+
virtual QCString trConceptDefinition()
2190+
{
2191+
return "概念定义";
2192+
}
2193+
19192194
};
19202195

19212196
#endif

0 commit comments

Comments
 (0)