Skip to content

Commit

Permalink
git init
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksymStoianov committed Aug 16, 2024
0 parents commit 9b32bd0
Show file tree
Hide file tree
Showing 31 changed files with 1,639 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2023 Maksym Stoianov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<h1 align="center">Readme</h1>

<div id="locales" align="center">
<a href="docs/bg/README.md"><img src="https://img.shields.io/badge/BG-grey?style=flat" alt="Български"></a>
<a href="docs/de/README.md"><img src="https://img.shields.io/badge/DE-grey?style=flat" alt="Deutsch"></a>
<a href="docs/en/README.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="docs/ru/README.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="docs/uk/README.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>
9 changes: 9 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<h1 align="center">Security policy</h1>

<div id="locales" align="center">
<a href="docs/bg/SECURITY.md"><img src="https://img.shields.io/badge/BG-grey?style=flat" alt="Български"></a>
<a href="docs/de/SECURITY.md"><img src="https://img.shields.io/badge/DE-grey?style=flat" alt="Deutsch"></a>
<a href="docs/en/SECURITY.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="docs/ru/SECURITY.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="docs/uk/SECURITY.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>
24 changes: 24 additions & 0 deletions docs/bg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div id="locales" align="right">
<a href="../bg/CHANGELOG.md"><img src="https://img.shields.io/badge/BG-blue?style=flat" alt="Български"></a>
<a href="../de/CHANGELOG.md"><img src="https://img.shields.io/badge/DE-grey?style=flat" alt="Deutsch"></a>
<a href="../en/CHANGELOG.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/CHANGELOG.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/CHANGELOG.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# Changelog


## [1.1.2] - 2024-08-16

### Подобрения
* Подобрена документация на JSDoc за по-голяма яснота и детайлност.

### Корекции
* Решени са различни грешки и проблеми.


## [1.0.0] - 2023-10-29

* Първоначална версия.
10 changes: 10 additions & 0 deletions docs/bg/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div id="locales" align="right">
<a href="../bg/CONTRIBUTING.md"><img src="https://img.shields.io/badge/BG-blue?style=flat" alt="Български"></a>
<a href="../de/CONTRIBUTING.md"><img src="https://img.shields.io/badge/DE-grey?style=flat" alt="Deutsch"></a>
<a href="../en/CONTRIBUTING.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/CONTRIBUTING.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/CONTRIBUTING.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# Как да станете участник?
30 changes: 30 additions & 0 deletions docs/bg/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div id="locales" align="right">
<a href="../bg/LICENSE.md"><img src="https://img.shields.io/badge/BG-blue?style=flat" alt="Български"></a>
<a href="../de/LICENSE.md"><img src="https://img.shields.io/badge/DE-grey?style=flat" alt="Deutsch"></a>
<a href="../en/LICENSE.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/LICENSE.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/LICENSE.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# MIT License

Copyright (c) 2023 Maksym Stoianov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
108 changes: 108 additions & 0 deletions docs/bg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<div id="locales" align="right">
<a href="../bg/README.md"><img src="https://img.shields.io/badge/BG-blue?style=flat" alt="Български"></a>
<a href="../de/README.md"><img src="https://img.shields.io/badge/DE-grey?style=flat" alt="Deutsch"></a>
<a href="../en/README.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/README.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/README.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# I18nService

<div id="badges" align="left">
<img src="https://img.shields.io/github/v/release/MaksymStoianov/I18nService" alt="Release">
<a href="LICENSE.md"><img src="https://img.shields.io/github/license/MaksymStoianov/I18nService" alt="License"></a>
<a href="https://github.com/google/clasp"><img src="https://img.shields.io/badge/built%20with-clasp-4285f4.svg" alt="clasp"></a>
</div>

**I18nService** е обект, който реализира работа с интернационализация.


## Инсталация

1. Отворете своя проект в [Google Apps Script Dashboard](https://script.google.com/).
2. Копирайте съдържанието на файла [i18n.js](../../src/i18n.js) и го поставете в нов файл във вашия проект в Google Apps Script.


## Употреба

### Пример 1

```javascript
const data = {
"bg": {
title: "Тестово приложение"
},
"de": {
title: "Testanwendung"
},
"en": {
title: "Example Application"
},
"ru": {
title: "Тестовое приложение"
},
"uk": {
title: "Тестовий застосунок"
}
};

const i18n = I18nService
.init('bg')
.load(data);

console.log(i18n.getLanguage('bg').getTranslate('title'));
console.log(__('title'));
```

### Пример 2

```javascript
const data = {
title: "Example Application"
};
const locale = "bg";

const i18n = I18nService
.init(locale)
.load(data, locale);

console.log(i18n.getLanguage(locale).getTranslate('title'));
console.log(__('title'));
```

### Пример 3

```javascript
const sheet = SpreadsheetApp
.getActiveSpreadsheet()
.getSheetByName('I18n');

const i18n = I18nService
.init('bg')
.load(sheet);

console.log(i18n.getLanguage('bg').getTranslate('title'));
console.log(__('title'));
```


## Задачи

- [ ] Добавете в метода `I18n.load()` възможността за зареждане на преводи `json` чрез url-връзка.
- [ ] Използвайте [`CacheService`](https://developers.google.com/apps-script/reference/cache) за съхранение на езика.


## Принос

Моля, прочетете [CONTRIBUTING.md](CONTRIBUTING.md) за подробности относно това как да допринесете за този проект.


## История на промените

Моля, направете справка с [CHANGELOG.md](CHANGELOG.md) за подробен списък на промените и актуализациите.


## Лиценз

Този проект е лицензиран съгласно файла [LICENSE.md](LICENSE.md).
10 changes: 10 additions & 0 deletions docs/bg/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div id="locales" align="right">
<a href="../bg/SECURITY.md"><img src="https://img.shields.io/badge/BG-blue?style=flat" alt="Български"></a>
<a href="../de/SECURITY.md"><img src="https://img.shields.io/badge/DE-grey?style=flat" alt="Deutsch"></a>
<a href="../en/SECURITY.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/SECURITY.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/SECURITY.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# Докладване на проблем със сигурността
24 changes: 24 additions & 0 deletions docs/de/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div id="locales" align="right">
<a href="../bg/CHANGELOG.md"><img src="https://img.shields.io/badge/BG-grey?style=flat" alt="Български"></a>
<a href="../de/CHANGELOG.md"><img src="https://img.shields.io/badge/DE-blue?style=flat" alt="Deutsch"></a>
<a href="../en/CHANGELOG.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/CHANGELOG.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/CHANGELOG.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# Changelog


## [1.1.2] - 2024-08-16

### Erweiterungen
* Verbesserte JSDoc-Dokumentation für mehr Klarheit und Detailgenauigkeit.

### Korrekturen
* Verschiedene Bugs und Probleme wurden behoben.


## [1.0.0] - 2023-10-29

* Erste Veröffentlichung.
10 changes: 10 additions & 0 deletions docs/de/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div id="locales" align="right">
<a href="../bg/CONTRIBUTING.md"><img src="https://img.shields.io/badge/BG-grey?style=flat" alt="Български"></a>
<a href="../de/CONTRIBUTING.md"><img src="https://img.shields.io/badge/DE-blue?style=flat" alt="Deutsch"></a>
<a href="../en/CONTRIBUTING.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/CONTRIBUTING.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/CONTRIBUTING.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# Wie wird man ein Beitragszahler?
30 changes: 30 additions & 0 deletions docs/de/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div id="locales" align="right">
<a href="../bg/LICENSE.md"><img src="https://img.shields.io/badge/BG-grey?style=flat" alt="Български"></a>
<a href="../de/LICENSE.md"><img src="https://img.shields.io/badge/DE-blue?style=flat" alt="Deutsch"></a>
<a href="../en/LICENSE.md"><img src="https://img.shields.io/badge/EN-grey?style=flat" alt="English"></a>
<a href="../ru/LICENSE.md"><img src="https://img.shields.io/badge/RU-grey?style=flat" alt="Русский"></a>
<a href="../uk/LICENSE.md"><img src="https://img.shields.io/badge/UK-grey?style=flat" alt="Українська"></a>
</div>


# MIT License

Copyright (c) 2023 Maksym Stoianov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 9b32bd0

Please sign in to comment.