文档更改iTop如何翻译
由 superadmin 于 2024/12/13, 16:39 最后修改
Summary
Details
- Page properties
-
- Content
-
... ... @@ -75,81 +75,4 @@ 75 75 76 76 这些规则有助于维护和确保翻译的一致性。 77 77 78 - 79 -|=Key syntax|=Purpose|=Example 80 -|Class:<classname>|Translating the **name** of a class|Class:Ticket 81 -|Class:<classname>/Attribute:<fieldname>|Translating a field **label**|Class:Ticket/Attribute:ref 82 -|Class:<classname>/Attribute:<fieldname>/Value:<value>|Translating a **value** of an Enum attribute|Class:UserRequest/Attribute:status/Value:new 83 -|Class:<classname>/Attribute|Formatting the friendlyname **value**. (//see example below//)|‘Class:Person/Name’ ⇒ ‘%2$s %1$s’ 84 - 85 -//Friendlyname 语法//: 在这个示例中 86 - 87 -{{{'Class:Person/Name' \=> '%2$s, %1$s', /\* example: "Christie, Agatha" \*/ 88 -}}} 89 - 90 -* %1$s 对应于Person类的命名XML标签中的第一个字段,因此是 first_name。 91 -* %2$s 对应于Person类的命名XML标签中的第二个字段,因此是 name。 92 - 93 -这允许指定不同的顺序,并且甚至是一些其他字符和分隔符。 94 - 95 -您可以通过以下链接获取有关 friendlyname 的更多信息:[[friendlyname>>url:https://www.itophub.io/wiki/page?do=export_code&id=3_1_0:customization:translation&codeblock=2]]。 96 - 97 - 98 -(% class="box" %) 99 -((( 100 -<classes\> 101 - <class id\="Person"\> 102 - <properties\> 103 - <naming\> 104 - <attributes\> 105 - <attribute id\="first\_name"/> <!~-~- mapped to %1$s ~-~-> 106 - <attribute id\="name"/> <!~-~- mapped to %2$s ~-~-> 107 - </attributes\> 108 - </naming\> 109 -))) 110 - 111 -== 字典关键词的命名约定 == 112 - 113 -新条目的命名应根据其领域和目的,从最不具体的信息开始命名。 114 - 115 -最常用的分隔符是’:’,但也可以找到’/‘和’-’。 116 - 117 -(% class="box" %) 118 -((( 119 -'Core:BulkExport:TextFormat' \=> 'Text fields containing some HTML markup', 120 -'UI:CSVImport:TextQualifierCharacter' \=> 'Text qualifier character', 121 -'DayOfWeek-Sunday-Min' \=> 'Su', 122 -))) 123 - 124 - 125 -使用后缀来定义相同标签的变种: 126 - 127 -* + 表示短描述(通常显示在工具提示中) 128 -* ? 表示帮助/解释(可以跨多行) 129 - 130 -(% class="box" %) 131 -((( 132 -'Core:SynchroAtt:update' \=> 'Update ?', 133 -'Core:SynchroAtt:update+' \=> 'Used to update the object', 134 -'UI:CSVImport:AdvancedMode' \=> 'Advanced mode', 135 -'UI:CSVImport:AdvancedMode+' \=> 136 - 'In advanced mode the "id" (primary key) of the objects can be used to update and rename objects.' 137 - .'However the column "id" (if present) can only be used as a search criteria' 138 - .' and can not be combined with any other search criteria.', 139 -))) 140 - 141 -当建立了命名约定后,标识符应该指定为 :,就像以下示例中的方式: 142 - 143 -(% class="box" %) 144 -((( 145 -'Class:Event/Attribute:date' \=> 'Date', 146 -'Class:Event/Attribute:date+' \=> 'date and time at which the changes have been recorded', 147 -))) 148 - 149 -请注意,在这种情况下,分隔符应该是 ‘/’。 150 - 151 -==== 枚举值 ==== 152 - 153 -枚举或枚举集的值使用自己的语法: 154 - 155 155