npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

novotranslator

v1.0.0

Published

Package that can help devs with translations

Downloads

3

Readme

NovoTranslator

Description

Novotranslator is a tool that has been made to make easier for javascript developers to have translated content on their apps.
The translations are stored in spreadsheet that can be uses also by non developers for data entry. Then using the tool, you can create JSON, .strings, or android Compatible xml files with the translations. Also for JSON you can use the translate_nv function in order to make thra tranlsation in app. Tranlsate_nv gets two parameters language on iso format and the string to translate. Also with tool you can find duplicates translations and also check your code for untraslated keys.

Instalation

  • Install package npm i novotranslator. After the installation you a new directory with name novotranslator will be created at the root directory of your project
  • Install dependecnies npm i node-xlsx commander mkdirp readline-sync
  • You need to implement translate function where you need to import trnaslate_nv from TranslatationService and then call translate_nv(string_to_translate, language)

Features

  • Create Translation Files from Excell for web, android, ios
  • Check for duplicate keys and Translations on excel file
  • Detect where in code you have translatables that are not added in xls and add them
  • Find Keys in the excel that are not used on your source code

Config Explain

  • nameOfFunction The name of the function you implemented to make the translations (ex: myTranslate)
  • sheetPath The absolute path where the sheet with the translations is stores
  • jsonOutputPath The absolute path where the JSONs files with the translations are stored
  • iosPath The absolute path where the .string files with the translations are stored
  • androidPath The absolute path where the . xml files with the translationr are stored
  • srcPath The absolute path that will be used as root directory to scan you code for occurencies of the translation function.
  • excludedFilesOrFolders An array that you can enter files or directories to excluded from scanning.

Recipes

Translate

npx novotranslator -w -i -a This will read the spreadhseet and will create the apropriate files regaring parameter provides. -w is forJSON -i is for IOs -a is Andorid If no parameters provided then it will use the JSON

Detect and add Translateables

npx novotranslator -d This will check all the code and fine where your translation Function is called. Then you will prompt to enter translations for the available languages. You will still need to run npx novotranslator after you have inputed the translations You can exclude files or directories by adding them on excludedFilesOrFolders array on novotranslatorconfig.

Add Language

Open translations.xlsx and add new colum. The top cell of the new column must at this format languageIsoCode_LANG

Check Spreadsheet

npx novotranslator -c Check spreadsheet if there are duplicates keys . You can find the results in novotranslator/outputs. There will be one file per language that will have duplicate translations of this language

Find Unused Keys

npx novotranlator -u Check if there are entries that are unused in the spreadsheet