Giter Site home page Giter Site logo

nikhilgoud / ngx-translate-utils Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 2.09 MB

ngx-translate Utilities

Home Page: https://marketplace.visualstudio.com/items?itemName=nikhilgoud.ngx-translate-utils

License: MIT License

TypeScript 98.60% JavaScript 1.40%
vscode-extension ngx-translate-utils angular ngx-translate i18n

ngx-translate-utils's Introduction

ngx-translate-utils

This extension should be used in an Angular project that uses angular translation library ngx-translate @ngx-translate.

version-short installs rating-star

Link to VSCode Marketplace

ts hover info image

html hover info image

organize image

missing image

unused image

This is created using the existing extensions ngx-translate-zombies resource-peek ngx-translate-quickcreate

Features

  • Hover on a translation key to displays values from all language files (normally located in a [language-code].json file).

  • Suggests keys from en.json for autocomplete in both HTML & typescrpt files

  • Ctrl+Click on translation keys to go to value/peek at all translation files.

  • Open QuickAction (hit F1)

Command Description Fumtion
ngxu.createTranslation NGX-Translate: Generate Translation code snippet. - Turns selected text into a ngx-translate snippet string and pipe. Incase of new key the "KEY": "VALUE" string is copied to clipboard for [defaultLanguage].json file.
ngxu.zombies NGX-Translate: Find Unused translations in this file. When having a ngx-translate translation(lang file) file. A diff editor will be openend showing the unused keys.
ngxu.organize Organize translations in this file with base language file When having a ngx-translate translation(lang file) file. Prompts to Save or Open diff editor.
ngxu.missed Find Missing translations in this file after oraganizing with base When having a ngx-translate translation(lang file) file. A diff editor will be openend showing the missed keys.

Contribute / Bugs / Feature Requests / Help

Requirements

Angular project with ngx-translate

Extension Settings

Setting Description Default value
ngx-translate-utils.langFileFolderPath Base Location for i18n json files folder **/src/assets/i18n/
ngx-translate-utils.includeAll Consider all language files to lookup false
ngx-translate-utils.defaultLang Language file to lookup for autocomplete suggestions example: en, en-US, de, en-IN etc en
ngx-translate-utils.autocapitalize Automatically capitalize the translation string key - only applies in snake case mode true
ngx-translate-utils.caseMode Type of case to use for translation string - options are 'camel' and 'snake' snake
ngx-translate-utils.replaceOnTranslate Replace the selected text after generating a translation string true
ngx-translate-utils.translatePipeName The name of the pipe to handle the translation translate
ngx-translate-utils.translatePlaceholder The code block to handle the translation in ts files this.translateService.instant({key})
ngx-translate-utils.translateJSONPlaceholder The code block to handle the translation in json files {key}
ngx-translate-utils.quote Which quote to use around the inserted translation key '
ngx-translate-utils.padding Add spaces inside the curly bracket pair true
ngx-translate-utils.promptForOrganize Open diff window with changes to do for organizing language File true
ngx-translate-utils.ignorePatternForGenerate Regex of vals to ignore while generating translation snippet ```\s?(\n

Release Notes

CHANGELOG

ngx-translate-utils's People

Contributors

littletof avatar nikhilgoud avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

littletof

ngx-translate-utils's Issues

Support extract marker

Hy!

Very helpfull extension!
Although a separate package, I think it would be cool, if this extesion would also support marker. (or support a regepx option, where the user could define what the extension should try to match)

What do you think?

Cannot execute any command

Hi, I'm trying to use the extension but I am unable to execute any of the commands.

My versions:

  • VS Code - 1.42.1
  • ngx-translate-utils - 0.0.11

Every time I execute any of the commands this message appears:
Command 'NGX-Translate: Find Unused translations in this file' is not enabled in the current context.

It would be great if someone knows how to solve this issue. Do not hesitate to ask for more info if needed.
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.