|
文件扩展名 |
.properties |
|
API 扩展 |
mozilla_properties |
|
导入 |
是 |
|
导出 |
是 |
|
复数形式支持 |
否 |
|
描述支持 |
否 |
|
格式选项 当文件上传和/或下载时,可以指定这些选项。根据上传/下载方法(API、CLI、Repo sync 等),它们可以在查询参数 |
escape_single_quotes: true, omit_separator_space: false, crlf_line_terminators: false, escape_meta_chars: true |
Mozilla Localization 使用 .properties 文件。这些键的语法和要求与标准的 Java properties 文件基本相同。
在翻译前执行完整性检查,包括删除重复键(特别是对于较大的文件)并使用正确的换行符(文本 Strings 中的任何换行符都应以 \\n 开头,否则解析器将忽略它)。
代码示例
boolean_key = --- true\n empty_string_translation = # 这是此键的精彩描述! key_with_description = Check it out!This key has a description!(At least in some formats) key_with_line-break = This translations contains\na line-break. nested.deeply.key = I'm a deeply nested key. nested.key = This key is nested inside a namespace. null_translation = pluralized_key.one = Only one kitten found. pluralized_key.other = Wow, you have %s kittens! pluralized_key.zero = You have no kitten. sample_collection = ---\n- first item\n- second item\n- third item\n simple_key = Simple key, simple message, so simple. 未验证_键 = 此翻译尚未经过验证,正在等待验证。(在某些格式中,我们也会导出此状态)