Skip to content

Commit

Permalink
Adjusting documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed May 17, 2024
1 parent b90c795 commit 52e9362
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 84 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ The Azure Translator Code library is a powerful tool for translating JSON files
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![npm downloads](https://img.shields.io/npm/dm/azure-translator-code.svg?style=flat-square)](https://npm-stat.com/charts.html?package=azure-translator-code)

<p align="center">
<a href="https://www.buymeacoffee.com/gabriellogan" target="_blank">
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" >
</a>
</p>

NPM PAGE: https://www.npmjs.com/package/azure-translator-code

GITHUB PAGE: https://github.com/gabriel-logan/Azure-translator-code
Expand All @@ -24,6 +18,13 @@ As devDependencies
```bash
npm install -D azure-translator-code
```

You also can use yarn

```bash
yarn add -D azure-translator-code
```

or

As dependencies
Expand Down Expand Up @@ -100,11 +101,13 @@ const jsonFile = {
translateToMultipleFolders(key, endpoint, location, fromLang, toLangs, jsonFile);
// This function will return a folder called multiFolderGeneratedTranslations



// Translation to a single folder
translateToUnicFolder(key, endpoint, location, fromLang, toLangs, jsonFile);
// This function will return a folder called unicFolderGeneratedTranslations

// Update translation from the multiple folders
updateTranslationsMulti(key, endpoint, location, fromLang, toLangs, jsonFile);
// This function will update the translations in the folder called multiFolderGeneratedTranslations
```

#### You can also choose the folder or folder name where you will save the files.
Expand Down Expand Up @@ -132,15 +135,17 @@ const jsonFile = {
translateToMultipleFolders(key, endpoint, location, fromLang, toLangs, jsonFile, 'myFolder');
// This function will return a folder called myFolder


// Translation to a single folder
translateToUnicFolder(key, endpoint, location, fromLang, toLangs, jsonFile, 'myFolder/OtherFolder/etc');
// This function will return a folder called ./myFolder/OtherFolder/etc


// Translation to a single folder
translateToUnicFolder(key, endpoint, location, fromLang, toLangs, jsonFile, './myFolder/OtherFolder/etc');
// This function will return a folder called ./myFolder/OtherFolder/etc

// Update translation from the multiple folders
updateTranslationsMulti(key, endpoint, location, fromLang, toLangs, jsonFile, 'myFolder');
// This function will update the translations in the folder called myFolder
```

Make sure to replace the key and endpoint information with your own Azure access credentials. Ensure that the JSON file and settings are correctly defined according to your needs.
Expand Down
61 changes: 0 additions & 61 deletions docs/404.html

This file was deleted.

7 changes: 7 additions & 0 deletions docs/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 404 - Página não encontrada

A página que você está procurando não existe. 😩😩😩

[**Voltar**](https://gabriel-logan.github.io/Azure-translator-code/)

[**Ir para o GitHub**](https://github.com/gabriel-logan/Azure-translator-code)
25 changes: 15 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ The Azure Translator Code library is a powerful tool for translating JSON files
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![npm downloads](https://img.shields.io/npm/dm/azure-translator-code.svg?style=flat-square)](https://npm-stat.com/charts.html?package=azure-translator-code)

<p align="center">
<a href="https://www.buymeacoffee.com/gabriellogan" target="_blank">
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" >
</a>
</p>

NPM PAGE: https://www.npmjs.com/package/azure-translator-code

GITHUB PAGE: https://github.com/gabriel-logan/Azure-translator-code
Expand All @@ -24,6 +18,13 @@ As devDependencies
```bash
npm install -D azure-translator-code
```

You also can use yarn

```bash
yarn add -D azure-translator-code
```

or

As dependencies
Expand Down Expand Up @@ -100,11 +101,13 @@ const jsonFile = {
translateToMultipleFolders(key, endpoint, location, fromLang, toLangs, jsonFile);
// This function will return a folder called multiFolderGeneratedTranslations



// Translation to a single folder
translateToUnicFolder(key, endpoint, location, fromLang, toLangs, jsonFile);
// This function will return a folder called unicFolderGeneratedTranslations

// Update translation from the multiple folders
updateTranslationsMulti(key, endpoint, location, fromLang, toLangs, jsonFile);
// This function will update the translations in the folder called multiFolderGeneratedTranslations
```

#### You can also choose the folder or folder name where you will save the files.
Expand Down Expand Up @@ -132,15 +135,17 @@ const jsonFile = {
translateToMultipleFolders(key, endpoint, location, fromLang, toLangs, jsonFile, 'myFolder');
// This function will return a folder called myFolder


// Translation to a single folder
translateToUnicFolder(key, endpoint, location, fromLang, toLangs, jsonFile, 'myFolder/OtherFolder/etc');
// This function will return a folder called ./myFolder/OtherFolder/etc


// Translation to a single folder
translateToUnicFolder(key, endpoint, location, fromLang, toLangs, jsonFile, './myFolder/OtherFolder/etc');
// This function will return a folder called ./myFolder/OtherFolder/etc

// Update translation from the multiple folders
updateTranslationsMulti(key, endpoint, location, fromLang, toLangs, jsonFile, 'myFolder');
// This function will update the translations in the folder called myFolder
```

Make sure to replace the key and endpoint information with your own Azure access credentials. Ensure that the JSON file and settings are correctly defined according to your needs.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-translator-code",
"version": "1.0.8",
"version": "1.1.0",
"description": "Azure Cognitive Services Translator Text API Code for Use with Common Languages",
"author": {
"name": "Gabriel Logan"
Expand Down
4 changes: 2 additions & 2 deletions src/updateTranslationMulti/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ interface TranslationType {
If you need, copy this structure to get better then make your modification
*
* @description This function checks the json with the already existing translations and adds only the non-existing translations to the file, this serves to save data.
*Otherwise it works the same as the other 2 functions
*
* Otherwise it works the same as the other 2 functions
*
* @param [folderNamePath='multiFolderGeneratedTranslations'] If it is undefined, it will be associated by default: multiFolderGeneratedTranslations
You can use this like: 'myfoldername' or 'myfoldername/otherfolder' or './myfoldername/etcfolder'
@IMPORTANT Saving always starts from the project root folder.
Expand Down

0 comments on commit 52e9362

Please sign in to comment.