Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ayogohealth/get_copy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ayogohealth/get_copy

Turn a Google spreadsheet of translation strings into a JSON file

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

get_copy script

Turns a Google spreadsheet of translation keys and string values into a JSON file, which can be used with tools like ngx-translate, react-i18next, or vue-i18n.

Installation

npm install --dev @ayogohealth/get_copy

Usage

Usage: get_copy [OPTIONS] [SPREADSHEET_ID]

Options:
  -h, --help                  Print this help message and exit

  -v, --verbose               Print warnings to the console for debugging

  -o, --output=FILE           Destination file path (default: stdout)

  -c, --value-column=COL      Title of spreadsheet column to use for the
                              translation values (default: "value")

  -k, --key-column=COL        Title of spreadsheet column to use for the
                              translation key name (default: "key")

      --no-auth-cache         Disables caching of authentication tokens to file

      --header                Header to include at the top of the output file

Examples

Using this example spreadsheet:

npx get_copy -o src/locales/en.json 1L9x1ocxy6VwNEPsrWiTri4wGYN9FQUymRg1p267r9R4

npx get_copy -o src/locales/fr.json -c "Value-FR" 1L9x1ocxy6VwNEPsrWiTri4wGYN9FQUymRg1p267r9R4

The contents of src/locales/en.json would be:

{
  "app_name": "Hello",
  "main": {
    "footer": "Goodbye",
    "greeting": "Hello {name}!"
  }
}

The contents of src/locales/fr.json would be:

{
  "app_name": "Bonjour",
  "main": {
    "footer": "Au revoir",
    "greeting": "Bonjour {name}!"
  }
}

Contributing

Contributions of bug reports, feature requests, and pull requests are greatly appreciated!

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Licence

Released under the MIT Licence.

Copyright © 2022 – 2023 Ayogo Health Inc.

FAQs

Package last updated on 13 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc