Skip to content

Commit

Permalink
Merge pull request #289 from Chia-Network/develop
Browse files Browse the repository at this point in the history
Release 1.1.9
  • Loading branch information
TheLastCicada authored Jul 25, 2024
2 parents db4fcfb + 9f578aa commit da8d3fd
Show file tree
Hide file tree
Showing 12 changed files with 354 additions and 29 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build-installers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,19 @@ jobs:

- name: Build electron app
env:
CSC_FOR_PULL_REQUEST: "true"
CSC_FOR_PULL_REQUEST: 'true'
run: npm run electron:package:mac

- name: Notarize
run: |
DMG_FILE=$(find ${{ github.workspace }}/dist/ -type f -name '*.dmg')
npm install -g notarize-cli
notarize-cli \
--file="$DMG_FILE" \
--bundle-id net.chia.climate-tokenization-engine-ui \
--username "${{ secrets.APPLE_NOTARIZE_USERNAME }}" \
--password "${{ secrets.APPLE_NOTARIZE_PASSWORD }}"
xcrun notarytool submit \
--wait \
--apple-id "${{ secrets.APPLE_NOTARIZE_USERNAME }}" \
--password "${{ secrets.APPLE_NOTARIZE_PASSWORD }}" \
--team-id "${{ secrets.APPLE_TEAM_ID }}" \
"$DMG_FILE"
- name: Upload Mac Installer
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .repo-content-updater.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pr_target_grant: develop
pr_target_branch: develop
assign_users:
- TheLastCicada
commit_prefix: "chore: "
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "climate-tokenization-engine-ui",
"version": "1.1.8",
"version": "1.1.9",
"private": true,
"author": "Chia Network Inc. <[email protected]>",
"description": "User Interface for the Climate Tokenization Engine",
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { AppNavigator } from './navigation';
import theme from './theme';

import { IndeterminateProgressOverlay } from './components';
import { LocaleChangeListener } from './components/blocks/LocaleChangeListener';

const App = () => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -46,6 +47,7 @@ const App = () => {
defaultLocale="en"
messages={translationTokens.default}
>
<LocaleChangeListener />
<AppNavigator />
</IntlProvider>
</ThemeProvider>
Expand Down
29 changes: 29 additions & 0 deletions src/components/blocks/LocaleChangeListener.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React, { useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { setLocale } from '../../store/actions/appActions';

const LocaleChangeListener = () => {
const dispatch = useDispatch();

useEffect(() => {
// Function to handle the message event
const handleMessage = event => {
if (event?.data?.changeLocale) {
dispatch(setLocale(event?.data?.changeLocale));
}
};

// Add the event listener
window.addEventListener('message', handleMessage, false);

// Return a function that will be called when the component unmounts
return () => {
// Remove the event listener
window.removeEventListener('message', handleMessage, false);
};
}, []);

return <></>;
};

export { LocaleChangeListener };
7 changes: 6 additions & 1 deletion src/components/blocks/LocaleSwitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ const Container = styled('div')`
font-family: ${props => props.theme.typography.primary.semiBold};
}
.MuiSelect-select {
color: ${props => props.theme.colors.default.primary}};
}
.MuiSelect-root:hover,
.MuiSvgIcon-root:hover,
.MuiSelect-select:hover {
color: ${props => props.theme.colors.default.primary};
}
.MuiOutlinedInput-notchedOutline {
border: 0;
border: 0 !important;
outline: 0;
}
`;

Expand Down
18 changes: 17 additions & 1 deletion src/translations/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
import * as en from './tokens/en-US.json';
import * as es from './tokens/es.json';
import * as fr from './tokens/fr.json';
import * as de from './tokens/de.json';
import * as cn from './tokens/zh-cn.json';

const LANGUAGE_CODES = Object.freeze({
ENGLISH: 'en-US',
PAK: 'pk-PK',
SPANISH: 'es-ES',
FRENCH: 'fr-FR',
GERMAN: 'de-DE',
CHINESE: 'cn',
});

const loadLocaleData = locale => {
switch (locale) {
case LANGUAGE_CODES.ENGLISH_US:
case LANGUAGE_CODES.SPANISH:
return es;
case LANGUAGE_CODES.FRENCH:
return fr;
case LANGUAGE_CODES.GERMAN:
return de;
case LANGUAGE_CODES.CHINESE:
return cn;
case LANGUAGE_CODES.ENGLISH:
default:
return en;
Expand Down
68 changes: 68 additions & 0 deletions src/translations/tokens/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"carbon-tokenization-engine": "Kohlenstoff -Tokenisierung Motor",
"quantity-of-credits": "Menge an Credits",
"detokenized-units": "Detekizierte Einheiten",
"detokenize": "Detokenize",
"project-id": "Projekt ID",
"project-name": "Projektname",
"upload": "Hochladen",
"file-upload": "Datei-Upload",
"password": "Passwort",
"vintage": "Jahrgang",
"project-link": "Projektlink",
"unit-owner": "Einheitenbesitzer",
"unit-block-start": "Einheitsblockstart",
"unit-block-end": "Einheit Blockende",
"quantity": "Menge",
"account-holder-wallet-address": "Account Inhaber Brieftaschenadresse",
"existing-marketplace-identifier": "Bestehende Marktkennungen",
"connect-to-cw": "Verbinden",
"connect": "Verbinden",
"server-address": "Serveradresse",
"api-key": "API-Schlüssel",
"storybook": "Storybook",
"hello-world": "Willkommen bei Carbon Tokenization Engine",
"ok": "OK",
"search": "Suchen",
"select": "Wählen",
"filters": "Filter",
"network-error": "Netzwerkfehler",
"there-is-a-connection-error": "Es gibt einen Verbindungsfehler",
"something-went-wrong": "Hoppla! Etwas ist schiefgelaufen",
"success": "Erfolg",
"connected": "In Verbindung gebracht",
"disconnect": "Trennen",
"create-tokens": "Token erstellen",
"create-token": "Token erstellen",
"revert-tokens": "Token zurückkehren",
"existing-tokens": "Tokenisierte Einheiten",
"no-existing-tokens": "Es gibt keine tokenisierten Einheiten.",
"untokenized-units": "Untokenisierte Einheiten",
"org-uid": "Org uid",
"add-valid-server-address": "Fügen Sie eine gültige Serveradresse hinzu",
"add-valid-api-key": "Fügen Sie einen gültigen API -Schlüssel hinzu",
"untokenized-units-not-loaded": "Untokenisierte Einheiten konnten nicht geladen werden.",
"tokens-not-loaded": "Token konnten nicht geladen werden.",
"projects-not-loaded": "Projekte konnten nicht geladen werden.",
"no-untokenized-units": "Es gibt keine unhöflichen Einheiten.",
"actions": "Aktionen",
"unit-was-tokenized": "Einheiten -Tokenisierungsprozess begann.Bitte gehen Sie in 5 Minuten zurück.",
"unit-not-tokenized": "Die Einheit konnte nicht tokenisiert werden.",
"projectLink": "Projektlink",
"cancel": "Stornieren",
"token-creation-pending": "Token -Kreation anhängig",
"detok-file-parsed": "Die Detok -Datei wurde erfolgreich analysiert.",
"detok-file-not-parsed": "Entdeckung konnte nicht analysiert werden.",
"add-valid-detok-file": "Fügen Sie eine gültige Detok -Datei hinzu.",
"add-valid-detok-password": "Fügen Sie gültiges Detok -Passwort hinzu.",
"update": "Aktualisieren",
"import": "Importieren",
"import-home-org": "Home importieren",
"connect-to-remote": "Verbindung zu Fern eine Verbindung hergestellt",
"update-home-org": "Home Update",
"detokanization-successful": "Die Einheit wurde erfolgreich festgestellt.",
"detokanization-not-successful": "Die Einheit konnte nicht festgestellt werden.",
"confirm-detokanization": "Bestätigen Sie die Entdeckung der Einheit",
"confirm": "Bestätigen",
"detok-file-archive-not-valid": "Die Detok -Datei konnte nicht aus dem Archiv erhalten werden."
}
68 changes: 68 additions & 0 deletions src/translations/tokens/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"carbon-tokenization-engine": "Motor de tokenización de carbono",
"quantity-of-credits": "Cantidad de créditos",
"detokenized-units": "Unidades retiradas",
"detokenize": "Retrokenizar",
"project-id": "Projecto ID",
"project-name": "Nombre del proyecto",
"upload": "Subir",
"file-upload": "Subir archivo",
"password": "Contraseña",
"vintage": "Vintage",
"project-link": "Enlace de proyecto",
"unit-owner": "Propietario de la unidad",
"unit-block-start": "Inicio del bloque de la unidad",
"unit-block-end": "Extremo de bloque de unidades",
"quantity": "Cantidad",
"account-holder-wallet-address": "Dirección de billetera del titular de la cuenta",
"existing-marketplace-identifier": "Identificadores del mercado existentes",
"connect-to-cw": "Conectar",
"connect": "Conectar",
"server-address": "Dirección del servidor",
"api-key": "Clave API",
"storybook": "Libro de cuentos",
"hello-world": "Bienvenido al motor de tokenización de carbono",
"ok": "De acuerdo",
"search": "Buscar",
"select": "Seleccionar",
"filters": "Filtros",
"network-error": "Error de red",
"there-is-a-connection-error": "Hay un error de conexión",
"something-went-wrong": "Huy! Algo salió mal",
"success": "Éxito",
"connected": "Connected",
"disconnect": "Desconectar",
"create-tokens": "Crear tokens",
"create-token": "Crear token",
"revert-tokens": "Revertir tokens",
"existing-tokens": "Unidades tokenizadas",
"no-existing-tokens": "No hay unidades tokenizadas.",
"untokenized-units": "Unidades no liberadas",
"org-uid": "Org uid",
"add-valid-server-address": "Agregar una dirección de servidor válida",
"add-valid-api-key": "Agregar una clave API válida",
"untokenized-units-not-loaded": "Las unidades no liberadas no se pueden cargar.",
"tokens-not-loaded": "Los tokens no se podían cargar.",
"projects-not-loaded": "Los proyectos no se pueden cargar.",
"no-untokenized-units": "No hay unidades no liberadas.",
"actions": "Comportamiento",
"unit-was-tokenized": "Se inició el proceso de tokenización de la unidad.Vuelve en 5 minutos.",
"unit-not-tokenized": "La unidad no pudo ser tokenizada.",
"projectLink": "Enlace de proyecto",
"cancel": "Cancelar",
"token-creation-pending": "Creación de token pendiente",
"detok-file-parsed": "El archivo de Detok se analizó con éxito.",
"detok-file-not-parsed": "Detok no pudo ser analizado.",
"add-valid-detok-file": "Agregue un archivo de desvío válido.",
"add-valid-detok-password": "Agregue una contraseña de desvío válida.",
"update": "Actualizar",
"import": "Importar",
"import-home-org": "Importar en casa",
"connect-to-remote": "Conectarse a remoto",
"update-home-org": "Actualización de inicio",
"detokanization-successful": "La unidad fue contenida con éxito.",
"detokanization-not-successful": "La unidad no se pudo ser contenida.",
"confirm-detokanization": "Confirmar la desocanización de la unidad",
"confirm": "Confirmar",
"detok-file-archive-not-valid": "El archivo Detok no se pudo obtener del archivo."
}
Loading

0 comments on commit da8d3fd

Please sign in to comment.