Alfresco Messages 约定
Alfresco Messages conventions
我知道 Alfresco 在“.properties”文件中为 UI 存储消息和 i18n 标签,
我想知道编写这些文件的 Alfresco 约定是什么
那些key怎么写比较好?
写 form.form-id.title=myTitle
是正确的还是我应该使用其他约定?
您是否使用其他前缀,例如命名空间 (myc.form.form-id.title=myTitle
)
感谢大家
确实,如果您想在自定义窗体的属性文件中设置标签,则必须保持 Alfresco 标准。请参阅 tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml 中的评论:
If a type has been specified without a title element in the content model, or you need to support multiple languages, then an i18n file is needed on the Repo AMP/JAR extension side for the type to be visible when creating rules:
custom_customModel.type.custom_mytype.title=My SubType
Used by the "Change Type" action. For the type to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension:
type.custom_mytype=My SubType
但是如果您在自定义 Java 代码和 spring bean 中定义自己的属性,也许您可以继续为必须配置您的属性的用户或管理系统选择最全面的名称.
为了回答你的问题,我不知道这些新属性的任何标准。
希望对您有所帮助
我知道 Alfresco 在“.properties”文件中为 UI 存储消息和 i18n 标签, 我想知道编写这些文件的 Alfresco 约定是什么
那些key怎么写比较好?
写 form.form-id.title=myTitle
是正确的还是我应该使用其他约定?
您是否使用其他前缀,例如命名空间 (myc.form.form-id.title=myTitle
)
感谢大家
确实,如果您想在自定义窗体的属性文件中设置标签,则必须保持 Alfresco 标准。请参阅 tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml 中的评论:
If a type has been specified without a title element in the content model, or you need to support multiple languages, then an i18n file is needed on the Repo AMP/JAR extension side for the type to be visible when creating rules:
custom_customModel.type.custom_mytype.title=My SubType
Used by the "Change Type" action. For the type to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension:
type.custom_mytype=My SubType
但是如果您在自定义 Java 代码和 spring bean 中定义自己的属性,也许您可以继续为必须配置您的属性的用户或管理系统选择最全面的名称. 为了回答你的问题,我不知道这些新属性的任何标准。
希望对您有所帮助