1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-31 23:00:09 -07:00

added more translations

This commit is contained in:
Pavlo Buidenkov 2020-08-11 22:38:45 +03:00
parent 147b6bbe4e
commit d0309dc756
12 changed files with 3787 additions and 26559 deletions

View File

@ -12,24 +12,25 @@ jobs:
uses: actions/setup-node@v1.4.2 uses: actions/setup-node@v1.4.2
with: with:
node-version: 14 node-version: 14
- name: Configure private AWS npm registry
run: |
npm config set registry http://ec2-54-194-151-120.eu-west-1.compute.amazonaws.com:4873
npm set //ec2-54-194-151-120.eu-west-1.compute.amazonaws.com:4873/:_authToken="${{ secrets.NPMRC_ADMIN_USER_AUTH_TOKEN }}"
npm config set always-auth true
- name: yarn install - name: yarn install
run: | run: |
yarn install --frozen-lockfile yarn install --frozen-lockfile
- name: yarn build - name: yarn build
uses: borales/actions-yarn@v2.3.0 run: yarn build
with:
cmd: build
- name: yarn test - name: yarn test
uses: borales/actions-yarn@v2.3.0 run: yarn test
with:
cmd: test
- name: yarn coverage - name: yarn coverage
uses: borales/actions-yarn@v2.3.0 run: yarn coverage
with:
cmd: coverage
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.12 uses: codecov/codecov-action@v1.0.12

View File

@ -46,6 +46,12 @@ jobs:
with: with:
node-version: 14 node-version: 14
- name: Configure private AWS npm registry
run: |
npm config set registry http://ec2-54-194-151-120.eu-west-1.compute.amazonaws.com:4873
npm set //ec2-54-194-151-120.eu-west-1.compute.amazonaws.com:4873/:_authToken="${{ secrets.NPMRC_ADMIN_USER_AUTH_TOKEN }}"
npm config set always-auth true
- name: yarn install --frozen-lockfile - name: yarn install --frozen-lockfile
run: | run: |
yarn install --frozen-lockfile yarn install --frozen-lockfile

View File

@ -2,6 +2,8 @@ name: build and test
on: [push, pull_request] on: [push, pull_request]
# NPMRC_ADMIN_USER_AUTH_TOKEN
jobs: jobs:
build-and-test: build-and-test:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -19,6 +21,12 @@ jobs:
with: with:
node-version: 14 node-version: 14
- name: Configure private AWS npm registry
run: |
npm config set registry http://ec2-54-194-151-120.eu-west-1.compute.amazonaws.com:4873
npm set //ec2-54-194-151-120.eu-west-1.compute.amazonaws.com:4873/:_authToken="${{ secrets.NPMRC_ADMIN_USER_AUTH_TOKEN }}"
npm config set always-auth true
- name: yarn install --frozen-lockfile - name: yarn install --frozen-lockfile
run: | run: |
yarn install --frozen-lockfile yarn install --frozen-lockfile

View File

@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
@ -30,7 +31,7 @@ export default function Home(): JSX.Element {
<div className={styles.container} data-tid="container"> <div className={styles.container} data-tid="container">
<h2>Home</h2> <h2>Home</h2>
<Link to={routes.COUNTER}>to Counter</Link> <Link to={routes.COUNTER}>to Counter</Link>
<h3>{`Signaling server is running on port: ${signalingServerPort}`}</h3> <h3>{`${t('Signaling server is running on port')}: ${signalingServerPort}`}</h3>
<h3>{`Locales test ${t('Language')}`}</h3> <h3>{`Locales test ${t('Language')}`}</h3>
<button type="button" onClick={onButtonClick}> <button type="button" onClick={onButtonClick}>
CLICK ME! CLICK ME!

View File

@ -1,5 +1,6 @@
{ {
"Language": "🌐 Language", "Language": "🌐 Language",
"Signaling server is running on port": "Signaling server is running on port ⚓",
"ru": "Русский", "ru": "Русский",
"en": "English" "en": "English"
} }

View File

@ -1,5 +1,6 @@
{ {
"Language": "🌐 Язык", "Language": "🌐 Язык",
"Signaling server is running on port": "Сигнальный сервер работает на порте ⚓",
"ru": "Русский", "ru": "Русский",
"en": "English" "en": "English"
} }

View File

@ -324,6 +324,24 @@ export default class MenuBuilder {
}, },
]; ];
const languageSubmenu = config.languages.map((languageCode) => {
return {
label: this.i18n.t(languageCode),
type: 'radio',
checked: this.i18n.language === languageCode,
click: () => {
this.i18n.changeLanguage(languageCode);
},
};
});
const languageMenu = {
label: this.i18n.t('Language'),
submenu: languageSubmenu,
};
templateDefault.push(languageMenu);
return templateDefault; return templateDefault;
} }
} }

2
app/package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "deskreen", "name": "deskreen",
"version": "0.0.1", "version": "2.0.53",
"lockfileVersion": 1 "lockfileVersion": 1
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "deskreen", "name": "deskreen",
"productName": "deskreen", "productName": "deskreen",
"version": "0.0.1", "version": "2.0.53",
"description": "TODO: write description about this project", "description": "TODO: write description about this project",
"main": "./main.prod.js", "main": "./main.prod.js",
"author": { "author": {

22853
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{ {
"name": "deskreen", "name": "deskreen",
"productName": "Deskreen", "productName": "Deskreen",
"version": "0.0.1", "version": "2.0.53",
"description": "TODO: write description of this app", "description": "TODO: write description of this app",
"scripts": { "scripts": {
"build": "concurrently \"yarn build-main\" \"yarn build-renderer\"", "build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",

7431
yarn.lock

File diff suppressed because it is too large Load Diff