Nitrogenous Polymorphic Molecule

npm

Need private packages and team management tools?Check out npm Orgs. »

xgettext-unity

1.0.2 • Public • Published

xgettext-unity

NPM version Build Status Code Coverage Project license

About

Extract translation strings from Unity YAML files and generate POT files with them.

Usage

xgettextUnity(inputFiles, variables, outputFile);
  • inputFiles: the list of Unity files to extract
  • variables: which YAML variables to look for in the Unity files
  • outputFile: the output POT file (will be overwritten)

Example

Basic

var xgettextUnity = require("xgettext-unity").default;
 
var inputFiles = ["Assets/Scenes/SampleScene.unity", "Assets/Scenes/MainMenu.unity"];
var outputFile = "Assets/Localization/template.pot";
xgettextUnity(inputFiles, ["m_text"], outputFile);

With glob

var glob = require("glob");
var xgettextUnity = require("xgettext-unity").default;
 
var inputFiles = glob.sync("Assets/**/*.{unity,prefab}");
var outputFile = "Assets/Localization/template.pot";
xgettextUnity(inputFiles, ["m_text"], outputFile);

Authors

License

The program is licensed under the Apache License 2.0.

Building

npm install
npm run check
npm run build
npm run test

install

npm i xgettext-unity

Downloadsweekly downloads

6

version

1.0.2

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability