1.9.42 • Published 4 years ago

csv-to-resx v1.9.42

Weekly downloads
21
License
MIT
Repository
github
Last release
4 years ago

Convert-csv-to-resx

Generate .resx files from a .csv file

Requirements

  • NodeJS >=14.15

Quick guide

A .csv file is needed to convert from.

Template CSV file

Open a terminal in the folder you wish to have the template file in, and type:

npx csv-to-resx --generate-template

This will produce CSVTemplateFile.csv which you should rename to your project name e.g. SuperApp.csv.

You can skip the renaming and generate the file with the correct name at once:

npx csv-to-resx --generate-template <ProjectName>

Where \ is the name you want to give the file.

Now open the file in e.g. Excel and translate away.

Converting from CSV file

Open a terminal in the folder containing the .csv file and type:

npx csv-to-resx <FileName>.csv

Where \ is the name of the .csv file to convert.

Development

Tbc..

const { generateFiles, makeCsvTemplateFile } = require("csv-to-resx");

const projectName = "Translate";
const testFilename = projectName + ".csv";
const csvFile = await makeCsvTemplateFile(
    testFilename,
    "Name;Comment;0990_n-A;9999_no-where\n" +
    "test-case1;auto generated test file 🍔;this is test case 1;lorem ipsum...\n" +
    // More rows here...
)
const files = await generateFiles(testFilename, { projectName, silent: true });

Encoding

The .csv file gets UTF-8-BOM which forces MS Excel to respect character encoding.

Other files gets standard UTF-8.

Line endings

All files is generated with CRLF (Windows) line endings.

1.9.42

4 years ago

1.9.41

4 years ago

1.9.4

4 years ago

1.9.3

4 years ago

1.9.2

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago