/vue-docs-tr-helper

A VSCode Plugin for Vue documentation translation.

Primary LanguageTypeScriptMIT LicenseMIT

vue-docs-tr-helper README

Here is Vue documentation traslation helper! it will provide you useful commands for translation editing.

Activate

image

Actually all commands provided by this extension can trigger activate events now.

Features

anchor tag transform

Headings text of documentation are different in displaying languages, but markdown's heading anchor is just based on its content, so the original [anchor text](#anchor-path) is unavailable in different languages.

We've found a solution in VuePress/VitePress for this problem, for the foreseeable future, all language translations will use the following form of markup, appended to the end of a markdown heading.

<!-- before transforming -->
## System Modifier Keys
### `.exact` Modifier
## `v-if` in `<template>`

<!-- after transforming -->
## System Modifier Keys {#system-modifier-keys}
### `.exact` Modifier {#exact-modifier}
## `v-if` in `<template>` {#v-if-in-template}

anchorTag

anchorTagFile

query for English source

source

Requirements

  • If you are a Chinese mainland user, maybe you need a system level proxy (VPN) to access https://raw.githubusercontent.com.

Extension Settings

  • vue-docs-tr-helper:github-repo-name: Vue.js official documentation github repo name.

    default: vuejs/docs

  • vue-docs-tr-helper:github-repo-branch: Vue.js official documentation github repo branch.

    default: next

Known Issues

Nothing for now.

Release Notes

0.0.7 - 0.0.11

  • Fix anchor tag transforming issue with header containing HTML tags. - rewrite the RegExp replace method.
  • Fix anchor tag transforming issue with header containing HTML tags. - avoid removing texts inside tags like useage of `<template>` expression
  • Fix array access out of bounds problem of fetching English source.
  • make this extension activate on command call (instead of onLanguage:markdown).

0.0.5

Provide English source content when mouse pointer hover on a line. (only in markdown files)

0.0.1

Initial release of Vue-docs-tr-helper.

Provide commands:

  • anchor-tag: replace selection text to a valid anchor tag form.
  • anchor-tag-file: replace all headings of a markdown file to valid anchor tags form.

Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

For more information

Enjoy!