How to use the @freesewing/i18n.strings function in @freesewing/i18n

To help you get started, we’ve selected a few @freesewing/i18n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github freesewing / freesewing / packages / create-freesewing-pattern / lib / cli.js View on Github external
#!/usr/bin/env node
"use strict";

const path = require("path");
const chalk = require("chalk");
const program = require("commander");
const strings = require("@freesewing/i18n").strings;
const { version } = require("../package");

const getDefaultLibraryParams = require("./get-default-library-params");
const createLibrary = require("./create-library");
const promptLibraryParams = require("./prompt-library-params");

module.exports = async () => {
  const defaults = await getDefaultLibraryParams();

  program
    .name("create-freesewing-pattern")
    .version(version)
    .usage("[options] [package-name]")
    .option("-d, --desc ", "package description")
    .option("-a, --author ", "author's github handle", defaults.author)
    .option("-l, --license ", "package license", defaults.license)
github freesewing / freesewing / packages / create-freesewing-pattern / lib / prompt-library-params.js View on Github external
"use strict";

const inquirer = require("inquirer");
const validateNpmName = require("validate-npm-package-name");
const languages = require("@freesewing/i18n").languages;
const strings = require("@freesewing/i18n").strings;
const config = require("./config");

let languageChoices = [];
for (let l of Object.keys(languages)) {
  languageChoices.push({
    name: languages[l],
    value: l,
    short: languages[l]
  });
}

module.exports = async opts => {
  if (opts.name && !validateNpmName(opts.name).validForNewPackages) {
    throw new Error(`invalid package name "${opts.name}"`);
  }

@freesewing/i18n

Translations for the FreeSewing project

MIT
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis