Plug-in til Visual Studio Code

Integrér dine Visual Studio Code-projekter med Crowdin for at optimere lokaliseringsprocessen. The plugin allows uploading source strings instantly to your Crowdin project, downloading source strings from Crowdin, and downloading completed translations.

Når Crowdin-plugin’et er installeret, vil Crowdin Explorer blive vist i Visual Studio Codes aktivitetsbjælke som en ny komponent. The plugin scans each workspace for a Crowdin-specific configuration file and builds a tree with the source files. Brug Crowdin Explorer til at håndtere lokaliseringsressourcer og automatisere filsynkning. Oversættelses- og korrekturlæsningsfremskridt kan også spores for hvert projekt og målsprog.

Opsætning

To work with the Crowdin plugin in the Visual Studio Code workspace, you need to create a Crowdin configuration file named crowdin.yml or crowdin.yaml.

Opsætningsfileksempel:

"project_id": "projectId"        #open project and go to Tools > API "api_token": "apiToken"          #open profile settings and go to API > New Token > create Token "base_path": "folder"  #optional "branch": "master"  #optional

"files": [
  { "source": "/sources/**/*.xml", "translation": "/translations/%two_letters_code%/%original_file_name%", "update_option": "update_as_unapproved", #valgfrit "excluded_target_languages": ["uk", "fr"], #valgfrit "labels": ["android", "emails"] #valgfrit },
  {
    "source": "multicolumn.csv",
    "translation": "multicolumn.csv",
    "scheme": "identifier,source_phrase,context,uk,ru,fr" #optional
  }
]

Miljøvariablerne kan også bruges i opsætningsfilen.

Read more about Environment Variables.

Opsætning

Følg disse trin for at opsætte Crowdin Plug-in’et til VS Code:

  1. Klargør crowdin.yml- eller crowdin.yaml-opsætningsfilen og føj den til det ønskede arbejdsområde i Visual Studio Code.
  2. Installér Crowdin-plugin’et vha. af én af flg. metoder:
    • åbn Vísual Studio Code Extensions (Ctrl+Shift+X), søg efter Crowdin og klik på Installér
      eller
    • start Visual Studio Code hurtig-åbn (Ctrl+P), indsæt kommandoen nedenfor og tryk derefter på Retur
      ext install Crowdin.vscode-crowdin
      
  3. The Crowdin plugin scans each Visual Studio Code workspace to find a Crowdin configuration file (crowdin.yml or crowdin.yaml). Det bygger automatisk træet med kildefiler i den på Aktivitetsbjælken tilgængelige Crowdin Explorer-komponent.
  4. Use upward and downward arrows in the Crowdin Explorer component to upload source files to Crowdin and download translations correspondingly.
    Crowdin Stifinder

Udvidelsesindstillinger

Denne udvidelse tillader opsætning af flg. indstillinger:

  • tms.autoRefresh – use this option to auto-refresh the file tree after each change in the Crowdin configuration file.

Se også

Var denne artikel nyttig?