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 Translator
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()
59 /*! used in the compound documentation before a list of related functions.
61 virtual QCString trRelatedFunctions()
64 /*! subscript for the related functions. */
65 virtual QCString trRelatedSubscript()
66 { return "(请注意: 这些不是成员函数.)"; }
68 /*! header that is put before the detailed description of files,
69 * classes and namespaces.
71 virtual QCString trDetailedDescription()
74 /*! header that is put before the list of typedefs. */
75 virtual QCString trMemberTypedefDocumentation()
76 { return "成员类型定义说明"; }
78 /*! header that is put before the list of enumerations. */
79 virtual QCString trMemberEnumerationDocumentation()
80 { return "成员枚举类型说明"; }
82 /*! header that is put before the list of member function. */
83 virtual QCString trMemberFunctionDocumentation()
86 /*! header that is put before the list of member attributes. */
87 virtual QCString trMemberDataDocumentation()
89 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
99 /*! this is the text of a link put after brief descriptions. */
100 virtual QCString trMore()
103 /*! put in the class documention */
104 virtual QCString trListOfAllMembers()
107 /*! used as the title of the "list of all members" page of a class */
108 virtual QCString trMemberList()
111 /*! this is the first part of a sentence that is followed by a class name */
112 virtual QCString trThisIsTheListOfAllMembers()
113 { return "成员的完整列表,这些成员属于" CN_SPC; }
115 /*! this is the remainder of the sentence after the class name */
116 virtual QCString trIncludingInheritedMembers()
117 { return ",包括所有继承而来的类成员"; }
119 /*! this is put at the author sections at the bottom of man pages.
120 * parameter s is name of the project name.
122 virtual QCString trGeneratedAutomatically(const char *s)
124 result = "由" CN_SPC "Doyxgen" CN_SPC "通过分析" CN_SPC;
125 if (s) result += ((QCString)s+CN_SPC "的" CN_SPC);
130 /*! put after an enum name in the list of all members */
131 virtual QCString trEnumName()
134 /*! put after an enum value in the list of all members */
135 virtual QCString trEnumValue()
138 /*! put after an undocumented member in the list of all members */
139 virtual QCString trDefinedIn()
140 { return "定义于" CN_SPC; }
142 // quick reference sections
144 /*! This is put above each page as a link to the list of all groups of
145 * compounds or files (see the \\group command).
147 virtual QCString trModules()
150 /*! This is put above each page as a link to the class hierarchy */
151 virtual QCString trClassHierarchy()
154 /*! This is put above each page as a link to the list of annotated class */
155 virtual QCString trCompoundList()
157 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
165 /*! This is put above each page as a link to the list of documented files */
166 virtual QCString trFileList()
169 /*! This is put above each page as a link to all members of compounds. */
170 virtual QCString trCompoundMembers()
172 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
180 /*! This is put above each page as a link to all member of files. */
181 virtual QCString trFileMembers()
183 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
190 /*! This is put above each page as a link to all related pages. */
191 virtual QCString trRelatedPages()
194 /*! This is put above each page as a link to all examples. */
195 virtual QCString trExamples()
198 virtual QCString trSearch()
201 virtual QCString trClassHierarchyDescription()
202 { return "此继承关系列表按字典顺序粗略的排序:" CN_SPC; }
204 virtual QCString trFileListDescription(bool extractAll)
206 QCString result="这里列出了所有";
207 if (!extractAll) result+="文档化的";
208 result+="文件,并附带简要说明:";
212 virtual QCString trCompoundListDescription()
214 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
216 return "这里列出了所有结构体,并附带简要说明:";
220 return "这里列出了所有类、结构、联合以及接口定义等,并附带简要说明:";
224 virtual QCString trCompoundMembersDescription(bool extractAll)
226 QCString result="这里列出了所有";
230 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
231 result+="结构体和联合体的成员变量,并附带";
236 //result+=" with links to ";
238 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
239 result+="结构体或联合的详细说明:";
246 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
247 result+="结构或联合所属的文件:";
256 virtual QCString trFileMembersDescription(bool extractAll)
258 QCString result="这里列出了所有";
261 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
262 result +="函数,变量,宏,枚举和类型定义等,并附带";
275 virtual QCString trExamplesDescription()
276 { return "这里列出了所有示例:"; }
278 virtual QCString trRelatedPagesDescription()
279 { return "这里列出了所有相关页面:"; }
281 virtual QCString trModulesDescription()
282 { return "这里列出了所有模块:"; }
284 virtual QCString trDocumentation()
287 virtual QCString trModuleIndex()
290 virtual QCString trHierarchicalIndex()
293 virtual QCString trCompoundIndex()
295 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
304 virtual QCString trFileIndex()
307 virtual QCString trModuleDocumentation()
310 virtual QCString trClassDocumentation()
312 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
321 virtual QCString trFileDocumentation()
324 virtual QCString trExampleDocumentation()
327 virtual QCString trPageDocumentation()
330 virtual QCString trReferenceManual()
333 virtual QCString trDefines()
336 virtual QCString trTypedefs()
339 virtual QCString trEnumerations()
342 virtual QCString trFunctions()
345 virtual QCString trVariables()
348 virtual QCString trEnumerationValues()
352 virtual QCString trDefineDocumentation()
355 virtual QCString trTypedefDocumentation()
358 virtual QCString trEnumerationTypeDocumentation()
361 virtual QCString trFunctionDocumentation()
364 virtual QCString trVariableDocumentation()
367 virtual QCString trCompounds()
369 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
378 virtual QCString trGeneratedAt(const char *date,const char *projName)
379 { QCString result=(QCString)"生成于" CN_SPC+date;
380 if (projName) result+=(QCString)CN_SPC ", 为" CN_SPC+projName;
381 result+=(QCString)"使用" CN_SPC;
385 virtual QCString trClassDiagram(const char *clName)
387 return (QCString)"类" CN_SPC+clName+CN_SPC "继承关系图:";
390 virtual QCString trForInternalUseOnly()
391 { return "仅限内部使用."; }
393 virtual QCString trWarning()
396 virtual QCString trVersion()
399 virtual QCString trDate()
402 virtual QCString trReturns()
405 virtual QCString trSeeAlso()
408 virtual QCString trParameters()
411 virtual QCString trExceptions()
414 virtual QCString trGeneratedBy()
417 //////////////////////////////////////////////////////////////////////////
418 // new since 0.49-990307
419 //////////////////////////////////////////////////////////////////////////
421 virtual QCString trNamespaceList()
424 virtual QCString trNamespaceListDescription(bool extractAll)
426 QCString result="这里列出了所有";
427 if (!extractAll) result+="文档化的";
428 result+="命名空间定义,附带简要说明:";
432 virtual QCString trFriends()
435 //////////////////////////////////////////////////////////////////////////
436 // new since 0.49-990405
437 //////////////////////////////////////////////////////////////////////////
439 virtual QCString trRelatedFunctionDocumentation()
440 { return "友元及相关函数文档"; }
442 //////////////////////////////////////////////////////////////////////////
443 // new since 0.49-990425
444 //////////////////////////////////////////////////////////////////////////
446 virtual QCString trCompoundReference(const char *clName,
447 ClassDef::CompoundType compType,
449 // used as the title of the HTML page of a class/struct/union
451 QCString result=(QCString)clName;
452 if (isTemplate) result+=CN_SPC "模板";
455 case ClassDef::Class: result+="类"; break;
456 case ClassDef::Struct: result+="结构体"; break;
457 case ClassDef::Union: result+="联合体"; break;
458 case ClassDef::Interface: result+="接口"; break;
459 case ClassDef::Protocol: result+="协议"; break;
460 case ClassDef::Category: result+="分类"; break;
461 case ClassDef::Exception: result+="异常"; break;
468 /*! used as the title of the HTML page of a file */
469 virtual QCString trFileReference(const char *fileName)
471 QCString result=fileName;
472 result+=CN_SPC "文件参考";
476 /*! used as the title of the HTML page of a namespace */
477 virtual QCString trNamespaceReference(const char *namespaceName)
478 { QCString result=namespaceName;
479 result+=CN_SPC "命名空间参考";
483 // these are for the member sections of a class, struct or union
484 virtual QCString trPublicMembers()
485 { return "Public 成员函数"; }
487 virtual QCString trPublicSlots()
488 { return "Public 槽"; }
490 virtual QCString trSignals()
493 virtual QCString trStaticPublicMembers()
494 { return "静态 Public 成员函数"; }
496 virtual QCString trProtectedMembers()
497 { return "Protected 成员函数"; }
499 virtual QCString trProtectedSlots()
500 { return "Protected 槽"; }
502 virtual QCString trStaticProtectedMembers()
503 { return "静态 Protected 成员函数"; }
505 virtual QCString trPrivateMembers()
506 { return "Private 成员函数"; }
508 virtual QCString trPrivateSlots()
509 { return "Private 槽"; }
511 virtual QCString trStaticPrivateMembers()
512 { return "静态 Private 成员函数"; }
514 // end of member sections
515 virtual QCString trWriteList(int numEntries)
517 // this function is used to produce a comma-separated list of items.
518 // use generateMarker(i) to indicate where item i should be put.
521 // the inherits list contain `numEntries' classes
522 for (i=0;i<numEntries;i++)
524 // use generateMarker to generate placeholders for the class links!
525 result+=generateMarker(i); // generate marker for entry i in the list
526 // (order is left to right)
528 if (i!=numEntries-1) // not the last entry, so we need a separator
530 if (i<numEntries-2) // not the fore last entry
532 else // the fore last entry
533 result+=CN_SPC ", 以及" CN_SPC;
539 /*! used in class documentation to produce a list of base classes,
540 * if class diagrams are disabled.
542 virtual QCString trInheritsList(int numEntries)
543 { return "继承自" CN_SPC+trWriteList(numEntries)+CN_SPC "."; }
545 /*! used in class documentation to produce a list of super classes,
546 * if class diagrams are disabled.
548 virtual QCString trInheritedByList(int numEntries)
550 return "被" CN_SPC+trWriteList(numEntries)+CN_SPC "继承.";
553 /*! used in member documentation blocks to produce a list of
554 * members that are hidden by this one.
556 virtual QCString trReimplementedFromList(int numEntries)
558 return "重载" CN_SPC+trWriteList(numEntries)+CN_SPC ".";
561 /*! used in member documentation blocks to produce a list of
562 * all member that overwrite the implementation of this member.
564 virtual QCString trReimplementedInList(int numEntries)
566 return "被" CN_SPC+trWriteList(numEntries)+CN_SPC "重载.";
569 /*! This is put above each page as a link to all members of namespaces. */
570 virtual QCString trNamespaceMembers()
573 /*! This is an introduction to the page with all namespace members */
574 virtual QCString trNamespaceMemberDescription(bool extractAll)
576 QCString result="这里列出了所有";
577 if (!extractAll) result+="文档化的";
578 result+="命名空间成员,并附带";
586 /*! This is used in LaTeX as the title of the chapter with the
587 * index of all namespaces.
589 virtual QCString trNamespaceIndex()
592 /*! This is used in LaTeX as the title of the chapter containing
593 * the documentation of all namespaces.
595 virtual QCString trNamespaceDocumentation()
598 //////////////////////////////////////////////////////////////////////////
599 // new since 0.49-990522
600 //////////////////////////////////////////////////////////////////////////
602 /*! This is used in the documentation before the list of all
603 * namespaces in a file.
605 virtual QCString trNamespaces()
610 //////////////////////////////////////////////////////////////////////////
611 // new since 0.49-990728
612 //////////////////////////////////////////////////////////////////////////
614 /*! This is put at the bottom of a class documentation page and is
615 * followed by a list of files that were used to generate the page.
617 virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
619 { // here s is one of " Class", " Struct" or " Union"
620 // single is true implies a single file
621 QCString result=(QCString)"该";
624 case ClassDef::Class: result+="类"; break;
625 case ClassDef::Struct: result+="结构体"; break;
626 case ClassDef::Union: result+="联合体"; break;
627 case ClassDef::Interface: result+="接口"; break;
628 case ClassDef::Protocol: result+="协议"; break;
629 case ClassDef::Category: result+="分类"; break;
630 case ClassDef::Exception: result+="异常"; break;
633 result+="的文档由以下文件生成:";
637 //////////////////////////////////////////////////////////////////////////
638 // new since 0.49-990901
639 //////////////////////////////////////////////////////////////////////////
641 /*! This is used as the heading text for the retval command. */
642 virtual QCString trReturnValues()
645 /*! This is in the (quick) index as a link to the main page (index.html)
647 virtual QCString trMainPage()
650 /*! This is used in references to page that are put in the LaTeX
651 * documentation. It should be an abbreviation of the word page.
653 virtual QCString trPageAbbreviation()
656 //////////////////////////////////////////////////////////////////////////
657 // new since 0.49-991106
658 //////////////////////////////////////////////////////////////////////////
660 virtual QCString trDefinedAtLineInSourceFile()
662 return "在文件" CN_SPC "@1" CN_SPC "第" CN_SPC "@0" CN_SPC "行定义.";
665 virtual QCString trDefinedInSourceFile()
667 return "在文件" CN_SPC "@0" CN_SPC "中定义.";
670 //////////////////////////////////////////////////////////////////////////
671 // new since 0.49-991205
672 //////////////////////////////////////////////////////////////////////////
674 virtual QCString trDeprecated()
679 //////////////////////////////////////////////////////////////////////////
681 //////////////////////////////////////////////////////////////////////////
683 /*! this text is put before a collaboration diagram */
684 virtual QCString trCollaborationDiagram(const char *clName)
686 return (QCString)clName+CN_SPC "的协作图:";
689 /*! this text is put before an include dependency graph */
690 virtual QCString trInclDepGraph(const char *fName)
692 return (QCString)fName+CN_SPC "的引用(Include)关系图:";
695 /*! header that is put before the list of constructor/destructors. */
696 virtual QCString trConstructorDocumentation()
701 /*! Used in the file documentation to point to the corresponding sources. */
702 virtual QCString trGotoSourceCode()
707 /*! Used in the file sources to point to the corresponding documentation. */
708 virtual QCString trGotoDocumentation()
713 /*! Text for the \\pre command */
714 virtual QCString trPrecondition()
719 /*! Text for the \\post command */
720 virtual QCString trPostcondition()
725 /*! Text for the \\invariant command */
726 virtual QCString trInvariant()
731 /*! Text shown before a multi-line variable/enum initialization */
732 virtual QCString trInitialValue()
737 /*! Text used the source code in the file index */
738 virtual QCString trCode()
743 virtual QCString trGraphicalHierarchy()
748 virtual QCString trGotoGraphicalHierarchy()
753 virtual QCString trGotoTextualHierarchy()
758 virtual QCString trPageIndex()
763 //////////////////////////////////////////////////////////////////////////
765 //////////////////////////////////////////////////////////////////////////
767 virtual QCString trNote()
772 virtual QCString trPublicTypes()
777 virtual QCString trPublicAttribs()
779 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
788 virtual QCString trStaticPublicAttribs()
790 return "静态 Public 属性";
793 virtual QCString trProtectedTypes()
795 return "Protected 类型";
798 virtual QCString trProtectedAttribs()
800 return "Protected 属性";
803 virtual QCString trStaticProtectedAttribs()
805 return "静态 Protected 属性";
808 virtual QCString trPrivateTypes()
813 virtual QCString trPrivateAttribs()
818 virtual QCString trStaticPrivateAttribs()
820 return "静态 Private 属性";
824 //////////////////////////////////////////////////////////////////////////
826 //////////////////////////////////////////////////////////////////////////
828 /*! Used as a marker that is put before a todo item */
829 virtual QCString trTodo()
834 /*! Used as the header of the todo list */
835 virtual QCString trTodoList()
840 //////////////////////////////////////////////////////////////////////////
842 //////////////////////////////////////////////////////////////////////////
844 virtual QCString trReferencedBy()
849 virtual QCString trRemarks()
854 virtual QCString trAttention()
859 virtual QCString trInclByDepGraph()
861 return "此图展示该文件直接或间接的被哪些文件引用了:";
864 virtual QCString trSince()
869 //////////////////////////////////////////////////////////////////////////
871 //////////////////////////////////////////////////////////////////////////
873 /*! title of the graph legend page */
874 virtual QCString trLegendTitle()
879 /*! page explaining how the dot graph's should be interpreted */
880 virtual QCString trLegendDocs()
882 return "本页将向您解释如何理解由" CN_SPC "doxygen" CN_SPC "生成的图.<p>\n"
885 "/*! 由于截断而使 Invisible 不可见 */\n"
886 "class Invisible { };\n\n"
887 "/*! Truncated 的继承关系将被隐藏 */\n"
888 "class Truncated : public Invisible { };\n\n"
889 "/* 没有被doxygen文档化的类 */\n"
890 "class Undocumented { };\n\n"
891 "/*! public 继承关系的类 */\n"
892 "class PublicBase : public Truncated { };\n\n"
894 "template<class T> class Templ { };\n\n"
895 "/*! protected 继承关系的类 */\n"
896 "class ProtectedBase { };\n\n"
897 "/*! private 继承关系的类 */\n"
898 "class PrivateBase { };\n\n"
899 "/*! 被 Inherited 使用的类 */\n"
900 "class Used { };\n\n"
901 "/*! 继承自其它若干类的超级类 */\n"
902 "class Inherited : public PublicBase,\n"
903 " protected ProtectedBase,\n"
904 " private PrivateBase,\n"
905 " public Undocumented,\n"
906 " public Templ<int>\n"
909 " Used *m_usedClass;\n"
913 "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
918 "<li>%灰色填充的矩形 表示上图是由该结构体或类生成.</li>\n"
919 "<li>%黑色边框的矩形 表示已经被文档化的结构体或类.</li>\n"
920 "<li>%灰色边框的矩形 表示未被文档化的结构体或类.</li>\n"
921 "<li>%红色边框的矩形 表示该结构体或类的关系没有被完全显示."
922 "%如果生成的图不能调整到制定的尺寸,有一些关系就会被截断而不显示出来.</li>\n"
928 "<li>%深蓝色的箭头被用于展示 public 的继承关系.</li>\n"
929 "<li>%深绿色的箭头表示 protected 的继承关系.</li>\n"
930 "<li>%深红色的箭头说明了是 privated 的继承关系.</li>\n"
931 "<li>%紫色虚线箭头用来表示两个类之间的聚合关系. 被箭头指向的类的类型的变量,可以通过箭头旁标明的变量去访问.</li>\n"
932 "<li>%黄色虚线箭头表示模板类实例和模板类之间的关系. 箭头旁边标明了模板类实例化的参数.</li>\n"
936 /*! text for the link to the legend page */
937 virtual QCString trLegend()
942 //////////////////////////////////////////////////////////////////////////
944 //////////////////////////////////////////////////////////////////////////
946 /*! Used as a marker that is put before a test item */
947 virtual QCString trTest()
952 /*! Used as the header of the test list */
953 virtual QCString trTestList()
958 //////////////////////////////////////////////////////////////////////////
960 ////////////////////////////////////////////////////////////////////////////
962 /*! Used as a section header for IDL properties */
963 virtual QCString trProperties()
968 /*! Used as a section header for IDL property documentation */
969 virtual QCString trPropertyDocumentation()
974 //////////////////////////////////////////////////////////////////////////
976 //////////////////////////////////////////////////////////////////////////
978 /*! Used for Java classes in the summary section of Java packages */
979 virtual QCString trClasses()
981 if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
991 /*! Used as the title of a Java package */
992 virtual QCString trPackage(const char *name)
994 return (QCString)"包" CN_SPC+name;
997 /*! Title of the package index page */
998 virtual QCString trPackageList()
1003 /*! The description of the package index page */
1004 virtual QCString trPackageListDescription()
1006 return "这里列出所有的包,附带简要说明(如果有的话):";
1009 /*! The link name in the Quick links header for each page */
1010 virtual QCString trPackages()
1015 /*! Text shown before a multi-line define */
1016 virtual QCString trDefineValue()
1021 ////////////////////////////////////////////////////////////////////////////
1022 //// new since 1.2.6
1023 ////////////////////////////////////////////////////////////////////////////
1024 virtual QCString trBug ()
1029 virtual QCString trBugList ()
1031 return "Bug" CN_SPC "列表";
1034 //////////////////////////////////////////////////////////////////////////
1036 //////////////////////////////////////////////////////////////////////////
1038 /*! Used as ansicpg for RTF file
1040 * The following table shows the correlation of Charset name, Charset Value and
1043 * Charset Name Charset Value(hex) Codepage number
1044 * ------------------------------------------------------
1045 * DEFAULT_CHARSET 1 (x01)
1046 * SYMBOL_CHARSET 2 (x02)
1047 * OEM_CHARSET 255 (xFF)
1048 * ANSI_CHARSET 0 (x00) 1252
1049 * RUSSIAN_CHARSET 204 (xCC) 1251
1050 * EE_CHARSET 238 (xEE) 1250
1051 * GREEK_CHARSET 161 (xA1) 1253
1052 * TURKISH_CHARSET 162 (xA2) 1254
1053 * BALTIC_CHARSET 186 (xBA) 1257
1054 * HEBREW_CHARSET 177 (xB1) 1255
1055 * ARABIC _CHARSET 178 (xB2) 1256
1056 * SHIFTJIS_CHARSET 128 (x80) 932
1057 * HANGEUL_CHARSET 129 (x81) 949
1058 * GB2313_CHARSET 134 (x86) 936
1059 * CHINESEBIG5_CHARSET 136 (x88) 950
1063 virtual QCString trRTFansicp()
1068 /*! Used as ansicpg for RTF fcharset
1069 * \see trRTFansicp() for a table of possible values.
1071 virtual QCString trRTFCharSet()
1077 /*! Used as header RTF general index */
1078 virtual QCString trRTFGeneralIndex()
1084 /*! This is used for translation of the word that will possibly
1085 * be followed by a single name or by a list of names
1088 virtual QCString trClass(bool /*first_capital*/, bool /*singular*/)
1091 QCString result((first_capital ? "Class" : "class"));
1092 if (!singular) result+="es";
1098 /*! This is used for translation of the word that will possibly
1099 * be followed by a single name or by a list of names
1102 virtual QCString trFile(bool /*first_capital*/, bool /*singular*/)
1105 QCString result((first_capital ? "File" : "file"));
1106 if (!singular) result+="s";
1113 /*! This is used for translation of the word that will possibly
1114 * be followed by a single name or by a list of names
1117 virtual QCString trNamespace(bool /*first_capital*/, bool /*singular*/)
1120 QCString result((first_capital ? "Namespace" : "namespace"));
1121 if (!singular) result+="s";
1127 /*! This is used for translation of the word that will possibly
1128 * be followed by a single name or by a list of names
1131 virtual QCString trGroup(bool /*first_capital*/, bool /*singular*/)
1134 QCString result((first_capital ? "Group" : "group"));
1135 if (!singular) result+="s";
1141 /*! This is used for translation of the word that will possibly
1142 * be followed by a single name or by a list of names
1145 virtual QCString trPage(bool /*first_capital*/, bool /*singular*/)
1148 QCString result((first_capital ? "Page" : "page"));
1149 if (!singular) result+="s";
1155 /*! This is used for translation of the word that will possibly
1156 * be followed by a single name or by a list of names
1159 virtual QCString trMember(bool /*first_capital*/, bool /*singular*/)
1162 QCString result((first_capital ? "Member" : "member"));
1163 if (!singular) result+="s";
1169 /*! This is used for translation of the word that will possibly
1170 * be followed by a single name or by a list of names
1173 virtual QCString trGlobal(bool /*first_capital*/, bool /*singular*/)
1176 QCString result((first_capital ? "Global" : "global"));
1177 if (!singular) result+="s";
1183 //////////////////////////////////////////////////////////////////////////
1185 //////////////////////////////////////////////////////////////////////////
1187 /*! This text is generated when the \\author command is used and
1188 * for the author section in man pages. */
1189 virtual QCString trAuthor(bool /*first_capital*/, bool /*singular*/)
1192 QCString result((first_capital ? "Author" : "author"));
1193 if (!singular) result+="s";
1199 //////////////////////////////////////////////////////////////////////////
1201 //////////////////////////////////////////////////////////////////////////
1203 /*! This text is put before the list of members referenced by a member
1205 virtual QCString trReferences()
1210 //////////////////////////////////////////////////////////////////////////
1212 //////////////////////////////////////////////////////////////////////////
1214 /*! used in member documentation blocks to produce a list of
1215 * members that are implemented by this one.
1217 virtual QCString trImplementedFromList(int numEntries)
1219 /* return "Implements "+trWriteList(numEntries)+"."; */
1220 return "实现了" CN_SPC+trWriteList(numEntries)+".";
1223 /*! used in member documentation blocks to produce a list of
1224 * all members that implement this abstract member.
1226 virtual QCString trImplementedInList(int numEntries)
1228 /* return "Implemented in "+trWriteList(numEntries)+"."; */
1229 return "在" CN_SPC+trWriteList(numEntries)+CN_SPC "内被实现.";
1232 //////////////////////////////////////////////////////////////////////////
1234 //////////////////////////////////////////////////////////////////////////
1236 /*! used in RTF documentation as a heading for the Table
1239 virtual QCString trRTFTableOfContents()
1241 /* return "Table of Contents"; */
1245 //////////////////////////////////////////////////////////////////////////
1247 //////////////////////////////////////////////////////////////////////////
1249 /*! Used as the header of the list of item that have been
1250 * flagged deprecated
1252 virtual QCString trDeprecatedList()
1257 //////////////////////////////////////////////////////////////////////////
1259 //////////////////////////////////////////////////////////////////////////
1261 /*! Used as a header for declaration section of the events found in
1264 virtual QCString trEvents()
1269 /*! Header used for the documentation section of a class' events. */
1270 virtual QCString trEventDocumentation()
1275 //////////////////////////////////////////////////////////////////////////
1277 //////////////////////////////////////////////////////////////////////////
1279 /*! Used as a heading for a list of Java class types with package scope.
1281 virtual QCString trPackageTypes()
1286 /*! Used as a heading for a list of Java class functions with package
1289 virtual QCString trPackageMembers()
1294 /*! Used as a heading for a list of static Java class functions with
1297 virtual QCString trStaticPackageMembers()
1302 /*! Used as a heading for a list of Java class variables with package
1305 virtual QCString trPackageAttribs()
1310 /*! Used as a heading for a list of static Java class variables with
1313 virtual QCString trStaticPackageAttribs()
1318 //////////////////////////////////////////////////////////////////////////
1320 //////////////////////////////////////////////////////////////////////////
1322 /*! Used in the quick index of a class/file/namespace member list page
1323 * to link to the unfiltered list of all members.
1325 virtual QCString trAll()
1330 /*! Put in front of the call graph for a function. */
1331 virtual QCString trCallGraph()
1336 //////////////////////////////////////////////////////////////////////////
1338 //////////////////////////////////////////////////////////////////////////
1340 /*! This string is used as the title for the page listing the search
1343 virtual QCString trSearchResultsTitle()
1348 /*! This string is put just before listing the search results. The
1349 * text can be different depending on the number of documents found.
1350 * Inside the text you can put the special marker $num to insert
1351 * the number representing the actual number of search results.
1352 * The @a numDocuments parameter can be either 0, 1 or 2, where the
1353 * value 2 represents 2 or more matches. HTML markup is allowed inside
1354 * the returned string.
1356 virtual QCString trSearchResults(int numDocuments)
1358 if (numDocuments==0)
1360 return "抱歉,未找到与您查询相符的文档.";
1362 else if (numDocuments==1)
1364 return "找到<b>1</b>篇与您查询相符的文档.";
1368 return "找到<b>$num</b>篇与您查询相符的文档."
1372 /*! This string is put before the list of matched words, for each search
1373 * result. What follows is the list of words that matched the query.
1375 virtual QCString trSearchMatches()
1380 //////////////////////////////////////////////////////////////////////////
1382 //////////////////////////////////////////////////////////////////////////
1384 /*! This is used in HTML as the title of page with source code for file filename
1386 virtual QCString trSourceFile(QCString& filename)
1388 /* return filename + " Source File"; */
1389 return filename + CN_SPC "源文件";
1391 //////////////////////////////////////////////////////////////////////////
1393 //////////////////////////////////////////////////////////////////////////
1395 /*! This is used as the name of the chapter containing the directory
1398 virtual QCString trDirIndex()
1403 /*! This is used as the name of the chapter containing the documentation
1404 * of the directories.
1406 virtual QCString trDirDocumentation()
1411 /*! This is used as the title of the directory index and also in the
1412 * Quick links of an HTML page, to link to the directory hierarchy.
1414 virtual QCString trDirectories()
1417 /*! This returns a sentences that introduces the directory hierarchy.
1418 * and the fact that it is sorted alphabetically per level
1420 virtual QCString trDirDescription()
1422 return "此继承关系列表按字典顺序粗略的排序:" CN_SPC;
1425 /*! This returns the title of a directory page. The name of the
1426 * directory is passed via \a dirName.
1428 virtual QCString trDirReference(const char *dirName)
1430 QCString result=dirName;
1431 result+=CN_SPC "目录参考";
1435 /*! This returns the word directory with or without starting capital
1436 * (\a first_capital) and in sigular or plural form (\a singular).
1438 virtual QCString trDir(bool /*first_capital*/, bool /*singular*/)
1443 //////////////////////////////////////////////////////////////////////////
1445 //////////////////////////////////////////////////////////////////////////
1447 /*! This text is added to the documentation when the \\overload command
1448 * is used for a overloaded function.
1450 virtual QCString trOverloadText()
1452 return "这是为便于使用而提供的一个重载成员函数."
1453 "与上面的函数相比,它接受不同类型的参数.";
1456 //////////////////////////////////////////////////////////////////////////
1458 //////////////////////////////////////////////////////////////////////////
1460 /*! This is used to introduce a caller (or called-by) graph */
1461 virtual QCString trCallerGraph()
1463 return "这是这个函数的调用关系图:";
1466 /*! This is used in the documentation of a file/namespace before the list
1467 * of documentation blocks for enumeration values
1469 virtual QCString trEnumerationValueDocumentation()
1474 //////////////////////////////////////////////////////////////////////////
1475 // new since 1.5.4 (mainly for Fortran)
1476 //////////////////////////////////////////////////////////////////////////
1478 /*! header that is put before the list of member subprograms (Fortran). */
1479 virtual QCString trMemberFunctionDocumentationFortran()
1480 { return "成员函数/子程序说明"; }
1482 /*! This is put above each page as a link to the list of annotated data types (Fortran). */
1483 virtual QCString trCompoundListFortran()
1484 { return "数据类型列表"; }
1486 /*! This is put above each page as a link to all members of compounds (Fortran). */
1487 virtual QCString trCompoundMembersFortran()
1490 /*! This is an introduction to the annotated compound list (Fortran). */
1491 virtual QCString trCompoundListDescriptionFortran()
1492 { return "带简要描述的数据类型列表:"; }
1494 /*! This is an introduction to the page with all data types (Fortran). */
1495 virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
1497 QCString result="这里列出了所有";
1502 result+="数据类型成员,并附带";
1503 //result+=" with links to ";
1515 /*! This is used in LaTeX as the title of the chapter with the
1516 * annotated compound index (Fortran).
1518 virtual QCString trCompoundIndexFortran()
1519 { return "数据类型索引"; }
1522 /*! This is used in LaTeX as the title of the chapter containing
1523 * the documentation of all data types (Fortran).
1525 virtual QCString trTypeDocumentation()
1526 { return "数据类型文档"; }
1528 /*! This is used in the documentation of a file as a header before the
1529 * list of (global) subprograms (Fortran).
1531 virtual QCString trSubprograms()
1532 { return "函数/子程序"; }
1534 /*! This is used in the documentation of a file/namespace before the list
1535 * of documentation blocks for subprograms (Fortran)
1537 virtual QCString trSubprogramDocumentation()
1538 { return "函数/子程序说明"; }
1541 /*! This is used in the documentation of a file/namespace/group before
1542 * the list of links to documented compounds (Fortran)
1544 virtual QCString trDataTypes()
1547 /*! used as the title of page containing all the index of all modules (Fortran). */
1548 virtual QCString trModulesList()
1551 /*! used as an introduction to the modules list (Fortran) */
1552 virtual QCString trModulesListDescription(bool extractAll)
1554 QCString result="这里列出了所有";
1555 if (!extractAll) result+="文档化的";
1556 result+="模块,并附带简要说明:";
1560 /*! used as the title of the HTML page of a module/type (Fortran) */
1561 virtual QCString trCompoundReferenceFortran(const char *clName,
1562 ClassDef::CompoundType compType,
1565 QCString result=(QCString)clName;
1568 case ClassDef::Class: result+=CN_SPC "模块"; break;
1569 case ClassDef::Struct: result+=CN_SPC "类型"; break;
1570 case ClassDef::Union: result+=CN_SPC "联合体"; break;
1571 case ClassDef::Interface: result+=CN_SPC "接口"; break;
1572 case ClassDef::Protocol: result+=CN_SPC "协议"; break;
1573 case ClassDef::Category: result+=CN_SPC "目录"; break;
1574 case ClassDef::Exception: result+=CN_SPC "异常"; break;
1577 if (isTemplate) result+="模板" CN_SPC;
1582 /*! used as the title of the HTML page of a module (Fortran) */
1583 virtual QCString trModuleReference(const char *namespaceName)
1585 QCString result=namespaceName;
1586 result += CN_SPC "模块参考手册";
1590 /*! This is put above each page as a link to all members of modules. (Fortran) */
1591 virtual QCString trModulesMembers()
1594 /*! This is an introduction to the page with all modules members (Fortran) */
1595 virtual QCString trModulesMemberDescription(bool extractAll)
1597 // QCString result="Here is a list of all ";
1598 // if (!extractAll) result+="documented ";
1599 // result+="module members with links to ";
1602 // result+="the module documentation for each member:";
1606 // result+="the modules they belong to:";
1610 return "这里是有文档的模块成员列表,含有到每个成员所在模块的文档的链接:";
1612 return "这里是模块成员列表,含有到成员所属的模块的链接:";
1616 /*! This is used in LaTeX as the title of the chapter with the
1617 * index of all modules (Fortran).
1619 virtual QCString trModulesIndex()
1620 // { return "Modules Index"; }
1623 /*! This is used for translation of the word that will possibly
1624 * be followed by a single name or by a list of names
1627 virtual QCString trModule(bool, bool)
1629 // QCString result((first_capital ? "Module" : "module"));
1630 // if (!singular) result+="s";
1634 /*! This is put at the bottom of a module documentation page and is
1635 * followed by a list of files that were used to generate the page.
1637 virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType,
1640 QCString result="该";
1643 case ClassDef::Class: result+=CN_SPC "模块"; break;
1644 case ClassDef::Struct: result+=CN_SPC "结构体"; break;
1645 case ClassDef::Union: result+=CN_SPC "联合体"; break;
1646 case ClassDef::Interface: result+=CN_SPC "接口"; break;
1647 case ClassDef::Protocol: result+=CN_SPC "协议"; break;
1648 case ClassDef::Category: result+=CN_SPC "目录"; break;
1649 case ClassDef::Exception: result+=CN_SPC "异常"; break;
1652 result+=CN_SPC "的文档由以下文件生成:";
1656 /*! This is used for translation of the word that will possibly
1657 * be followed by a single name or by a list of names
1660 virtual QCString trType(bool, bool)
1665 /*! This is used for translation of the word that will possibly
1666 * be followed by a single name or by a list of names
1669 virtual QCString trSubprogram(bool, bool)
1674 /*! C# Type Constraint list */
1675 virtual QCString trTypeConstraints()
1680 //////////////////////////////////////////////////////////////////////////
1682 //////////////////////////////////////////////////////////////////////////
1683 virtual QCString trDirRelation(const char *name)
1685 // return QCString(name)+" Relation";
1687 return QCString(name)+CN_SPC "关系";
1690 virtual QCString trLoading()
1695 virtual QCString trGlobalNamespace()
1700 virtual QCString trSearching()
1705 virtual QCString trNoMatches()
1710 //////////////////////////////////////////////////////////////////////////
1712 //////////////////////////////////////////////////////////////////////////
1714 virtual QCString trFileIn(const char *name)
1716 return (QCString)"文件在"+CN_SPC+name;
1719 virtual QCString trIncludesFileIn(const char *name)
1721 return (QCString)"在" CN_SPC+name+CN_SPC "中引用";
1724 virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
1725 int hour,int minutes,int seconds,
1728 static const char *days[] = { "一","二","三","四","五","六","日" };
1729 static const char *months[] = { "一","二","三","四","五","六","七","八","九","十","十一","十二" };
1733 sdate.sprintf("%d年" CN_SPC "%s月" CN_SPC "%d日" CN_SPC "星期%s",year, months[month-1], day, days[dayOfWeek-1]);
1738 stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
1744 //////////////////////////////////////////////////////////////////////////
1746 //////////////////////////////////////////////////////////////////////////
1748 /*! Header for the page with bibliographic citations */
1749 virtual QCString trCiteReferences()
1752 /*! Text for copyright paragraph */
1753 virtual QCString trCopyright()
1756 /*! Header for the graph showing the directory dependencies */
1757 virtual QCString trDirDepGraph(const char *name)
1759 return QCString(name)+CN_SPC "的目录依赖关系图";
1762 //////////////////////////////////////////////////////////////////////////
1764 //////////////////////////////////////////////////////////////////////////
1766 /*! Detail level selector shown for hierarchical indices */
1767 virtual QCString trDetailLevel()
1770 /*! Section header for list of template parameters */
1771 virtual QCString trTemplateParameters()
1774 /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
1775 virtual QCString trAndMore(const QCString &number)
1776 { return "和" CN_SPC+number+CN_SPC "更多..."; }
1778 /*! Used file list for a Java enum */
1779 virtual QCString trEnumGeneratedFromFiles(bool /*single*/)
1780 { return "枚举说明文档从下列文件生成:"; }
1782 /*! Header of a Java enum page (Java enums are represented as classes). */
1783 virtual QCString trEnumReference(const char *name)
1784 { return QCString(name)+CN_SPC "枚举类型参考"; }
1786 /*! Used for a section containing inherited members */
1787 virtual QCString trInheritedFrom(const char *members,const char *what)
1788 { return QCString(members)+CN_SPC "继承自" CN_SPC+what; }
1790 /*! Header of the sections with inherited members specific for the
1793 virtual QCString trAdditionalInheritedMembers()
1794 { return "额外继承的成员函数"; }
1796 //////////////////////////////////////////////////////////////////////////
1798 //////////////////////////////////////////////////////////////////////////
1800 //////////////////////////////////////////////////////////////////////////
1802 /*! Used as a tooltip for the toggle button that appears in the
1803 * navigation tree in the HTML output when GENERATE_TREEVIEW is
1804 * enabled. This tooltip explains the meaning of the button.
1806 virtual QCString trPanelSynchronisationTooltip(bool enable)
1808 QCString opt = enable ? "开启" : "关闭";
1809 return "点击" CN_SPC+opt+CN_SPC "面板同步";
1812 /*! Used in a method of an Objective-C class that is declared in a
1813 * a category. Note that the @1 marker is required and is replaced
1816 virtual QCString trProvidedByCategory()
1818 return "由 category @0 提供.";
1821 /*! Used in a method of an Objective-C category that extends a class.
1822 * Note that the @1 marker is required and is replaced by a link to
1825 virtual QCString trExtendsClass()
1830 /*! Used as the header of a list of class methods in Objective-C.
1831 * These are similar to static public member functions in C++.
1833 virtual QCString trClassMethods()
1838 /*! Used as the header of a list of instance methods in Objective-C.
1839 * These are similar to public member functions in C++.
1841 virtual QCString trInstanceMethods()
1846 /*! Used as the header of the member functions of an Objective-C class.
1848 virtual QCString trMethodDocumentation()
1853 /*! Used as the title of the design overview picture created for the
1856 virtual QCString trDesignOverview()
1861 //////////////////////////////////////////////////////////////////////////
1863 //////////////////////////////////////////////////////////////////////////
1865 /** old style UNO IDL services: implemented interfaces */
1866 virtual QCString trInterfaces()
1869 /** old style UNO IDL services: inherited services */
1870 virtual QCString trServices()
1873 /** UNO IDL constant groups */
1874 virtual QCString trConstantGroups()
1877 /** UNO IDL constant groups */
1878 virtual QCString trConstantGroupReference(const char *namespaceName)
1880 QCString result=namespaceName;
1881 result+= CN_SPC "常量组参考";
1884 /** UNO IDL service page title */
1885 virtual QCString trServiceReference(const char *sName)
1887 QCString result=(QCString)sName;
1888 result+= CN_SPC "服务参考";
1891 /** UNO IDL singleton page title */
1892 virtual QCString trSingletonReference(const char *sName)
1894 QCString result=(QCString)sName;
1895 result+= CN_SPC "单例参考";
1898 /** UNO IDL service page */
1899 virtual QCString trServiceGeneratedFromFiles(bool single)
1901 // single is true implies a single file
1902 return "该服务的文档由下列文件生成:";
1904 /** UNO IDL singleton page */
1905 virtual QCString trSingletonGeneratedFromFiles(bool single)
1907 // single is true implies a single file
1908 return "该单例的文档由下列文件生成:";
1911 //////////////////////////////////////////////////////////////////////////