1.2.2 • Published 8 years ago

fis3-parser-po v1.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

fis3-parser-po

将po文件转为json,使用pofile进行转换

使用配置

fis.set('project.fileType.text', 'po');

// 处理语言文件*.po
fis.match('src/**.po', {
  rExt: 'json', // 如果module为true,则应该是js
  parser: fis.plugin('po', {}, {
    // confs
  })
});

// 默认配置,可以通过配置来调整生成的json的大小和格式
defConf = {
  // 配置po的全局属性
  global: {
    comments: false,
    headers: false
  },
  // 配置item
  item: {
    comments: true,
    msgstr: true,
    msgctxt: true,
    msgid_plural: false,
    references: false,
    comments: false,
    extractedComments: false,
    flags: false
  },
  // 格式
  format: {
    space: '  '
  },
  ext: {
    // 是否打包成模块
    module: true
  }
};

关于详细的配置属性请参考:pofile

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago