1 /******************************************************************************
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
18 #ifndef TRANSLATOR_CN_H
19 #define TRANSLATOR_CN_H
22 If you want insert a space whenever Chinese meets English characters, set
23 CN_SPC to " ", else null.
27 class TranslatorChinese : public TranslatorAdapter_1_8_15
30 /*! Used for identification of the language. The identification
31 * should not be translated. It should be replaced by the name
32 * of the language in English using lower-case characters only
33 * (e.g. "czech", "japanese", "russian", etc.). It should be equal to
34 * the identification used in the language.cpp.
37 virtual QCString idLanguage()
40 /*! Used to get the LaTeX command(s) for the language support.
41 * This method should return string with commands that switch
42 * LaTeX to the desired language. For example
43 * <pre>"\\usepackage[german]{babel}\n"
46 * <pre>"\\usepackage{polski}\n"
47 * "\\usepackage[latin2]{inputenc}\n"
48 * "\\usepackage[T1]{fontenc}\n"
51 * The English LaTeX does not use such commands. Because of this
52 * the empty string is returned in this implementation.
54 virtual QCString latexLanguageSupportCommand()
56 return "\\usepackage{CJKutf8}\n";
58 virtual QCString latexFontenc()
62 virtual QCString latexDocumentPre()
64 return "\\begin{CJK}{UTF8}{min}\n";
66 virtual QCString latexDocumentPost()
68 return "\\end{CJK}\n";
71 /*! used in the compound documentation before a list of related functions.
73 virtual QCString trRelatedFunctions()
76 /*! subscript for the related functions. */
77 virtual QCString trRelatedSubscript()
78 { return "(请注意: 这些不是成员函数.)"; }
80 /*! header that is put before the detailed description of files,
81 * classes and namespaces.
83 virtual QCString trDetailedDescription()
86 /*! header that is put before the list of typedefs. */
87 virtual QCString trMemberTypedefDocumentation()
88 { return "成员类型定义说明"; }
90 /*! header that is put before the list of enumerations. */
91 virtual QCString trMemberEnumerationDocumentation()
92 { return "成员枚举类型说明"; }
94 /*! header that is put before the list of member function. */
95 virtual QCString trMemberFunctionDocumentation()
98 /*! header that is put before the list of member attributes. */
99 virtual QCString trMemberDataDocumentation()
101 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
111 /*! this is the text of a link put after brief descriptions. */
112 virtual QCString trMore()
115 /*! put in the class documentation */
116 virtual QCString trListOfAllMembers()
119 /*! used as the title of the "list of all members" page of a class */
120 virtual QCString trMemberList()
123 /*! this is the first part of a sentence that is followed by a class name */
124 virtual QCString trThisIsTheListOfAllMembers()
125 { return "成员的完整列表,这些成员属于" CN_SPC; }
127 /*! this is the remainder of the sentence after the class name */
128 virtual QCString trIncludingInheritedMembers()
129 { return ",包括所有继承而来的类成员"; }
131 /*! this is put at the author sections at the bottom of man pages.
132 * parameter s is name of the project name.
134 virtual QCString trGeneratedAutomatically(const char *s)
136 result = "由" CN_SPC "Doyxgen" CN_SPC "通过分析" CN_SPC;
137 if (s) result += ((QCString)s+CN_SPC "的" CN_SPC);
142 /*! put after an enum name in the list of all members */
143 virtual QCString trEnumName()
146 /*! put after an enum value in the list of all members */
147 virtual QCString trEnumValue()
150 /*! put after an undocumented member in the list of all members */
151 virtual QCString trDefinedIn()
152 { return "定义于" CN_SPC; }
154 // quick reference sections
156 /*! This is put above each page as a link to the list of all groups of
157 * compounds or files (see the \\group command).
159 virtual QCString trModules()
162 /*! This is put above each page as a link to the class hierarchy */
163 virtual QCString trClassHierarchy()
166 /*! This is put above each page as a link to the list of annotated class */
167 virtual QCString trCompoundList()
169 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
177 /*! This is put above each page as a link to the list of documented files */
178 virtual QCString trFileList()
181 /*! This is put above each page as a link to all members of compounds. */
182 virtual QCString trCompoundMembers()
184 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
192 /*! This is put above each page as a link to all member of files. */
193 virtual QCString trFileMembers()
195 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
202 /*! This is put above each page as a link to all related pages. */
203 virtual QCString trRelatedPages()
206 /*! This is put above each page as a link to all examples. */
207 virtual QCString trExamples()
210 virtual QCString trSearch()
213 virtual QCString trClassHierarchyDescription()
214 { return "此继承关系列表按字典顺序粗略的排序:" CN_SPC; }
216 virtual QCString trFileListDescription(bool extractAll)
218 QCString result="这里列出了所有";
219 if (!extractAll) result+="文档化的";
220 result+="文件,并附带简要说明:";
224 virtual QCString trCompoundListDescription()
226 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
228 return "这里列出了所有结构体,并附带简要说明:";
232 return "这里列出了所有类、结构、联合以及接口定义等,并附带简要说明:";
236 virtual QCString trCompoundMembersDescription(bool extractAll)
238 QCString result="这里列出了所有";
242 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
243 result+="结构体和联合体的成员变量,并附带";
248 //result+=" with links to ";
250 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
251 result+="结构体或联合的详细说明:";
258 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
259 result+="结构或联合所属的文件:";
268 virtual QCString trFileMembersDescription(bool extractAll)
270 QCString result="这里列出了所有";
273 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
274 result +="函数,变量,宏,枚举和类型定义等,并附带";
287 virtual QCString trExamplesDescription()
288 { return "这里列出了所有示例:"; }
290 virtual QCString trRelatedPagesDescription()
291 { return "这里列出了所有相关页面:"; }
293 virtual QCString trModulesDescription()
294 { return "这里列出了所有模块:"; }
296 virtual QCString trDocumentation()
299 virtual QCString trModuleIndex()
302 virtual QCString trHierarchicalIndex()
305 virtual QCString trCompoundIndex()
307 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
316 virtual QCString trFileIndex()
319 virtual QCString trModuleDocumentation()
322 virtual QCString trClassDocumentation()
324 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
333 virtual QCString trFileDocumentation()
336 virtual QCString trExampleDocumentation()
339 virtual QCString trPageDocumentation()
342 virtual QCString trReferenceManual()
345 virtual QCString trDefines()
348 virtual QCString trTypedefs()
351 virtual QCString trEnumerations()
354 virtual QCString trFunctions()
357 virtual QCString trVariables()
360 virtual QCString trEnumerationValues()
364 virtual QCString trDefineDocumentation()
367 virtual QCString trTypedefDocumentation()
370 virtual QCString trEnumerationTypeDocumentation()
373 virtual QCString trFunctionDocumentation()
376 virtual QCString trVariableDocumentation()
379 virtual QCString trCompounds()
381 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
390 virtual QCString trGeneratedAt(const char *date,const char *projName)
391 { QCString result=(QCString)"生成于" CN_SPC+date;
392 if (projName) result+=(QCString)CN_SPC ", 为" CN_SPC+projName;
393 result+=(QCString)"使用" CN_SPC;
397 virtual QCString trClassDiagram(const char *clName)
399 return (QCString)"类" CN_SPC+clName+CN_SPC "继承关系图:";
402 virtual QCString trForInternalUseOnly()
403 { return "仅限内部使用."; }
405 virtual QCString trWarning()
408 virtual QCString trVersion()
411 virtual QCString trDate()
414 virtual QCString trReturns()
417 virtual QCString trSeeAlso()
420 virtual QCString trParameters()
423 virtual QCString trExceptions()
426 virtual QCString trGeneratedBy()
429 //////////////////////////////////////////////////////////////////////////
430 // new since 0.49-990307
431 //////////////////////////////////////////////////////////////////////////
433 virtual QCString trNamespaceList()
436 virtual QCString trNamespaceListDescription(bool extractAll)
438 QCString result="这里列出了所有";
439 if (!extractAll) result+="文档化的";
440 result+="命名空间定义,附带简要说明:";
444 virtual QCString trFriends()
447 //////////////////////////////////////////////////////////////////////////
448 // new since 0.49-990405
449 //////////////////////////////////////////////////////////////////////////
451 virtual QCString trRelatedFunctionDocumentation()
452 { return "友元及相关函数文档"; }
454 //////////////////////////////////////////////////////////////////////////
455 // new since 0.49-990425
456 //////////////////////////////////////////////////////////////////////////
458 virtual QCString trCompoundReference(const char *clName,
459 ClassDef::CompoundType compType,
461 // used as the title of the HTML page of a class/struct/union
463 QCString result=(QCString)clName;
464 if (isTemplate) result+=CN_SPC "模板";
467 case ClassDef::Class: result+="类"; break;
468 case ClassDef::Struct: result+="结构体"; break;
469 case ClassDef::Union: result+="联合体"; break;
470 case ClassDef::Interface: result+="接口"; break;
471 case ClassDef::Protocol: result+="协议"; break;
472 case ClassDef::Category: result+="分类"; break;
473 case ClassDef::Exception: result+="异常"; break;
480 /*! used as the title of the HTML page of a file */
481 virtual QCString trFileReference(const char *fileName)
483 QCString result=fileName;
484 result+=CN_SPC "文件参考";
488 /*! used as the title of the HTML page of a namespace */
489 virtual QCString trNamespaceReference(const char *namespaceName)
490 { QCString result=namespaceName;
491 result+=CN_SPC "命名空间参考";
495 // these are for the member sections of a class, struct or union
496 virtual QCString trPublicMembers()
497 { return "Public 成员函数"; }
499 virtual QCString trPublicSlots()
500 { return "Public 槽"; }
502 virtual QCString trSignals()
505 virtual QCString trStaticPublicMembers()
506 { return "静态 Public 成员函数"; }
508 virtual QCString trProtectedMembers()
509 { return "Protected 成员函数"; }
511 virtual QCString trProtectedSlots()
512 { return "Protected 槽"; }
514 virtual QCString trStaticProtectedMembers()
515 { return "静态 Protected 成员函数"; }
517 virtual QCString trPrivateMembers()
518 { return "Private 成员函数"; }
520 virtual QCString trPrivateSlots()
521 { return "Private 槽"; }
523 virtual QCString trStaticPrivateMembers()
524 { return "静态 Private 成员函数"; }
526 // end of member sections
527 virtual QCString trWriteList(int numEntries)
529 // this function is used to produce a comma-separated list of items.
530 // use generateMarker(i) to indicate where item i should be put.
533 // the inherits list contain `numEntries' classes
534 for (i=0;i<numEntries;i++)
536 // use generateMarker to generate placeholders for the class links!
537 result+=generateMarker(i); // generate marker for entry i in the list
538 // (order is left to right)
540 if (i!=numEntries-1) // not the last entry, so we need a separator
542 if (i<numEntries-2) // not the fore last entry
544 else // the fore last entry
545 result+=CN_SPC ", 以及" CN_SPC;
551 /*! used in class documentation to produce a list of base classes,
552 * if class diagrams are disabled.
554 virtual QCString trInheritsList(int numEntries)
555 { return "继承自" CN_SPC+trWriteList(numEntries)+CN_SPC "."; }
557 /*! used in class documentation to produce a list of super classes,
558 * if class diagrams are disabled.
560 virtual QCString trInheritedByList(int numEntries)
562 return "被" CN_SPC+trWriteList(numEntries)+CN_SPC "继承.";
565 /*! used in member documentation blocks to produce a list of
566 * members that are hidden by this one.
568 virtual QCString trReimplementedFromList(int numEntries)
570 return "重载" CN_SPC+trWriteList(numEntries)+CN_SPC ".";
573 /*! used in member documentation blocks to produce a list of
574 * all member that overwrite the implementation of this member.
576 virtual QCString trReimplementedInList(int numEntries)
578 return "被" CN_SPC+trWriteList(numEntries)+CN_SPC "重载.";
581 /*! This is put above each page as a link to all members of namespaces. */
582 virtual QCString trNamespaceMembers()
585 /*! This is an introduction to the page with all namespace members */
586 virtual QCString trNamespaceMemberDescription(bool extractAll)
588 QCString result="这里列出了所有";
589 if (!extractAll) result+="文档化的";
590 result+="命名空间成员,并附带";
598 /*! This is used in LaTeX as the title of the chapter with the
599 * index of all namespaces.
601 virtual QCString trNamespaceIndex()
604 /*! This is used in LaTeX as the title of the chapter containing
605 * the documentation of all namespaces.
607 virtual QCString trNamespaceDocumentation()
610 //////////////////////////////////////////////////////////////////////////
611 // new since 0.49-990522
612 //////////////////////////////////////////////////////////////////////////
614 /*! This is used in the documentation before the list of all
615 * namespaces in a file.
617 virtual QCString trNamespaces()
622 //////////////////////////////////////////////////////////////////////////
623 // new since 0.49-990728
624 //////////////////////////////////////////////////////////////////////////
626 /*! This is put at the bottom of a class documentation page and is
627 * followed by a list of files that were used to generate the page.
629 virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
631 { // here s is one of " Class", " Struct" or " Union"
632 // single is true implies a single file
633 QCString result=(QCString)"该";
636 case ClassDef::Class: result+="类"; break;
637 case ClassDef::Struct: result+="结构体"; break;
638 case ClassDef::Union: result+="联合体"; break;
639 case ClassDef::Interface: result+="接口"; break;
640 case ClassDef::Protocol: result+="协议"; break;
641 case ClassDef::Category: result+="分类"; break;
642 case ClassDef::Exception: result+="异常"; break;
645 result+="的文档由以下文件生成:";
649 //////////////////////////////////////////////////////////////////////////
650 // new since 0.49-990901
651 //////////////////////////////////////////////////////////////////////////
653 /*! This is used as the heading text for the retval command. */
654 virtual QCString trReturnValues()
657 /*! This is in the (quick) index as a link to the main page (index.html)
659 virtual QCString trMainPage()
662 /*! This is used in references to page that are put in the LaTeX
663 * documentation. It should be an abbreviation of the word page.
665 virtual QCString trPageAbbreviation()
668 //////////////////////////////////////////////////////////////////////////
669 // new since 0.49-991106
670 //////////////////////////////////////////////////////////////////////////
672 virtual QCString trDefinedAtLineInSourceFile()
674 return "在文件" CN_SPC "@1" CN_SPC "第" CN_SPC "@0" CN_SPC "行定义.";
677 virtual QCString trDefinedInSourceFile()
679 return "在文件" CN_SPC "@0" CN_SPC "中定义.";
682 //////////////////////////////////////////////////////////////////////////
683 // new since 0.49-991205
684 //////////////////////////////////////////////////////////////////////////
686 virtual QCString trDeprecated()
691 //////////////////////////////////////////////////////////////////////////
693 //////////////////////////////////////////////////////////////////////////
695 /*! this text is put before a collaboration diagram */
696 virtual QCString trCollaborationDiagram(const char *clName)
698 return (QCString)clName+CN_SPC "的协作图:";
701 /*! this text is put before an include dependency graph */
702 virtual QCString trInclDepGraph(const char *fName)
704 return (QCString)fName+CN_SPC "的引用(Include)关系图:";
707 /*! header that is put before the list of constructor/destructors. */
708 virtual QCString trConstructorDocumentation()
713 /*! Used in the file documentation to point to the corresponding sources. */
714 virtual QCString trGotoSourceCode()
719 /*! Used in the file sources to point to the corresponding documentation. */
720 virtual QCString trGotoDocumentation()
725 /*! Text for the \\pre command */
726 virtual QCString trPrecondition()
731 /*! Text for the \\post command */
732 virtual QCString trPostcondition()
737 /*! Text for the \\invariant command */
738 virtual QCString trInvariant()
743 /*! Text shown before a multi-line variable/enum initialization */
744 virtual QCString trInitialValue()
749 /*! Text used the source code in the file index */
750 virtual QCString trCode()
755 virtual QCString trGraphicalHierarchy()
760 virtual QCString trGotoGraphicalHierarchy()
765 virtual QCString trGotoTextualHierarchy()
770 virtual QCString trPageIndex()
775 //////////////////////////////////////////////////////////////////////////
777 //////////////////////////////////////////////////////////////////////////
779 virtual QCString trNote()
784 virtual QCString trPublicTypes()
789 virtual QCString trPublicAttribs()
791 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
800 virtual QCString trStaticPublicAttribs()
802 return "静态 Public 属性";
805 virtual QCString trProtectedTypes()
807 return "Protected 类型";
810 virtual QCString trProtectedAttribs()
812 return "Protected 属性";
815 virtual QCString trStaticProtectedAttribs()
817 return "静态 Protected 属性";
820 virtual QCString trPrivateTypes()
825 virtual QCString trPrivateAttribs()
830 virtual QCString trStaticPrivateAttribs()
832 return "静态 Private 属性";
836 //////////////////////////////////////////////////////////////////////////
838 //////////////////////////////////////////////////////////////////////////
840 /*! Used as a marker that is put before a todo item */
841 virtual QCString trTodo()
846 /*! Used as the header of the todo list */
847 virtual QCString trTodoList()
852 //////////////////////////////////////////////////////////////////////////
854 //////////////////////////////////////////////////////////////////////////
856 virtual QCString trReferencedBy()
861 virtual QCString trRemarks()
866 virtual QCString trAttention()
871 virtual QCString trInclByDepGraph()
873 return "此图展示该文件直接或间接的被哪些文件引用了:";
876 virtual QCString trSince()
881 //////////////////////////////////////////////////////////////////////////
883 //////////////////////////////////////////////////////////////////////////
885 /*! title of the graph legend page */
886 virtual QCString trLegendTitle()
891 /*! page explaining how the dot graph's should be interpreted */
892 virtual QCString trLegendDocs()
894 return "本页将向您解释如何理解由" CN_SPC "doxygen" CN_SPC "生成的图.<p>\n"
897 "/*! 由于截断而使 Invisible 不可见 */\n"
898 "class Invisible { };\n\n"
899 "/*! Truncated 的继承关系将被隐藏 */\n"
900 "class Truncated : public Invisible { };\n\n"
901 "/* 没有被doxygen文档化的类 */\n"
902 "class Undocumented { };\n\n"
903 "/*! public 继承关系的类 */\n"
904 "class PublicBase : public Truncated { };\n\n"
906 "template<class T> class Templ { };\n\n"
907 "/*! protected 继承关系的类 */\n"
908 "class ProtectedBase { };\n\n"
909 "/*! private 继承关系的类 */\n"
910 "class PrivateBase { };\n\n"
911 "/*! 被 Inherited 使用的类 */\n"
912 "class Used { };\n\n"
913 "/*! 继承自其它若干类的超级类 */\n"
914 "class Inherited : public PublicBase,\n"
915 " protected ProtectedBase,\n"
916 " private PrivateBase,\n"
917 " public Undocumented,\n"
918 " public Templ<int>\n"
921 " Used *m_usedClass;\n"
925 "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
930 "<li>%灰色填充的矩形 表示上图是由该结构体或类生成.</li>\n"
931 "<li>%黑色边框的矩形 表示已经被文档化的结构体或类.</li>\n"
932 "<li>%灰色边框的矩形 表示未被文档化的结构体或类.</li>\n"
933 "<li>%红色边框的矩形 表示该结构体或类的关系没有被完全显示."
934 "%如果生成的图不能调整到制定的尺寸,有一些关系就会被截断而不显示出来.</li>\n"
940 "<li>%深蓝色的箭头被用于展示 public 的继承关系.</li>\n"
941 "<li>%深绿色的箭头表示 protected 的继承关系.</li>\n"
942 "<li>%深红色的箭头说明了是 privated 的继承关系.</li>\n"
943 "<li>%紫色虚线箭头用来表示两个类之间的聚合关系. 被箭头指向的类的类型的变量,可以通过箭头旁标明的变量去访问.</li>\n"
944 "<li>%黄色虚线箭头表示模板类实例和模板类之间的关系. 箭头旁边标明了模板类实例化的参数.</li>\n"
948 /*! text for the link to the legend page */
949 virtual QCString trLegend()
954 //////////////////////////////////////////////////////////////////////////
956 //////////////////////////////////////////////////////////////////////////
958 /*! Used as a marker that is put before a test item */
959 virtual QCString trTest()
964 /*! Used as the header of the test list */
965 virtual QCString trTestList()
970 //////////////////////////////////////////////////////////////////////////
972 ////////////////////////////////////////////////////////////////////////////
974 /*! Used as a section header for IDL properties */
975 virtual QCString trProperties()
980 /*! Used as a section header for IDL property documentation */
981 virtual QCString trPropertyDocumentation()
986 //////////////////////////////////////////////////////////////////////////
988 //////////////////////////////////////////////////////////////////////////
990 /*! Used for Java classes in the summary section of Java packages */
991 virtual QCString trClasses()
993 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
1003 /*! Used as the title of a Java package */
1004 virtual QCString trPackage(const char *name)
1006 return (QCString)"包" CN_SPC+name;
1009 /*! Title of the package index page */
1010 virtual QCString trPackageList()
1015 /*! The description of the package index page */
1016 virtual QCString trPackageListDescription()
1018 return "这里列出所有的包,附带简要说明(如果有的话):";
1021 /*! The link name in the Quick links header for each page */
1022 virtual QCString trPackages()
1027 /*! Text shown before a multi-line define */
1028 virtual QCString trDefineValue()
1033 ////////////////////////////////////////////////////////////////////////////
1034 //// new since 1.2.6
1035 ////////////////////////////////////////////////////////////////////////////
1036 virtual QCString trBug ()
1041 virtual QCString trBugList ()
1043 return "Bug" CN_SPC "列表";
1046 //////////////////////////////////////////////////////////////////////////
1048 //////////////////////////////////////////////////////////////////////////
1050 /*! Used as ansicpg for RTF file
1052 * The following table shows the correlation of Charset name, Charset Value and
1055 * Charset Name Charset Value(hex) Codepage number
1056 * ------------------------------------------------------
1057 * DEFAULT_CHARSET 1 (x01)
1058 * SYMBOL_CHARSET 2 (x02)
1059 * OEM_CHARSET 255 (xFF)
1060 * ANSI_CHARSET 0 (x00) 1252
1061 * RUSSIAN_CHARSET 204 (xCC) 1251
1062 * EE_CHARSET 238 (xEE) 1250
1063 * GREEK_CHARSET 161 (xA1) 1253
1064 * TURKISH_CHARSET 162 (xA2) 1254
1065 * BALTIC_CHARSET 186 (xBA) 1257
1066 * HEBREW_CHARSET 177 (xB1) 1255
1067 * ARABIC _CHARSET 178 (xB2) 1256
1068 * SHIFTJIS_CHARSET 128 (x80) 932
1069 * HANGEUL_CHARSET 129 (x81) 949
1070 * GB2313_CHARSET 134 (x86) 936
1071 * CHINESEBIG5_CHARSET 136 (x88) 950
1075 virtual QCString trRTFansicp()
1080 /*! Used as ansicpg for RTF fcharset
1081 * \see trRTFansicp() for a table of possible values.
1083 virtual QCString trRTFCharSet()
1089 /*! Used as header RTF general index */
1090 virtual QCString trRTFGeneralIndex()
1096 /*! This is used for translation of the word that will possibly
1097 * be followed by a single name or by a list of names
1100 virtual QCString trClass(bool /*first_capital*/, bool /*singular*/)
1103 QCString result((first_capital ? "Class" : "class"));
1104 if (!singular) result+="es";
1110 /*! This is used for translation of the word that will possibly
1111 * be followed by a single name or by a list of names
1114 virtual QCString trFile(bool /*first_capital*/, bool /*singular*/)
1117 QCString result((first_capital ? "File" : "file"));
1118 if (!singular) result+="s";
1125 /*! This is used for translation of the word that will possibly
1126 * be followed by a single name or by a list of names
1129 virtual QCString trNamespace(bool /*first_capital*/, bool /*singular*/)
1132 QCString result((first_capital ? "Namespace" : "namespace"));
1133 if (!singular) result+="s";
1139 /*! This is used for translation of the word that will possibly
1140 * be followed by a single name or by a list of names
1143 virtual QCString trGroup(bool /*first_capital*/, bool /*singular*/)
1146 QCString result((first_capital ? "Group" : "group"));
1147 if (!singular) result+="s";
1153 /*! This is used for translation of the word that will possibly
1154 * be followed by a single name or by a list of names
1157 virtual QCString trPage(bool /*first_capital*/, bool /*singular*/)
1160 QCString result((first_capital ? "Page" : "page"));
1161 if (!singular) result+="s";
1167 /*! This is used for translation of the word that will possibly
1168 * be followed by a single name or by a list of names
1171 virtual QCString trMember(bool /*first_capital*/, bool /*singular*/)
1174 QCString result((first_capital ? "Member" : "member"));
1175 if (!singular) result+="s";
1181 /*! This is used for translation of the word that will possibly
1182 * be followed by a single name or by a list of names
1185 virtual QCString trGlobal(bool /*first_capital*/, bool /*singular*/)
1188 QCString result((first_capital ? "Global" : "global"));
1189 if (!singular) result+="s";
1195 //////////////////////////////////////////////////////////////////////////
1197 //////////////////////////////////////////////////////////////////////////
1199 /*! This text is generated when the \\author command is used and
1200 * for the author section in man pages. */
1201 virtual QCString trAuthor(bool /*first_capital*/, bool /*singular*/)
1204 QCString result((first_capital ? "Author" : "author"));
1205 if (!singular) result+="s";
1211 //////////////////////////////////////////////////////////////////////////
1213 //////////////////////////////////////////////////////////////////////////
1215 /*! This text is put before the list of members referenced by a member
1217 virtual QCString trReferences()
1222 //////////////////////////////////////////////////////////////////////////
1224 //////////////////////////////////////////////////////////////////////////
1226 /*! used in member documentation blocks to produce a list of
1227 * members that are implemented by this one.
1229 virtual QCString trImplementedFromList(int numEntries)
1231 /* return "Implements "+trWriteList(numEntries)+"."; */
1232 return "实现了" CN_SPC+trWriteList(numEntries)+".";
1235 /*! used in member documentation blocks to produce a list of
1236 * all members that implement this abstract member.
1238 virtual QCString trImplementedInList(int numEntries)
1240 /* return "Implemented in "+trWriteList(numEntries)+"."; */
1241 return "在" CN_SPC+trWriteList(numEntries)+CN_SPC "内被实现.";
1244 //////////////////////////////////////////////////////////////////////////
1246 //////////////////////////////////////////////////////////////////////////
1248 /*! used in RTF documentation as a heading for the Table
1251 virtual QCString trRTFTableOfContents()
1253 /* return "Table of Contents"; */
1257 //////////////////////////////////////////////////////////////////////////
1259 //////////////////////////////////////////////////////////////////////////
1261 /*! Used as the header of the list of item that have been
1262 * flagged deprecated
1264 virtual QCString trDeprecatedList()
1269 //////////////////////////////////////////////////////////////////////////
1271 //////////////////////////////////////////////////////////////////////////
1273 /*! Used as a header for declaration section of the events found in
1276 virtual QCString trEvents()
1281 /*! Header used for the documentation section of a class' events. */
1282 virtual QCString trEventDocumentation()
1287 //////////////////////////////////////////////////////////////////////////
1289 //////////////////////////////////////////////////////////////////////////
1291 /*! Used as a heading for a list of Java class types with package scope.
1293 virtual QCString trPackageTypes()
1298 /*! Used as a heading for a list of Java class functions with package
1301 virtual QCString trPackageMembers()
1306 /*! Used as a heading for a list of static Java class functions with
1309 virtual QCString trStaticPackageMembers()
1314 /*! Used as a heading for a list of Java class variables with package
1317 virtual QCString trPackageAttribs()
1322 /*! Used as a heading for a list of static Java class variables with
1325 virtual QCString trStaticPackageAttribs()
1330 //////////////////////////////////////////////////////////////////////////
1332 //////////////////////////////////////////////////////////////////////////
1334 /*! Used in the quick index of a class/file/namespace member list page
1335 * to link to the unfiltered list of all members.
1337 virtual QCString trAll()
1342 /*! Put in front of the call graph for a function. */
1343 virtual QCString trCallGraph()
1348 //////////////////////////////////////////////////////////////////////////
1350 //////////////////////////////////////////////////////////////////////////
1352 /*! This string is used as the title for the page listing the search
1355 virtual QCString trSearchResultsTitle()
1360 /*! This string is put just before listing the search results. The
1361 * text can be different depending on the number of documents found.
1362 * Inside the text you can put the special marker $num to insert
1363 * the number representing the actual number of search results.
1364 * The @a numDocuments parameter can be either 0, 1 or 2, where the
1365 * value 2 represents 2 or more matches. HTML markup is allowed inside
1366 * the returned string.
1368 virtual QCString trSearchResults(int numDocuments)
1370 if (numDocuments==0)
1372 return "抱歉,未找到与您查询相符的文档.";
1374 else if (numDocuments==1)
1376 return "找到<b>1</b>篇与您查询相符的文档.";
1380 return "找到<b>$num</b>篇与您查询相符的文档."
1384 /*! This string is put before the list of matched words, for each search
1385 * result. What follows is the list of words that matched the query.
1387 virtual QCString trSearchMatches()
1392 //////////////////////////////////////////////////////////////////////////
1394 //////////////////////////////////////////////////////////////////////////
1396 /*! This is used in HTML as the title of page with source code for file filename
1398 virtual QCString trSourceFile(QCString& filename)
1400 /* return filename + " Source File"; */
1401 return filename + CN_SPC "源文件";
1403 //////////////////////////////////////////////////////////////////////////
1405 //////////////////////////////////////////////////////////////////////////
1407 /*! This is used as the name of the chapter containing the directory
1410 virtual QCString trDirIndex()
1415 /*! This is used as the name of the chapter containing the documentation
1416 * of the directories.
1418 virtual QCString trDirDocumentation()
1423 /*! This is used as the title of the directory index and also in the
1424 * Quick links of an HTML page, to link to the directory hierarchy.
1426 virtual QCString trDirectories()
1429 /*! This returns a sentences that introduces the directory hierarchy.
1430 * and the fact that it is sorted alphabetically per level
1432 virtual QCString trDirDescription()
1434 return "此继承关系列表按字典顺序粗略的排序:" CN_SPC;
1437 /*! This returns the title of a directory page. The name of the
1438 * directory is passed via \a dirName.
1440 virtual QCString trDirReference(const char *dirName)
1442 QCString result=dirName;
1443 result+=CN_SPC "目录参考";
1447 /*! This returns the word directory with or without starting capital
1448 * (\a first_capital) and in sigular or plural form (\a singular).
1450 virtual QCString trDir(bool /*first_capital*/, bool /*singular*/)
1455 //////////////////////////////////////////////////////////////////////////
1457 //////////////////////////////////////////////////////////////////////////
1459 /*! This text is added to the documentation when the \\overload command
1460 * is used for a overloaded function.
1462 virtual QCString trOverloadText()
1464 return "这是为便于使用而提供的一个重载成员函数."
1465 "与上面的函数相比,它接受不同类型的参数.";
1468 //////////////////////////////////////////////////////////////////////////
1470 //////////////////////////////////////////////////////////////////////////
1472 /*! This is used to introduce a caller (or called-by) graph */
1473 virtual QCString trCallerGraph()
1475 return "这是这个函数的调用关系图:";
1478 /*! This is used in the documentation of a file/namespace before the list
1479 * of documentation blocks for enumeration values
1481 virtual QCString trEnumerationValueDocumentation()
1486 //////////////////////////////////////////////////////////////////////////
1487 // new since 1.5.4 (mainly for Fortran)
1488 //////////////////////////////////////////////////////////////////////////
1490 /*! header that is put before the list of member subprograms (Fortran). */
1491 virtual QCString trMemberFunctionDocumentationFortran()
1492 { return "成员函数/子程序说明"; }
1494 /*! This is put above each page as a link to the list of annotated data types (Fortran). */
1495 virtual QCString trCompoundListFortran()
1496 { return "数据类型列表"; }
1498 /*! This is put above each page as a link to all members of compounds (Fortran). */
1499 virtual QCString trCompoundMembersFortran()
1502 /*! This is an introduction to the annotated compound list (Fortran). */
1503 virtual QCString trCompoundListDescriptionFortran()
1504 { return "带简要描述的数据类型列表:"; }
1506 /*! This is an introduction to the page with all data types (Fortran). */
1507 virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
1509 QCString result="这里列出了所有";
1514 result+="数据类型成员,并附带";
1515 //result+=" with links to ";
1527 /*! This is used in LaTeX as the title of the chapter with the
1528 * annotated compound index (Fortran).
1530 virtual QCString trCompoundIndexFortran()
1531 { return "数据类型索引"; }
1534 /*! This is used in LaTeX as the title of the chapter containing
1535 * the documentation of all data types (Fortran).
1537 virtual QCString trTypeDocumentation()
1538 { return "数据类型文档"; }
1540 /*! This is used in the documentation of a file as a header before the
1541 * list of (global) subprograms (Fortran).
1543 virtual QCString trSubprograms()
1544 { return "函数/子程序"; }
1546 /*! This is used in the documentation of a file/namespace before the list
1547 * of documentation blocks for subprograms (Fortran)
1549 virtual QCString trSubprogramDocumentation()
1550 { return "函数/子程序说明"; }
1553 /*! This is used in the documentation of a file/namespace/group before
1554 * the list of links to documented compounds (Fortran)
1556 virtual QCString trDataTypes()
1559 /*! used as the title of page containing all the index of all modules (Fortran). */
1560 virtual QCString trModulesList()
1563 /*! used as an introduction to the modules list (Fortran) */
1564 virtual QCString trModulesListDescription(bool extractAll)
1566 QCString result="这里列出了所有";
1567 if (!extractAll) result+="文档化的";
1568 result+="模块,并附带简要说明:";
1572 /*! used as the title of the HTML page of a module/type (Fortran) */
1573 virtual QCString trCompoundReferenceFortran(const char *clName,
1574 ClassDef::CompoundType compType,
1577 QCString result=(QCString)clName;
1580 case ClassDef::Class: result+=CN_SPC "模块"; break;
1581 case ClassDef::Struct: result+=CN_SPC "类型"; break;
1582 case ClassDef::Union: result+=CN_SPC "联合体"; break;
1583 case ClassDef::Interface: result+=CN_SPC "接口"; break;
1584 case ClassDef::Protocol: result+=CN_SPC "协议"; break;
1585 case ClassDef::Category: result+=CN_SPC "目录"; break;
1586 case ClassDef::Exception: result+=CN_SPC "异常"; break;
1589 if (isTemplate) result+="模板" CN_SPC;
1594 /*! used as the title of the HTML page of a module (Fortran) */
1595 virtual QCString trModuleReference(const char *namespaceName)
1597 QCString result=namespaceName;
1598 result += CN_SPC "模块参考手册";
1602 /*! This is put above each page as a link to all members of modules. (Fortran) */
1603 virtual QCString trModulesMembers()
1606 /*! This is an introduction to the page with all modules members (Fortran) */
1607 virtual QCString trModulesMemberDescription(bool extractAll)
1609 // QCString result="Here is a list of all ";
1610 // if (!extractAll) result+="documented ";
1611 // result+="module members with links to ";
1614 // result+="the module documentation for each member:";
1618 // result+="the modules they belong to:";
1622 return "这里是有文档的模块成员列表,含有到每个成员所在模块的文档的链接:";
1624 return "这里是模块成员列表,含有到成员所属的模块的链接:";
1628 /*! This is used in LaTeX as the title of the chapter with the
1629 * index of all modules (Fortran).
1631 virtual QCString trModulesIndex()
1632 // { return "Modules Index"; }
1635 /*! This is used for translation of the word that will possibly
1636 * be followed by a single name or by a list of names
1639 virtual QCString trModule(bool, bool)
1641 // QCString result((first_capital ? "Module" : "module"));
1642 // if (!singular) result+="s";
1646 /*! This is put at the bottom of a module documentation page and is
1647 * followed by a list of files that were used to generate the page.
1649 virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType,
1652 QCString result="该";
1655 case ClassDef::Class: result+=CN_SPC "模块"; break;
1656 case ClassDef::Struct: result+=CN_SPC "结构体"; break;
1657 case ClassDef::Union: result+=CN_SPC "联合体"; break;
1658 case ClassDef::Interface: result+=CN_SPC "接口"; break;
1659 case ClassDef::Protocol: result+=CN_SPC "协议"; break;
1660 case ClassDef::Category: result+=CN_SPC "目录"; break;
1661 case ClassDef::Exception: result+=CN_SPC "异常"; break;
1664 result+=CN_SPC "的文档由以下文件生成:";
1668 /*! This is used for translation of the word that will possibly
1669 * be followed by a single name or by a list of names
1672 virtual QCString trType(bool, bool)
1677 /*! This is used for translation of the word that will possibly
1678 * be followed by a single name or by a list of names
1681 virtual QCString trSubprogram(bool, bool)
1686 /*! C# Type Constraint list */
1687 virtual QCString trTypeConstraints()
1692 //////////////////////////////////////////////////////////////////////////
1694 //////////////////////////////////////////////////////////////////////////
1695 virtual QCString trDirRelation(const char *name)
1697 // return QCString(name)+" Relation";
1699 return QCString(name)+CN_SPC "关系";
1702 virtual QCString trLoading()
1707 virtual QCString trGlobalNamespace()
1712 virtual QCString trSearching()
1717 virtual QCString trNoMatches()
1722 //////////////////////////////////////////////////////////////////////////
1724 //////////////////////////////////////////////////////////////////////////
1726 virtual QCString trFileIn(const char *name)
1728 return (QCString)"文件在"+CN_SPC+name;
1731 virtual QCString trIncludesFileIn(const char *name)
1733 return (QCString)"在" CN_SPC+name+CN_SPC "中引用";
1736 virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
1737 int hour,int minutes,int seconds,
1740 static const char *days[] = { "一","二","三","四","五","六","日" };
1741 static const char *months[] = { "一","二","三","四","五","六","七","八","九","十","十一","十二" };
1745 sdate.sprintf("%d年" CN_SPC "%s月" CN_SPC "%d日" CN_SPC "星期%s",year, months[month-1], day, days[dayOfWeek-1]);
1750 stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
1756 //////////////////////////////////////////////////////////////////////////
1758 //////////////////////////////////////////////////////////////////////////
1760 /*! Header for the page with bibliographic citations */
1761 virtual QCString trCiteReferences()
1764 /*! Text for copyright paragraph */
1765 virtual QCString trCopyright()
1768 /*! Header for the graph showing the directory dependencies */
1769 virtual QCString trDirDepGraph(const char *name)
1771 return QCString(name)+CN_SPC "的目录依赖关系图";
1774 //////////////////////////////////////////////////////////////////////////
1776 //////////////////////////////////////////////////////////////////////////
1778 /*! Detail level selector shown for hierarchical indices */
1779 virtual QCString trDetailLevel()
1782 /*! Section header for list of template parameters */
1783 virtual QCString trTemplateParameters()
1786 /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
1787 virtual QCString trAndMore(const QCString &number)
1788 { return "和" CN_SPC+number+CN_SPC "更多..."; }
1790 /*! Used file list for a Java enum */
1791 virtual QCString trEnumGeneratedFromFiles(bool /*single*/)
1792 { return "枚举说明文档从下列文件生成:"; }
1794 /*! Header of a Java enum page (Java enums are represented as classes). */
1795 virtual QCString trEnumReference(const char *name)
1796 { return QCString(name)+CN_SPC "枚举类型参考"; }
1798 /*! Used for a section containing inherited members */
1799 virtual QCString trInheritedFrom(const char *members,const char *what)
1800 { return QCString(members)+CN_SPC "继承自" CN_SPC+what; }
1802 /*! Header of the sections with inherited members specific for the
1805 virtual QCString trAdditionalInheritedMembers()
1806 { return "额外继承的成员函数"; }
1808 //////////////////////////////////////////////////////////////////////////
1810 //////////////////////////////////////////////////////////////////////////
1812 //////////////////////////////////////////////////////////////////////////
1814 /*! Used as a tooltip for the toggle button that appears in the
1815 * navigation tree in the HTML output when GENERATE_TREEVIEW is
1816 * enabled. This tooltip explains the meaning of the button.
1818 virtual QCString trPanelSynchronisationTooltip(bool enable)
1820 QCString opt = enable ? "开启" : "关闭";
1821 return "点击" CN_SPC+opt+CN_SPC "面板同步";
1824 /*! Used in a method of an Objective-C class that is declared in a
1825 * a category. Note that the @1 marker is required and is replaced
1828 virtual QCString trProvidedByCategory()
1830 return "由 category @0 提供.";
1833 /*! Used in a method of an Objective-C category that extends a class.
1834 * Note that the @1 marker is required and is replaced by a link to
1837 virtual QCString trExtendsClass()
1842 /*! Used as the header of a list of class methods in Objective-C.
1843 * These are similar to static public member functions in C++.
1845 virtual QCString trClassMethods()
1850 /*! Used as the header of a list of instance methods in Objective-C.
1851 * These are similar to public member functions in C++.
1853 virtual QCString trInstanceMethods()
1858 /*! Used as the header of the member functions of an Objective-C class.
1860 virtual QCString trMethodDocumentation()
1865 /*! Used as the title of the design overview picture created for the
1868 virtual QCString trDesignOverview()
1873 //////////////////////////////////////////////////////////////////////////
1875 //////////////////////////////////////////////////////////////////////////
1877 /** old style UNO IDL services: implemented interfaces */
1878 virtual QCString trInterfaces()
1881 /** old style UNO IDL services: inherited services */
1882 virtual QCString trServices()
1885 /** UNO IDL constant groups */
1886 virtual QCString trConstantGroups()
1889 /** UNO IDL constant groups */
1890 virtual QCString trConstantGroupReference(const char *namespaceName)
1892 QCString result=namespaceName;
1893 result+= CN_SPC "常量组参考";
1896 /** UNO IDL service page title */
1897 virtual QCString trServiceReference(const char *sName)
1899 QCString result=(QCString)sName;
1900 result+= CN_SPC "服务参考";
1903 /** UNO IDL singleton page title */
1904 virtual QCString trSingletonReference(const char *sName)
1906 QCString result=(QCString)sName;
1907 result+= CN_SPC "单例参考";
1910 /** UNO IDL service page */
1911 virtual QCString trServiceGeneratedFromFiles(bool single)
1913 // single is true implies a single file
1914 return "该服务的文档由下列文件生成:";
1916 /** UNO IDL singleton page */
1917 virtual QCString trSingletonGeneratedFromFiles(bool single)
1919 // single is true implies a single file
1920 return "该单例的文档由下列文件生成:";
1923 //////////////////////////////////////////////////////////////////////////