From version < 11.1 >
edited by superadmin
on 2024/12/12, 21:39
To version < 19.1 >
edited by superadmin
on 2024/12/13, 16:38
< >
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -57,6 +57,10 @@
57 57  * Dict::Add 函数的行在所有相同语言的字典文件中必须相同(是的,这里有冗余信息)。
58 58  * 请注意某些字符串末尾的 ~~~~。这个后缀不会显示给最终用户。它由Combodo在发布新版本时添加,用于显示哪些新字符串需要翻译。
59 59  
60 +== ==
61 +
62 +== ==
63 +
60 60  == 一些通用规则 ==
61 61  
62 62  一些通用规则:
... ... @@ -108,6 +108,10 @@
108 108   </naming\>
109 109  )))
110 110  
115 +== ==
116 +
117 +== ==
118 +
111 111  == 字典关键词的命名约定 ==
112 112  
113 113  新条目的命名应根据其领域和目的,从最不具体的信息开始命名。
... ... @@ -150,6 +150,9 @@
150 150  
151 151  ==== ====
152 152  
161 +(% class="wikigeneratedid" %)
162 +==== ====
163 +
153 153  ==== 枚举值 ====
154 154  
155 155  枚举或枚举集的值使用自己的语法:
... ... @@ -164,6 +164,11 @@
164 164   'Class:Action/Attribute:status/Value:disabled+' \=> 'Action is not effective',
165 165  )))
166 166  
178 +==== ====
179 +
180 +(% class="wikigeneratedid" %)
181 +==== ====
182 +
167 167  ==== 实体覆盖 ====
168 168  
169 169  子类可以覆盖属性(或值)的标签/工具提示,即使该属性已在其父类之一中定义。
... ... @@ -176,6 +176,11 @@
176 176   'Class:ActionEmail/Attribute:test\_recipient'           \=> 'Test recipient',
177 177  )))
178 178  
195 +=== ===
196 +
197 +(% class="wikigeneratedid" %)
198 +=== ===
199 +
179 179  === 关系 ===
180 180  
181 181  默认链接相关的操作/图标工具提示、弹出窗口标题和确认消息如下所示。
... ... @@ -183,6 +183,9 @@
183 183  它们可以根据需要进行自定义,甚至可以根据类别/关联设置属性进行定制化(请参阅下文)。
184 184  
185 185  
207 +(% class="wikigeneratedid" %)
208 +==== ====
209 +
186 186  ==== 1:n 关系 ====
187 187  
188 188  |=通用字典条目代码|=用途|=英文|=法文
... ... @@ -197,6 +197,9 @@
197 197  |UI:Links:Delete:Modal:Title|**子对象删除**弹出窗口标题|Delete a %4$s|Supprimer un(e) %4$s
198 198  |UI:Links:Delete:Modal:Message|**子对象删除**的确认消息|Do you really want to delete %5$s?|Voulez vous vraiment supprimer %5$s?
199 199  
224 +(% class="wikigeneratedid" %)
225 +==== ====
226 +
200 200  ==== n:n 关系 ====
201 201  
202 202  |=通用字典条目代码|=用途|=英文|=法文
... ... @@ -208,6 +208,8 @@
208 208  |UI:Links:Remove:Modal:Title|**链接删除**弹出窗口标题|Remove %4$s|Retirer un %4$s
209 209  |UI:Links:Remove:Modal:Message|**链接删除**的确认消息|Do you really want to remove %5$s from %2$s?|Voulez vous vraiment retirer %5$s de %2$s?
210 210  
238 +===== =====
239 +
211 211  ===== **占位符** =====
212 212  
213 213  
... ... @@ -217,6 +217,89 @@
217 217  * **$%4s**: 远程对象类名称(本地化)
218 218  * **$%5s**: 远程对象友好名称 注意:并非所有情况下都可用,需要检查!
219 219  
249 +===== =====
220 220  
251 +===== =====
221 221  
253 +===== Specialized =====
254 +
255 +除非为给定类的特定LinkedSet(或LinkedSetIndirect)属性定义了更具体的条目,否则使用上面的通用条目代码。
256 +
257 +以下是考虑法语中类别属性的覆盖逻辑示例:
258 +
259 +(% class="box" %)
260 +(((
261 +Dict::Add('FR FR', 'French', 'Français', [array](http:~/~/www.php.net/array)(
262 + 'Class:Person/Attribute:team\_list/UI:Links:Add:Button+'         \=> 'Ajouter une %4$s',
263 + 'Class:Person/Attribute:team\_list/UI:Links:Add:Modal:Title'     \=> 'Ajouter une %4$s à %2$s',
264 + 'Class:Person/Attribute:team\_list/UI:Links:Remove:Button+'      \=> 'Retirer cette %4$s',
265 + 'Class:Person/Attribute:team\_list/UI:Links:Remove:Modal:Title'  \=> 'Retirer une %4$s',
266 + 'Class:Team/Attribute:persons\_list/UI:Links:Add:Button+'        \=> 'Ajouter une %4$s',
267 + 'Class:Team/Attribute:persons\_list/UI:Links:Add:Modal:Title'    \=> 'Ajouter une %4$s à %2$s',
268 + 'Class:Team/Attribute:persons\_list/UI:Links:Remove:Button+'     \=> 'Retirer cette %4$s',
269 + 'Class:Team/Attribute:persons\_list/UI:Links:Remove:Modal:Title' \=> 'Retirer une %4$s'
270 +));
271 +)))
272 +
273 +
274 +
275 +=== 最终用户门户 ===
276 +
277 +如果您添加了一个新的终端用户门户,您可能希望创建一个字典条目,以便为其创建一个真实的标签,要做到这一点,请按照以下语法进行操作:
278 +
279 +(% class="box" %)
280 +(((
281 +~/~/ Default portal
282 +'portal:itop-portal' \=> 'Standard portal',
283 +'portal:<YOUR\_PORTAIL\_ID>' \=> 'Your new portal label',
284 +)))
285 +
286 +=== ===
287 +
288 +=== UI 主题 ===
289 +
290 +如果您为后台创建了一个新主题,您可能希望创建一个字典条目,以便用户在首选项页面中选择它时能够获得一个漂亮的标签。要做到这一点,请按照以下语法进行操作:
291 +
292 +(% class="box" %)
293 +(((
294 +~/~/ Default theme
295 +'theme:fullmoon' \=> 'Full Moon ',
296 +'theme:<YOUR\_THEME\_ID>' \=> 'Your new theme label',
297 +)))
298 +
299 +
300 +== 如何贡献改进现有语言 ==
301 +
302 +要改进现有语言,您需要执行以下步骤:
303 +
304 +1. 从[[iTop主存储库>>url:https://github.com/Combodo/iTop]]或相关的模块存储库创建一个分支(Fork)。
305 +1. 在您的分支上进行修改,并按需改进现有语言的翻译。
306 +1. 提交拉取请求(Pull Request):有关详细的提交步骤,请查看您正在修改的存储库中的CONTRIBUTING.md文件。GitHub的帮助页面也提供了关于[[从分支创建拉取请求>>url:https://help.github.com/articles/creating-a-pull-request-from-a-fork/]]的详细信息。
307 +
308 +**为现有语言添加翻译**:使用 grep 命令查找包含 ~~~~ 的文本,并在原地进行翻译。
309 +
310 +
311 +(% class="box successmessage" %)
312 +(((
313 + 以下是在Linux命令行中查找包含 ~~~~ 标记的德语(de)字典条目的快速命令:
314 +find -name "de*dict*.php" | grep -v "env-" | xargs grep "~~~~"
315 +要查找其他语言的字典条目,只需将命令中的 de* 更改为您想处理的语言代码(例如fr、it、sp等),然后从安装iTop的目录运行此命令。这将帮助您找到包含 ~~~~ 标记的文本行,以便进行翻译。
316 +)))
317 +
318 +**为新语言添加翻译**:首先找到您的语言代码和国家代码。然后将英语文件(dictionary.*.php或en.dict.*.php)复制到相应的目录中,并使用相关的前缀(例如,pt_br.dict…)。然后对这些文件进行翻译。
319 +
320 +
321 +(% class="box warningmessage" %)
322 +(((
323 +不要忘记修改 Dict::Add 函数调用的参数。如果不这样做,将在运行时用您的翻译覆盖英语文本。
324 +)))
325 +
326 +提交的拉取请求将由Combodo的维护人员进行分析,并最终合并到原始存储库中。
327 +
328 +----
329 +
330 +原文:[[https:~~/~~/www.itophub.io/wiki/page?id=3_1_0:customization:translation>>url:https://www.itophub.io/wiki/page?id=3_1_0:customization:translation]]
331 +
332 +版本:3_1_0/customization/translation.txt · Last modified: 2023/07/21 10:19 (external edit)
333 +
222 222  
深圳市艾拓先锋企业管理咨询有限公司