microsoft/vscode-loc
Publicmirrored fromhttps://github.com/microsoft/vscode-locAvailable
i18n/vscode-language-pack-it/vsc-extension-quickstart.md
52lines · modecode
| 1 | # Benvenuti al Language Pack italiano |
| 2 | |
| 3 | ## Contenuto della cartella |
| 4 | * `package.json` - il file manifest, che contiene il nome e la descrizione dell'estensione di localizzazione. Contiene anche `localizations` che definisce l'id della lingua: |
| 5 | ```json |
| 6 | "contributes": { |
| 7 | "localizations": [{ |
| 8 | "languageId": "it", |
| 9 | "languageName": "Italian", |
| 10 | "localizedLanguageName": "Italiano" |
| 11 | }] |
| 12 | } |
| 13 | ``` |
| 14 | * `translations` - la cartella che contiene le stringhe tradotte. |
| 15 | |
| 16 | Per aggiungere o aggiornare la cartella `translations` con le ultime stringhe derivanti da transifex: |
| 17 | - Controllare la branch `master` del [repository di VS Code](https://github.com/Microsoft/vscode). |
| 18 | - Preferibilmente, porre il repository di VS Code con l'estensione del language pack (in questo modo la cartella padre sarà la stessa) |
| 19 | - `cd vscode` ed eseguire `yarn` per inizializzare il repository di VS Code. |
| 20 | - Ottenere un token API da https://www.transifex.com/user/settings/api. |
| 21 | - Valorizzare la variabile di ambiente `TRANSIFEX_API_TOKEN` con il token API. |
| 22 | - `cd` sul repository di VS Code |
| 23 | - Se l'estensione del language pack è posizionata correttamente (con il repository di VS Code) eseguire `npm run update-localization-extension it` |
| 24 | - altrimenti, `npm run update-localization-extension {percorso_estensione_language_pack}`. |
| 25 | - Questo consentirà il download dei file di traduzione nella cartella `translations` ed, allo stesso tempo, modificherà la proprietà `translations` nella parte `localizations` del json. |
| 26 | |
| 27 | # Welcome to the Italian language pack |
| 28 | |
| 29 | ## What's in the folder |
| 30 | * `package.json` - the manifest file, defining the name and description of the localization extension. It also contains the `localizations` contribution point that defines the language id: |
| 31 | ```json |
| 32 | "contributes": { |
| 33 | "localizations": [{ |
| 34 | "languageId": "it", |
| 35 | "languageName": "Italian", |
| 36 | "localizedLanguageName": "Italiano" |
| 37 | }] |
| 38 | } |
| 39 | ``` |
| 40 | * `translations` - the folder containing the translation strings |
| 41 | |
| 42 | |
| 43 | To populate or update the `translations` folder as with the latest strings from transifex: |
| 44 | - Check out the `master` branch of the [VS Code repository](https://github.com/Microsoft/vscode). |
| 45 | - Preferably, place the VSCode repo next to the language pack extension (so both have the same parent folder). |
| 46 | - `cd vscode` and run `yarn` to initialize the VS Code repo. |
| 47 | - Get an API token from https://www.transifex.com/user/settings/api. |
| 48 | - Set the API token to the environment variable `TRANSIFEX_API_TOKEN`. |
| 49 | - `cd` to the VS Code repo |
| 50 | - If the language pack extension is placed next to the VS Code repository: `npm run update-localization-extension it` |
| 51 | - Otherwise: `npm run update-localization-extension {path_to_lang_pack_ext}` |
| 52 | - This will download translation files to the folder `translations`, as well as populate a `translations` property in the `localizations` contribution point. |
| 53 | |