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

@coffeeandfun/extension-translator

v1.0.3

Published

A module for translating i18n JSON files using OpenAI's ChatGPT, specifically designed for browser extensions.

Downloads

13

Readme

@coffeeandfun/extension-translator

Welcome to @coffeeandfun/extension-translator! This project helps you translate JSON files using OpenAI. It's easy to install and use. Follow the steps below to get started.

Table of Contents

Installation

First, you need to install the project globally on your system. Open your terminal and run the following command:

npm install -g @coffeeandfun/extension-translator

This will install the project globally, making it available to use from any directory on your system.

Usage

To use the project, you can run the translate command directly from your terminal:

extension-translator <YOUR_API_KEY> <startDir> <sourceLang> <targetLang1,targetLang2,..>

Replace <YOUR_API_KEY>, , , and <targetLang1,targetLang2,..> with your actual API key, start directory, source language, and target languages.

Examples

Here are some examples to help you understand how to use the project:

Basic Usage:

If you have a JSON file in the examples/en directory and you want to translate it to Dutch (nl) and German (de), you can run the following command:

My il8n is located at demo/_locales/.

extension-translator YOUR_API_KEY   demo/_locales   en   es,et

This will translate the files in the demo/_locales/en directory to the demo/_locales/nl and demo/_locales/de directories.

Including HTML Entries:

If you want to include HTML entries in the translation, you can add the --includeHtml flag:

extension-translator YOUR_API_KEY  demo/_locales en nl,de --includeHtml

Formatting Code

To keep your code clean and consistent, you can use Prettier. We've included scripts to help you format your code easily.

Format Code:

To format your code, run the following command:

npm run format

This will automatically format all your code files.

Check Code Formatting:

To check if your code is formatted correctly without making any changes, run:

npm run format:check

This will check the formatting and report any issues.

Contributing

We welcome contributions! If you'd like to contribute, please follow these steps:

  • Fork the repository.
  • Create a new branch.
  • Make your changes.
  • Submit a pull request.

Check Out Helperbird and Coffee & Fun

If you found this project useful, be sure to check out our other projects at Helperbird and Coffee & Fun:

Helperbird

Helperbird is a browser extension that gives you the features to make the web more accessible and productive. Whether you need help with reading, writing, or accessibility, Helperbird has got you covered. Learn more at Helperbird.

Coffee & Fun

Coffee & Fun is dedicated to creating useful and fun tools for everyone. From accessibility enhancements to productivity boosters, we aim to make your online experience better. Discover more about our projects and what we do at Coffee & Fun.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Thank you for using @coffeeandfun/extension-translator! If you have any questions or need further assistance, feel free to open an issue or contact us.