From ebe757d834911fffd366b9993173ffa7c07ca477 Mon Sep 17 00:00:00 2001 From: ryzhak Date: Wed, 24 Oct 2018 20:14:24 +0300 Subject: [PATCH] #2 translated UI from RUS to ENG --- .../dao-param-page.component.html | 50 +++++++++--------- src/app/dashboard/dashboard.component.html | 14 ++--- src/app/dashboard/dashboard.component.ts | 4 +- .../group-member/group-member.component.html | 18 +++---- .../group-member/group-member.component.ts | 2 +- src/app/dashboard/home/home.component.html | 34 ++++++------ src/app/dashboard/home/home.component.ts | 2 +- .../outsider-page.component.html | 18 +++---- .../outsider-page/outsider-page.component.ts | 2 +- .../patron-page/patron-page.component.html | 8 +-- .../proposal/proposal.component.html | 36 ++++++------- .../team-page/team-page.component.html | 42 +++++++-------- .../metamask-not-installed.component.html | 2 +- .../metamask-not-logged-in.component.html | 2 +- .../readable-method-param.pipe.ts | 26 +++++----- .../readable-method-sign.pipe.ts | 21 ++++---- .../services/devzendao/devzendao.service.ts | 52 +++++++++---------- .../services/tx-sender/tx-sender.service.ts | 8 +-- src/index.html | 2 +- 19 files changed, 170 insertions(+), 173 deletions(-) diff --git a/src/app/dashboard/dao-param-page/dao-param-page.component.html b/src/app/dashboard/dao-param-page/dao-param-page.component.html index 4b06912..659d9a1 100644 --- a/src/app/dashboard/dao-param-page/dao-param-page.component.html +++ b/src/app/dashboard/dao-param-page/dao-param-page.component.html @@ -1,5 +1,5 @@
-

Параметры DAO

+

DAO params

@@ -9,105 +9,105 @@

Параметры DAO

- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index 2f65cf8..76a9706 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -15,13 +15,13 @@

DevZenDao

diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 310e77e..52bc9e7 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -49,7 +49,7 @@ export class DashboardComponent implements OnInit { } }, (err) => { - this.messageService.add({severity:'error', summary:'Ошибка', detail:'Ошибка соединения с Metamask'}); + this.messageService.add({severity:'error', summary:'Error', detail:'Error on connecting to Metamask'}); console.error(err); } ); @@ -76,7 +76,7 @@ export class DashboardComponent implements OnInit { this.isToolbarLoading = false; }, (err) => { - this.messageService.add({severity:'error', summary:'Ошибка', detail:'Ошибка обновления балансов'}); + this.messageService.add({severity:'error', summary:'Error', detail:'Error on updating balances'}); this.isToolbarLoading = false; console.error(err); } diff --git a/src/app/dashboard/group-member/group-member.component.html b/src/app/dashboard/group-member/group-member.component.html index 1dc3ca0..ccf4680 100644 --- a/src/app/dashboard/group-member/group-member.component.html +++ b/src/app/dashboard/group-member/group-member.component.html @@ -1,5 +1,5 @@
-

Участники группы DevZenTeam

+

Members of group DevZenTeam

@@ -10,7 +10,7 @@

Участники группы DevZenTeam

- +
@@ -22,7 +22,7 @@

Участники группы DevZenTeam

- + @@ -34,7 +34,7 @@

Участники группы DevZenTeam

@@ -46,15 +46,15 @@

Участники группы DevZenTeam

- +
- +
- +
@@ -62,7 +62,7 @@

Участники группы DevZenTeam

- - + + diff --git a/src/app/dashboard/group-member/group-member.component.ts b/src/app/dashboard/group-member/group-member.component.ts index 7f4d287..361de08 100644 --- a/src/app/dashboard/group-member/group-member.component.ts +++ b/src/app/dashboard/group-member/group-member.component.ts @@ -64,7 +64,7 @@ export class GroupMemberComponent implements OnInit { this.loading = false; }, err => { - this.messageService.add({severity:'error', summary:'Ошибка', detail:'Ошибка при получении участников группы'}); + this.messageService.add({severity:'error', summary:'Error', detail:'Error on getting team members'}); this.loading = false; console.error(err); } diff --git a/src/app/dashboard/home/home.component.html b/src/app/dashboard/home/home.component.html index 1930683..d8c2279 100644 --- a/src/app/dashboard/home/home.component.html +++ b/src/app/dashboard/home/home.component.html @@ -1,5 +1,5 @@
-

Главная

+

Home

@@ -12,34 +12,34 @@

Главная

-

Следующий эпизод

+

Next episode

АдресAddress DZT DZTREP {{ web3Service.fromWei(member.dztBalance,"ether") }} {{ web3Service.fromWei(member.dztRepBalance,"ether") }} - +
- + - + - + - + - + - + @@ -54,42 +54,42 @@

Следующий эпизод

-

Параметры DAO

+

DAO params

Следующий организаторNext host address {{ nextEpisode.nextShowHost }}
Следующий гостьNext guest address {{ nextEpisode.nextShowGuest }}
Предыдущий организаторPrevious host address {{ nextEpisode.prevShowHost }}
Предыдущий гостьPrevious guest address {{ nextEpisode.prevShowGuest }}
Занятые рекламные слотыUsed ad slots {{ nextEpisode.usedSlots }}
Экстренный гостьEmergency guest {{ nextEpisode.isEmergencyGuest }}
- + - + - + - + - + - + - + - + diff --git a/src/app/dashboard/home/home.component.ts b/src/app/dashboard/home/home.component.ts index d6711ee..6dd7e18 100644 --- a/src/app/dashboard/home/home.component.ts +++ b/src/app/dashboard/home/home.component.ts @@ -54,7 +54,7 @@ export class HomeComponent implements OnInit { }, (err) => { this.loading = false; - this.messageService.add({severity:'error', summary:'Ошибка', detail:'Ошибка при получении параметров DAO'}); + this.messageService.add({severity:'error', summary:'Error', detail:'Error on getting DAO params'}); console.error(err); } ); diff --git a/src/app/dashboard/outsider-page/outsider-page.component.html b/src/app/dashboard/outsider-page/outsider-page.component.html index adccde0..0bd0312 100644 --- a/src/app/dashboard/outsider-page/outsider-page.component.html +++ b/src/app/dashboard/outsider-page/outsider-page.component.html @@ -1,5 +1,5 @@
-

Для слушателя

+

For listener

@@ -9,14 +9,14 @@

Для слушателя

- +
- +
- +
@@ -25,11 +25,11 @@

Для слушателя

- +
- +
@@ -41,10 +41,10 @@

Для слушателя

- -

Чтобы стать гостем, вам нужно положить в стейк {{ becomeGuestStakeInEth }} DZT токенов. Вы уверены?

+ +

To become a guest you need to put {{ becomeGuestStakeInEth }} DZT at stake. Are you sure?

- +
diff --git a/src/app/dashboard/outsider-page/outsider-page.component.ts b/src/app/dashboard/outsider-page/outsider-page.component.ts index b152f87..73641b6 100644 --- a/src/app/dashboard/outsider-page/outsider-page.component.ts +++ b/src/app/dashboard/outsider-page/outsider-page.component.ts @@ -42,7 +42,7 @@ export class OutsiderPageComponent implements OnInit { this.becomeGuestStakeInEth = this.web3Service.fromWei(String(this.params['becomeGuestStake']), "ether"); }, err => { - this.messageService.add({severity:'error', summary:'Ошибка', detail:'Ошибка при получении параметров DAO'}); + this.messageService.add({severity:'error', summary:'Error', detail:'Error on getting DAO params'}); console.error(err); } ) diff --git a/src/app/dashboard/patron-page/patron-page.component.html b/src/app/dashboard/patron-page/patron-page.component.html index b3ae086..434917e 100644 --- a/src/app/dashboard/patron-page/patron-page.component.html +++ b/src/app/dashboard/patron-page/patron-page.component.html @@ -1,5 +1,5 @@
-

Для рекламодателя

+

For advertiser

@@ -9,14 +9,14 @@

Для рекламодателя

- +
- +
- +
diff --git a/src/app/dashboard/proposal/proposal.component.html b/src/app/dashboard/proposal/proposal.component.html index 17bddef..8a95670 100644 --- a/src/app/dashboard/proposal/proposal.component.html +++ b/src/app/dashboard/proposal/proposal.component.html @@ -1,5 +1,5 @@
-

Предложения

+

Proposals

@@ -16,13 +16,13 @@

Предложения

Кол-во DZT, создаваемых каждую неделюAmount of DZT created each week {{ params.mintTokensPerWeekAmount }} DZT
Кол-во DZTREP, создаваемых каждую неделюAmount of DZTREP created each week {{ params.mintReputationTokensPerWeekAmount }} DZTREP
Цена за 1 DZT в ETHPrice for 1 DZT in ETH {{ params.oneTokenPriceInWei }} ETH
Цена за 1 рекламный слот в DZTPrice for 1 ad slot in ETH {{ params.oneAdSlotPrice }} DZT
Залог гостя в DZTGuest stake in DZT {{ params.becomeGuestStake }} DZT
Награда организатора за эпизод в DZTREPHost reward for episode in DZTREP {{ params.repTokensRewardHost }} DZTREP
Награда гостя за эпизод в DZTREPGuest reward for episode in DZTREP {{ params.repTokensRewardGuest }} DZTREP
Награда всех членов команды за эпизод в DZTREPReward of all team members for episode in DZTREP {{ params.repTokensRewardTeamMembers }} DZTREP
- - - - - - - + + + + + + + @@ -35,12 +35,12 @@

Предложения

- + @@ -52,16 +52,16 @@

Предложения

- +
- +
- + +
@@ -69,7 +69,7 @@

Предложения

- - + + diff --git a/src/app/dashboard/team-page/team-page.component.html b/src/app/dashboard/team-page/team-page.component.html index 33495aa..5a126f3 100644 --- a/src/app/dashboard/team-page/team-page.component.html +++ b/src/app/dashboard/team-page/team-page.component.html @@ -1,5 +1,5 @@
-

Команда

+

Team

@@ -9,14 +9,14 @@

Команда

- +
- +
- +
@@ -26,14 +26,14 @@

Команда

- +
- +
- +
@@ -43,20 +43,20 @@

Команда

- +
+ placeholder="Address">
- +
@@ -66,20 +66,20 @@

Команда

- +
+ placeholder="Address">
- +
@@ -89,18 +89,18 @@

Команда

- +
- + + - Начислить репутацию гостю? + Mint DZTREP to guest?
- +
diff --git a/src/app/metamask-not-installed/metamask-not-installed.component.html b/src/app/metamask-not-installed/metamask-not-installed.component.html index 8fc6351..9815f5d 100644 --- a/src/app/metamask-not-installed/metamask-not-installed.component.html +++ b/src/app/metamask-not-installed/metamask-not-installed.component.html @@ -1,5 +1,5 @@
- Пожалуйста, установите MetaMask + Please install MetaMask
\ No newline at end of file diff --git a/src/app/metamask-not-logged-in/metamask-not-logged-in.component.html b/src/app/metamask-not-logged-in/metamask-not-logged-in.component.html index e3500fc..d77a2aa 100644 --- a/src/app/metamask-not-logged-in/metamask-not-logged-in.component.html +++ b/src/app/metamask-not-logged-in/metamask-not-logged-in.component.html @@ -1,5 +1,5 @@
- Пожалуйста, войдите в MetaMask + Please login to your MetaMask account
\ No newline at end of file diff --git a/src/app/shared/pipes/readable-method-param/readable-method-param.pipe.ts b/src/app/shared/pipes/readable-method-param/readable-method-param.pipe.ts index 657efbf..e8c5774 100644 --- a/src/app/shared/pipes/readable-method-param/readable-method-param.pipe.ts +++ b/src/app/shared/pipes/readable-method-param/readable-method-param.pipe.ts @@ -16,49 +16,49 @@ export class ReadableMethodParamPipe implements PipeTransform { // group name if(index == 0) { const readableGroupOfAddedAddress = this.web3Service.hexToUtf8(paramHex); - return `Группа: ${readableGroupOfAddedAddress}`; + return `Group: ${readableGroupOfAddedAddress}`; } else { const readableAddressToBeAdded = this.web3Service.bytes32ToAddress(paramHex); - return `Адрес: ${readableAddressToBeAdded}`; + return `Address: ${readableAddressToBeAdded}`; } case "changeTheGuestGeneric(bytes32[])": const readableGuestAddress = this.web3Service.bytes32ToAddress(paramHex); - return `Адрес: ${readableGuestAddress}`; + return `Address: ${readableGuestAddress}`; case "emergency_ChangeTheGuestGeneric(bytes32[])": const readableEmergencyGuestAddress = this.web3Service.bytes32ToAddress(paramHex); - return `Адрес: ${readableEmergencyGuestAddress}`; + return `Address: ${readableEmergencyGuestAddress}`; case "moveToNextEpisodeGeneric(bytes32[])": const paramValue = this.web3Service.hexToNumberString(paramHex); - const readableParamValue = paramValue == 1 ? "Да" : "Нет"; - return `Начислить репутацию гостю: ${readableParamValue}`; + const readableParamValue = paramValue == 1 ? "Yes" : "No"; + return `Mint DZTREP to guest: ${readableParamValue}`; case "removeGroupMemberGeneric(bytes32[])": // group name if(index == 0) { const readableGroupOfRemovedAddress = this.web3Service.hexToUtf8(paramHex); - return `Группа: ${readableGroupOfRemovedAddress}`; + return `Group: ${readableGroupOfRemovedAddress}`; } else { const readableAddressToBeRemoved = this.web3Service.bytes32ToAddress(paramHex); - return `Адрес: ${readableAddressToBeRemoved}`; + return `Address: ${readableAddressToBeRemoved}`; } case "selectNextHostGeneric(bytes32[])": const readableHostAddress = this.web3Service.bytes32ToAddress(paramHex); - return `Адрес: ${readableHostAddress}`; + return `Address: ${readableHostAddress}`; case "updateDaoParamsGeneric(bytes32[])": // param name if(index == 0) { const readableParamName = this.devZenDaoService.getParamNameByHash(paramHex); - return `Параметр: ${readableParamName}`; + return `Param: ${readableParamName}`; } else { // param value const paramValueInWei = this.web3Service.hexToNumberString(paramHex); const readableParamValue = this.web3Service.fromWei(paramValueInWei,"ether"); - return `Значение: ${readableParamValue}`; + return `Value: ${readableParamValue}`; } case "withdrawEtherGeneric(bytes32[])": const readableWithdrawAddress = this.web3Service.bytes32ToAddress(paramHex); - return `Адрес: ${readableWithdrawAddress}`; + return `Address: ${readableWithdrawAddress}`; default: - return "Параметр не найден" + return "Param not found" } } diff --git a/src/app/shared/pipes/readable-method-sign/readable-method-sign.pipe.ts b/src/app/shared/pipes/readable-method-sign/readable-method-sign.pipe.ts index d2de538..9eef67d 100644 --- a/src/app/shared/pipes/readable-method-sign/readable-method-sign.pipe.ts +++ b/src/app/shared/pipes/readable-method-sign/readable-method-sign.pipe.ts @@ -4,30 +4,27 @@ import { Pipe, PipeTransform } from '@angular/core'; export class ReadableMethodSignPipe implements PipeTransform { transform(methodSign: string) { - - let result = "Перевод не найден"; - switch(methodSign) { // standard dao base methods case "addGroupMemberGeneric(bytes32[])": - return "Добавление участника"; + return "Adding a new group member"; case "removeGroupMemberGeneric(bytes32[])": - return "Удаление участника"; + return "Removing group member"; // DevZenDao methods case "updateDaoParamsGeneric(bytes32[])": - return "Обновление параметров DAO"; + return "Updating DAO params"; case "withdrawEtherGeneric(bytes32[])": - return "Вывод всех ETH"; + return "Withdraw all ETH"; case "selectNextHostGeneric(bytes32[])": - return "Выбор следующего организатора"; + return "Select the next host"; case "changeTheGuestGeneric(bytes32[])": - return "Смена гостя"; + return "Change the guest"; case "emergency_ChangeTheGuestGeneric(bytes32[])": - return "Экстренная смена гостя"; + return "Emergency change the guest"; case "moveToNextEpisodeGeneric(bytes32[])": - return "Выпуск нового эпизода"; + return "Move to next episode"; default: - return "Перевод не найден" + return "Translation not found" } } diff --git a/src/app/shared/services/devzendao/devzendao.service.ts b/src/app/shared/services/devzendao/devzendao.service.ts index 378ded7..53c45f4 100644 --- a/src/app/shared/services/devzendao/devzendao.service.ts +++ b/src/app/shared/services/devzendao/devzendao.service.ts @@ -115,8 +115,8 @@ export class DevzendaoService { this.devZenDaoContract.methods.runAdsInTheNextEpisode, [adText], { from: accounts[0] }, - "Рекламное объявление успешно добавлено", - "Ошибка добавления рекламного объявления" + "Commercial added", + "Error on adding a commercial" )) ); } @@ -130,8 +130,8 @@ export class DevzendaoService { this.devZenDaoContract.methods.becomeTheNextShowGuest, [], { from: accounts[0] }, - "Вы стали следующим гостем", - "Ошибка выбора следующего гостя" + "You became the next guest", + "Error on selecting the next guest" )) ); } @@ -150,8 +150,8 @@ export class DevzendaoService { this.devZenDaoContract.methods.buyTokens, [], { from: accounts[0], value: valueInWei }, - "Успешная покупка DZT", - "Ошибка покупки DZT" + "You bought DZT", + "Error on buying DZT" )) ); } @@ -183,8 +183,8 @@ export class DevzendaoService { baseContract.methods.approve, [this.devZenDaoContract.options.address, amount], { from: accounts[0] }, - `Успешный аппрув ${tokenName}`, - `Ошибка аппрува ${tokenName}` + `Approved ${tokenName}`, + `Error on approving ${tokenName}` )) ); } @@ -245,8 +245,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.addGroupMemberAuto, [groupName, address], { from: accounts[0] }, - "Голосование о добавлении нового участника создано", - "Ошибка создания голосования о добавлении нового участника" + "Voting 'Adding a new group member' created", + "Error on creating a voting 'Adding a new group member'" )) ); } @@ -261,8 +261,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.changeTheGuestAuto, [guestAddress], { from: accounts[0] }, - "Голосование 'Смена гостя' создано", - "Ошибка создания голосования 'Смена гостя'" + "Voting 'Change the guest' created", + "Error on creating a voting 'Change the guest'" )) ); } @@ -277,8 +277,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.emergency_ChangeTheGuestAuto, [guestAddress], { from: accounts[0] }, - "Голосование 'Экстренная смена гостя' создано", - "Ошибка создания голосования 'Экстренная смена гостя'" + "Voting 'Emergency change the guest' created", + "Error on creating a voting 'Emergency change the guest'" )) ); } @@ -293,8 +293,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.moveToNextEpisodeAuto, [guestHasCome], { from: accounts[0] }, - "Голосование 'Запуск нового эпизода' создано", - "Ошибка создания голосования 'Запуск нового эпизода'" + "Voting 'Move to next episode' created", + "Error on creating a voting 'Move to next episode'" )) ); } @@ -310,8 +310,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.removeGroupMemberAuto, [groupName, address], { from: accounts[0] }, - "Голосование об удалении нового участника создано", - "Ошибка создания голосования об удалении нового участника" + "Voting 'Removing group member' created", + "Error on creating a voting 'Removing group member'" )) ); } @@ -326,8 +326,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.selectNextHostAuto, [nextHostAddress], { from: accounts[0] }, - "Голосование 'Изменение организатора' создано", - "Ошибка создания голосования 'Изменение организатора'" + "Voting 'Change the next host' created", + "Error on creating a voting 'Change the next host'" )) ); } @@ -343,8 +343,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.updateDaoParamsAuto, [paramHash, value], { from: accounts[0] }, - "Голосование 'Обновление параметра DAO' создано", - "Ошибка создания голосования 'Обновление параметра DAO'" + "Voting 'Updating DAO params' created", + "Error on creating a voting 'Updating DAO params'" )) ); } @@ -359,8 +359,8 @@ export class DevzendaoService { this.devZenDaoAutoContract.methods.withdrawEtherAuto, [outputAddress], { from: accounts[0] }, - "Голосование 'Вывод средств' создано", - "Ошибка создания голосования 'Вывод средств'" + "Voting 'Withdraw all ETH' created", + "Error on creating a voting 'Withdraw all ETH'" )) ); } @@ -445,8 +445,8 @@ export class DevzendaoService { voting.methods.vote, [vote], { from: accounts[0] }, - "Ваш голос добавлен", - "Ошибка голосования" + "Your vote was added", + "Error on voting" ); }) ); diff --git a/src/app/shared/services/tx-sender/tx-sender.service.ts b/src/app/shared/services/tx-sender/tx-sender.service.ts index f654d5a..72b2753 100644 --- a/src/app/shared/services/tx-sender/tx-sender.service.ts +++ b/src/app/shared/services/tx-sender/tx-sender.service.ts @@ -19,21 +19,21 @@ export class TxSenderService { * @param successMsg * @param errorMsg */ - send(method, params = [], data = {}, successMsg = "Успех", errorMsg = "Ошибка"): Observable { + send(method, params = [], data = {}, successMsg = "Success", errorMsg = "Error"): Observable { return from( method(...params).send(data) .on('transactionHash', (hash) => { - this.messageService.add({severity:'info', summary:'Информация', detail:'Транзакция создана'}); + this.messageService.add({severity:'info', summary:'Info', detail:'Transaction created'}); }) .on('confirmation', (confirmationNumber, receipt) => { // on 6th confirmation // TODO: delete when bug is fixed https://github.com/ethereum/web3.js/issues/1239 if(confirmationNumber == 6) { - this.messageService.add({severity:'success', summary:'Успех', detail:successMsg}); + this.messageService.add({severity:'success', summary:'Success', detail:successMsg}); } }) .on('error', (err) => { - this.messageService.add({severity:'error', summary:'Ошибка', detail:errorMsg}); + this.messageService.add({severity:'error', summary:'Error', detail:errorMsg}); console.error(err); }) ); diff --git a/src/index.html b/src/index.html index d82bfd6..a7bdb20 100644 --- a/src/index.html +++ b/src/index.html @@ -30,7 +30,7 @@
- Загрузка DevZenDao... + Loading DevZenDao...
НазваниеПараметрыЗаПротивВсегоСтатусРезультатNameParamsYesNoTotalStatusResult
{{ proposal.data[0].yesResults }} {{ proposal.data[0].noResults }} {{ +proposal.data[0].yesResults + +proposal.data[0].noResults }}/{{ proposal.data[0].votersTotal }}{{ proposal.data[1] ? 'Закончен' : 'Идет' }}{{ proposal.data[1] ? 'Finished' : 'Not finished' }} - {{ proposal.data[2] ? 'Принято' : 'Отклонено' }} + {{ proposal.data[2] ? 'Accepted' : 'Discarded' }} - +