Skip to content

Commit

Permalink
v0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
klein0r committed Nov 15, 2021
1 parent 16478ed commit c15a085
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ It is NOT required to use the ical option. You can also define all birthday date
### **WORK IN PROGRESS**
-->

### 0.1.5

* (klein0r) Updated internal state handling

### 0.1.4

* (klein0r) Translated all objects
Expand Down
20 changes: 17 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* ioBroker gulpfile
* Date: 2019-01-28
* Date: 2021-11-15
*/
'use strict';

Expand Down Expand Up @@ -35,8 +35,12 @@ async function translateNotExisting(obj, baseText, yandex) {
for (let l in languages) {
if (!obj[l]) {
const time = new Date().getTime();
obj[l] = await translate(t, l, yandex);
console.log('en -> ' + l + ' ' + (new Date().getTime() - time) + ' ms');
try {
obj[l] = await translate(t, l, yandex);
console.log('en -> ' + l + ' ' + (new Date().getTime() - time) + ' ms');
} catch (ex) {
console.log('err: ' + ex.message);
}
}
}
}
Expand Down Expand Up @@ -119,6 +123,16 @@ gulp.task('translate', async function (done) {
await translateNotExisting(iopackage.common.desc, null, yandex);
}

if (iopackage.instanceObjects) {
for (var j = 0; j < iopackage.instanceObjects.length; j++) {
if (iopackage.instanceObjects[j].common.name && typeof iopackage.instanceObjects[j].common.name === 'string') {
iopackage.instanceObjects[j].common.name = {en: iopackage.instanceObjects[j].common.name};
}

await translateNotExisting(iopackage.instanceObjects[j].common.name, null, yandex);
}
}

if (fs.existsSync('./admin/i18n/en/translations.json')) {
let enTranslations = require('./admin/i18n/en/translations.json');
for (let l in languages) {
Expand Down
14 changes: 13 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"common": {
"name": "birthdays",
"version": "0.1.4",
"version": "0.1.5",
"news": {
"0.1.5": {
"en": "Updated internal state handling",
"de": "Aktualisierte interne Zustandsbehandlung",
"ru": "Обновленная обработка внутреннего состояния",
"pt": "Tratamento de estado interno atualizado",
"nl": "Bijgewerkte interne statusafhandeling",
"fr": "Gestion de l'état interne mise à jour",
"it": "Aggiornata la gestione dello stato interno",
"es": "Manejo de estado interno actualizado",
"pl": "Zaktualizowano obsługę stanów wewnętrznych",
"zh-cn": "更新的内部状态处理"
},
"0.1.4": {
"en": "Translated all objects",
"de": "Alle Objekte übersetzt",
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": "iobroker.birthdays",
"version": "0.1.4",
"version": "0.1.5",
"description": "Use an ical file to import your contacts birthdays",
"author": {
"name": "klein0r",
Expand Down

0 comments on commit c15a085

Please sign in to comment.