New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vocabhelper

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

vocabhelper - npm Package Versions

0.3.0

Diff

Changelog

Source

[0.3.0] - 2022-02-13

Added

  • vocabHelper.extractTranslationString can now handle translation strings with JSX inside them.

    E.g.

    const foo = (
      <div>
        I am a paragraph with some <b>bold</b> text and a <a href="/foo">link</a>
      </div>
    );
    

    becomes

    const foo = (
      <div>
        {t("I am a paragraph with some bold text and a link", {
          b: (children) => <b>{children}</b>,
          a: (children) => <a href="/foo">{children}</a>,
        })}
      </div>
    );
    
    // Translation message: "I am a paragraph with some <b>bold</b> text and a <a>link</a>"
    
Configuration
  • New vocabHelper.formatAfterReplace value toggles whether or not to format the document after replacing the highlighted translation string
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