[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] 01/02: removing message-po and testing on st
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] 01/02: removing message-po and testing on storybook |
Date: |
Thu, 27 May 2021 16:02:46 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
commit 1409f599d5c3ba5cf75b597fb38757fcd8e9f02f
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu May 27 11:01:07 2021 -0300
removing message-po and testing on storybook
---
packages/frontend/.storybook/main.js | 24 ++++++++++++------------
packages/frontend/.storybook/preview.js | 1 +
packages/frontend/preact.config.js | 32 ++++++++++++++++----------------
packages/frontend/src/i18n/index.tsx | 6 +++---
4 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/packages/frontend/.storybook/main.js
b/packages/frontend/.storybook/main.js
index 809b0b7..39d042b 100644
--- a/packages/frontend/.storybook/main.js
+++ b/packages/frontend/.storybook/main.js
@@ -35,18 +35,18 @@ module.exports = {
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.
// Make whatever fine-grained changes you need
- config.module.rules.push({
- test: [/\.pot?$/, /\.mo$/],
- loader: require.resolve('messageformat-po-loader'),
- options: {
- biDiSupport: false,
- defaultCharset: null,
- defaultLocale: 'en',
- forceContext: false,
- pluralFunction: null,
- verbose: false
- }
- });
+ // config.module.rules.push({
+ // test: [/\.pot?$/, /\.mo$/],
+ // loader: require.resolve('messageformat-po-loader'),
+ // options: {
+ // biDiSupport: false,
+ // defaultCharset: null,
+ // defaultLocale: 'en',
+ // forceContext: false,
+ // pluralFunction: null,
+ // verbose: false
+ // }
+ // });
// Return the altered config
return config;
},
diff --git a/packages/frontend/.storybook/preview.js
b/packages/frontend/.storybook/preview.js
index a483dcd..f511267 100644
--- a/packages/frontend/.storybook/preview.js
+++ b/packages/frontend/.storybook/preview.js
@@ -17,6 +17,7 @@
import "../src/scss/main.scss"
import { ConfigContextProvider } from '../src/context/config'
import { TranslationProvider } from '../src/context/translation'
+import { h } from 'preact';
const mockConfig = {
backendURL: 'http://demo.taler.net',
diff --git a/packages/frontend/preact.config.js
b/packages/frontend/preact.config.js
index 31a46e7..dd23ac5 100644
--- a/packages/frontend/preact.config.js
+++ b/packages/frontend/preact.config.js
@@ -39,23 +39,23 @@ export default {
);
// allow import for gettext files
- config.resolve.extensions.push('.po');
+ // config.resolve.extensions.push('.po');
// transform .po format into messageformat
- config.module.rules.push({
- enforce: 'pre',
- test: /\.po$/,
- use: [{
- loader: 'messageformat-po-loader',
- options: {
- biDiSupport: false,
- defaultCharset: null,
- defaultLocale: 'en',
- forceContext: false,
- pluralFunction: null,
- verbose: false
- }
- }],
- });
+ // config.module.rules.push({
+ // enforce: 'pre',
+ // test: /\.po$/,
+ // use: [{
+ // loader: 'messageformat-po-loader',
+ // options: {
+ // biDiSupport: false,
+ // defaultCharset: null,
+ // defaultLocale: 'en',
+ // forceContext: false,
+ // pluralFunction: null,
+ // verbose: false
+ // }
+ // }],
+ // });
// config.plugins.push(new I18n())
}
diff --git a/packages/frontend/src/i18n/index.tsx
b/packages/frontend/src/i18n/index.tsx
index fb8250b..5be1a3b 100644
--- a/packages/frontend/src/i18n/index.tsx
+++ b/packages/frontend/src/i18n/index.tsx
@@ -135,7 +135,7 @@ export function Translate({ children }: TranslateProps):
VNode {
const ctx = useTranslationContext()
const translation: string = ctx.handler.ngettext(s, s, 1);
const result = getTranslatedChildren(translation, children)
- return <>{result}</>;
+ return <Fragment>{result}</Fragment>;
}
/**
@@ -188,7 +188,7 @@ export function TranslatePlural({ children, target }:
TranslationPluralProps): V
const ctx = useTranslationContext()
const translation = ctx.handler.ngettext(s, s, 1);
const result = getTranslatedChildren(translation, children);
- return <>{result}</>;
+ return <Fragment>{result}</Fragment>;
}
/**
@@ -199,6 +199,6 @@ export function TranslateSingular({ children, target }:
TranslationPluralProps):
const ctx = useTranslationContext()
const translation = ctx.handler.ngettext(s, s, target);
const result = getTranslatedChildren(translation, children);
- return <>{result}</>;
+ return <Fragment>{result}</Fragment>;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.