Commit 59d9e49c authored by Balázs Szilágyi's avatar Balázs Szilágyi Committed by Balázs Szilágyi

Update translations

* Add TRANSLATION_GUIDE.md
parent 516c7987
Pipeline #144505953 passed with stages
in 8 minutes and 42 seconds
......@@ -23,11 +23,7 @@ I have the following priority list in my mind if it goes about languages.
5. My dream is to have the app also on **Russian** language. Russia is a big market. Very-very big market. No one will pay for the app, but still. I hope this dream comes true.
6. For sure, the next step is **French**, **Spanish**, **Italian**, and other European languages, which are used widely (because of historical reasons)
7. Other languages, which are spoken by some of my helpful friends.
Low priority languages
- Right to left languages. Sorry, it is not just about the translation, but more the layout, and first of all the app itself. It will be definitely a challenge. (or adding flex-direction: row-reverse; ...?)
- And of course ancient and extinct languages. Absolutely no time for that.
8. Right to left languages.
If you like to help in translation of **Any** language, just forget what I wrote. Join on the link or contact me.
......
import React, { ReactNode } from 'react';
import classNames from 'classnames';
import React, { ReactNode, MouseEvent, KeyboardEvent } from 'react';
export const BUTTON_CLASS_NAME = 'Button';
......@@ -24,16 +24,12 @@ export const ButtonDisplayType = {
export type TTypeValue = typeof ButtonDisplayType[keyof typeof ButtonDisplayType];
export type DefaultProps = {
displayType: TTypeValue;
disabled: boolean;
onClick: (
event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>
) => void;
onKeyPress: (
event: React.KeyboardEvent<HTMLAnchorElement | HTMLButtonElement>
) => void;
selected: boolean;
type: 'button' | 'submit' | 'reset';
displayType?: TTypeValue;
disabled?: boolean;
onClick?: (event: MouseEvent) => void;
onKeyPress?: (event: KeyboardEvent) => void;
selected?: boolean;
type?: 'button' | 'submit' | 'reset';
};
export type BaseProps = {
......@@ -50,80 +46,63 @@ export type BaseProps = {
type Props = BaseProps & DefaultProps;
class Button extends React.PureComponent<Props> {
static defaultProps: DefaultProps = {
displayType: ButtonDisplayType.DEFAULT,
disabled: false,
onClick: () => {},
onKeyPress: () => {},
selected: false,
type: 'button',
};
onClick: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement> = (
event
) => {
const Button = ({
children,
className,
color,
disabled = false,
displaySize,
displayType = ButtonDisplayType.DEFAULT,
fullWidth,
inverse,
onClick = (e) => e,
onKeyPress = (e) => e,
selected = false,
square,
title,
type = 'button',
}: Props) => {
function handleOnClick(event: MouseEvent) {
event.preventDefault();
const { disabled, onClick } = this.props;
if (disabled) return;
onClick(event);
};
}
onKeyPress: React.KeyboardEventHandler<
HTMLAnchorElement | HTMLButtonElement
> = (event) => {
function handleOnKeyPress(event: KeyboardEvent) {
event.preventDefault();
const { disabled, onKeyPress } = this.props;
if (disabled) return;
onKeyPress(event);
};
render() {
const {
selected,
children,
className,
color,
disabled,
displaySize,
fullWidth,
square,
type,
displayType,
title,
inverse,
} = this.props;
if (!children) return null;
const buttonClassNames = classNames([
BUTTON_CLASS_NAME,
selected ? 'Button--selected' : '',
displaySize ? `Button--${displaySize}` : '',
`Button--${displayType}`,
color ? `Button--${color}` : '',
fullWidth ? 'Button--fullWidth' : '',
square ? 'Button--square' : '',
disabled ? 'Button--disabled' : '',
inverse ? 'Button--inverse' : '',
className,
]);
return (
<button
className={buttonClassNames}
disabled={disabled}
onClick={this.onClick}
onKeyPress={this.onKeyPress}
type={type}
title={title}
>
{children}
</button>
);
}
}
if (!children) return null;
const buttonClassNames = classNames([
BUTTON_CLASS_NAME,
selected ? 'Button--selected' : '',
displaySize ? `Button--${displaySize}` : '',
`Button--${displayType}`,
color ? `Button--${color}` : '',
fullWidth ? 'Button--fullWidth' : '',
square ? 'Button--square' : '',
disabled ? 'Button--disabled' : '',
inverse ? 'Button--inverse' : '',
className,
]);
return (
<button
className={buttonClassNames}
disabled={disabled}
onClick={handleOnClick}
onKeyPress={handleOnKeyPress}
type={type}
title={title}
>
{children}
</button>
);
};
export default Button;
......@@ -15,11 +15,8 @@
&__container {
display: flex;
padding: $spacer calc(#{$spacer} * 3);
flex-direction: column;
}
&__container {
margin: calc(#{$spacer} * 2) 0;
flex-direction: column;
}
&__menu {
......
import { FormattedMessage, Link } from 'gatsby-plugin-intl';
import React from 'react';
// @ts-ignore
import { FormattedMessage, Link } from 'gatsby-plugin-intl';
type Props = {
siteTitle: string;
......@@ -51,15 +51,6 @@ function Header(props: Props) {
>
<FormattedMessage id="site.navigation.statistics" />
</Link>
<Link
className="menu__item"
activeClassName="menu__item--active"
onClick={handleClose}
to="/pricing/"
>
<FormattedMessage id="site.navigation.pricing" />
</Link>
</menu>
</div>
);
......
......@@ -53,6 +53,7 @@ function SEO({ description, intl, keywords, lang, meta, title }: Props) {
site {
siteMetadata {
name
author
}
}
}
......@@ -61,6 +62,24 @@ function SEO({ description, intl, keywords, lang, meta, title }: Props) {
const metaDescription =
description || intl.formatMessage({ id: 'site.description' });
const metaKeywords = keywords || [
intl.formatMessage({ id: 'site.keywords.online' }),
intl.formatMessage({ id: 'site.keywords.instructor' }),
intl.formatMessage({ id: 'site.keywords.tutor' }),
intl.formatMessage({ id: 'site.keywords.tutorial' }),
intl.formatMessage({ id: 'site.keywords.education' }),
intl.formatMessage({ id: 'site.keywords.teaching' }),
intl.formatMessage({ id: 'site.keywords.learning' }),
intl.formatMessage({ id: 'site.keywords.application' }),
intl.formatMessage({ id: 'site.keywords.typewriting' }),
intl.formatMessage({ id: 'site.keywords.typewriter' }),
intl.formatMessage({ id: 'site.keywords.type' }),
intl.formatMessage({ id: 'site.keywords.10Thumbs' }),
intl.formatMessage({ id: 'site.keywords.tenFinger' }),
intl.formatMessage({ id: 'site.keywords.lessons' }),
intl.formatMessage({ id: 'site.keywords.practices' }),
intl.formatMessage({ id: 'site.keywords.course' }),
];
// Ensure that land string can be matched with RtlLangs
const langCode = lang.replace(/([\-\_].+)/, '').toLowerCase();
......@@ -103,7 +122,7 @@ function SEO({ description, intl, keywords, lang, meta, title }: Props) {
},
{
name: 'twitter:creator',
content: intl.formatMessage({ id: 'site.author' }),
content: site.siteMetadata.author,
},
{
name: 'twitter:title',
......@@ -113,16 +132,11 @@ function SEO({ description, intl, keywords, lang, meta, title }: Props) {
name: 'twitter:description',
content: metaDescription,
},
]
.concat(
typeof keywords !== 'undefined'
? {
name: 'keywords',
content: keywords,
}
: []
)
.concat(meta)}
{
name: 'keywords',
content: metaKeywords,
},
].concat(meta)}
>
<link
rel="stylesheet"
......
This diff is collapsed.
# Translation guide
## Voice and Tone
### Audience
Basically everyone, but especially people who are open-minded and have the willingness to learn, in this case, typing. Regardless of age or anything.
### Formality
The app is informal. By communication, I often write from my perspective as "I" to the user as "you". e.g. "I like to inform you". As the app becomes open source and public, I'm thinking about moving to "we" and "us".
### Domain
The app is about **ten-finger typewriting**, so the category could be education.
## Further details
The typewriter application was written by me back then, and so it had a "specific way of communication", the "my style of explaining it". After more than 10 years it is time to make it more standard, I think it is necessary to serve the public taste. So in general, please try to use words and expressions which are nice, gentle, and friendly. Things you also like to receive if you use an app. However, certain things made this app unique, which I like to keep if possible.
### Fun
Without fun, I can not imagine good teaching and learning. Fun makes my day, and boost my motivation and stamina. But on the other hand, some people like some sort of fun, while others not, so it is hard to find the right balance. An example is the original feedback message when the user made too many errors. The user got a random sentence (it was even spoken, not just written), like "You're dumb" or similar semi-offensive sentences said funnily. I probably lost some users, but I also got feedback about how genial it is... If it goes about fun, please use a slight amount of humor if possible, a sophisticated, exotic, unique one. But don't go for the popular directions, do not try to make something funny, which doesn't have to be.
### clarity
The app should be like a game. There are no explanations for the games usually, they are mostly self-descriptive and straightforward. This should be the case with these lectures too. I try to keep the strings as lean as possible. (The longer explanations will be mainly hidden)
### Synonyms
By translating "repeating" content, like `site.keywords`, please use your imagination or a synonym dictionary. If your language does not contain as many synonyms as many exist in English, e.g. "lesson, practice, course, tutorial", please use something similar, which fits the topic, something which people may search for on your language. If you translate a "collection" like `site.keywords`, please try not to use the same word twice, rather a word which may not a right translation, but a good fit for the overall topic.
### Technical
Because of maintainability reasons, I try to keep the amount strings limited. This leads to a programmatical combination of words, like "left" and "hand" and "index finger" becomes "left hand left index finger". Please pay attention if you see {curly brackets} in the strings because they indicate a placeholder of a different string or value.
{
"site.title": "Online Maschinenschreiblehrer Program",
"site.description": "DE description",
"site.author": "Balázs Szilágyi",
"site.keywords": "Lehrer, Programm, Schreiblehrer, dactylography, zehn Finger, Unterricht, Lektionen, Kurse, Maschinenschreiber, Online",
"site.description": "",
"site.keywords.online": "online",
"site.keywords.instructor": "Lehrer",
"site.keywords.tutor": "Erzieher",
"site.keywords.tutorial": "Lernprogramm",
"site.keywords.education": "Bildung",
"site.keywords.teaching": "Unterricht",
"site.keywords.learning": "Lernen",
"site.keywords.application": "Anwendung",
"site.keywords.typewriting": "Maschinenschreiben",
"site.keywords.typewriter": "Schreibmaschine",
"site.keywords.type": "tippen",
"site.keywords.typing": "Tippen",
"site.keywords.10Thumbs": "10 Finger",
"site.keywords.tenFinger": "zehn Finger",
"site.keywords.lessons": "Lektionen",
"site.keywords.practices": "Übungen",
"site.keywords.course": "Kurse",
"site.navigation.home": "Startseite",
"site.navigation.program": "Maschinenschreiblehrer",
"site.navigation.statistics": "Statistik",
"site.navigation.pricing": "Preisgestaltung",
"typewriter.page.title": "Schreiblehrer Program",
"pricing.page.title": "Preisgestaltung",
"pricing.licence.mini": "Basic",
"pricing.licence.small": "Premium",
"pricing.licence.medium": "Deluxe",
"pricing.licence.large": "Diamant",
"pricing.pricePerMonth": "{price} pro Monat",
"pricing.discount.limited": "Jetzt, nur für kurze zeit",
"pricing.benefit.1": "Write with ten fingers at once",
"pricing.callToAction": "Tarif wählen",
"404.page.title": "Nicht gefunden",
"404.page.desc": "Die von Ihnen gesuchte Seite wurde nicht gefunden",
"error.title": "Fehler",
"error.not.found.character.on.keyboard": "Diese Karakter kann nicht gefunden",
"modal.ok": "Okay",
"appStatistics.allKeyboards": "different keyboard layouts",
"appStatistics.allKeyboardLanguages": "available keyboard languages",
"appStatistics.allCharacters": "supported characters",
"appStatistics.allDeadKeys": "dead, hidden keys"
"appStatistics.allDeadKeys": "dead, hidden keys",
"site.version": "Version: {version}",
"site.copyright": "Alle Rechte vorbehalten.",
"site.customerSupport": "Kundendienst",
"site.legalNotice": "Impressum",
"site.termsOfUse": "Nutzungsbedingungen",
"site.privacyPolicy": "Datenschutz-Bestimmungen",
"site.contactInfo": "",
"site.email": "E-Mail",
"site.about": "Über uns",
"site.navigation.settings": "Einstellungen",
"typewriter.page.desc": "",
"general.ok": "OK",
"general.cancel": "Abbrechen",
"general.error.title": "Fehler",
"site.languageNameOnNativeLanguage": "Deutsch"
}
{
"site.title": "Online Typewriter Application",
"site.description": "Free online typing practices. Learn to type properly, increase your typing skills and boost your typing speed.",
"site.keywords": "online, teacher, program, typewriting, ten thumbs, ten fingers, lessons, practices, typewriter, typing",
"site.keywords.online": "online",
"site.keywords.instructor": "instructor",
"site.keywords.tutor": "tutor",
"site.keywords.tutorial": "tutorial",
"site.keywords.education": "education",
"site.keywords.teaching": "teaching",
"site.keywords.learning": "learning",
"site.keywords.application": "application",
"site.keywords.typewriting": "typewriting",
"site.keywords.typewriter": "typewriter",
"site.keywords.type": "type",
"site.keywords.typing": "typing",
"site.keywords.10Thumbs": "10 thumbs",
"site.keywords.tenFinger": "ten-finger",
"site.keywords.lessons": "lessons",
"site.keywords.practices": "practices",
"site.keywords.course": "course",
"site.navigation.home": "Home",
"site.navigation.program": "Typewriter application",
"site.navigation.statistics": "Statistics",
......@@ -9,11 +25,6 @@
"404.page.title": "Not found",
"404.page.desc": "The page you are looking for could not be found",
"error.not.found.character.on.keyboard": "Could not find character on the keyboard",
"appStatistics.allKeyboards": "different keyboard layouts",
"appStatistics.allKeyboardLanguages": "available keyboard languages",
"appStatistics.allCharacters": "supported characters",
"appStatistics.allDeadKeys": "dead, hidden keys",
"site.languageNameOnNativeLanguage": "English",
"site.version": "version: {version}",
"site.copyright": "All rights reserved.",
"site.customerSupport": "Customer Support",
......@@ -24,8 +35,23 @@
"site.email": "Email",
"site.about": "About",
"site.navigation.settings": "Settings",
"site.underDevelopement": "Under developement",
"site.warning.mobile": "It seems that you using a mobile device. This app only works on desktop device. In order to learn typewriting with ten fingers and to use this app you need a keyboard.",
"typewriter.page.desc": "",
"general.ok": "OK",
"general.cancel": "Cancel",
"general.error.title": "Error"
"general.error.title": "Error",
"site.languageNameOnNativeLanguage": "English",
"typing.showHands": "Show hands",
"typing.hideHands": "Hide hands",
"typing.hand.left": "left hand",
"typing.hand.right": "right hand",
"typing.finger.thumb": "thumb",
"typing.finger.index": "index finger",
"typing.finger.middle": "middle finger",
"typing.finger.ring": "ring finger",
"typing.finger.little": "pinky finger",
"typing.hand.finger": "{hand} {finger}",
"contribution.translate.title": "Please help in translation of the page",
"contribution.translate.desc": "If you understand english (or hungarian) you can help people to use this application on they own native language. You find further details on the link below"
}
{
"site.title": "Online gépírás oktató program",
"site.description": "Online gépírás oktató program, mellyel könnyen gyakorolhatod a gépírást, tízujjas vakírást.",
"site.keywords": "oktató, program, gépírás, tízujjas, leckék, gépíró, online",
"site.description": "Online gépírás oktató program, mellyel könnyen gyakorolhatod a gépírást, tízujjas gépelést.",
"site.keywords.online": "online",
"site.keywords.instructor": "oktató",
"site.keywords.tutor": "tanító",
"site.keywords.tutorial": "oktatási",
"site.keywords.education": "oktatás",
"site.keywords.teaching": "tanítás",
"site.keywords.learning": "tanulás",
"site.keywords.application": "alkalmazás",
"site.keywords.typewriting": "gépírás",
"site.keywords.typewriter": "írógép",
"site.keywords.type": "gépel",
"site.keywords.typing": "gépelés",
"site.keywords.10Thumbs": "10 ujjas",
"site.keywords.tenFinger": "tíz ujj",
"site.keywords.lessons": "leckék",
"site.keywords.practices": "gyakorlatok",
"site.keywords.course": "tanfolyam",
"site.keywords": " program, gépírás, tízujjas, leckék, gépíró, online",
"site.navigation.home": "Kezdőlap",
"site.navigation.program": "Gépíró program",
"site.navigation.statistics": "Statisztika",
......@@ -23,8 +40,23 @@
"site.email": "Email",
"site.about": "Rólunk",
"site.navigation.settings": "Beállítások",
"site.underDevelopement": "Fejlesztés alatt!",
"site.warning.mobile": "Úgy tűnik, mobil eszközt használsz. Ez az oldal csak asztali számítógépen működik. A gépírás tanulásához, így az oldal használatához billentyűzetre van szükséged.",
"typewriter.page.desc": "",
"general.ok": "Rendben",
"general.cancel": "Mégse",
"general.error.title": "Hiba"
}
\ No newline at end of file
"general.error.title": "Hiba",
"site.languageNameOnNativeLanguage": "Magyar",
"typing.showHands": "Show hands",
"typing.hideHands": "Hide hands",
"typing.hand.left": "left hand",
"typing.hand.right": "right hand",
"typing.finger.thumb": "thumb",
"typing.finger.index": "index finger",
"typing.finger.middle": "middle finger",
"typing.finger.ring": "ring finger",
"typing.finger.little": "pinky finger",
"typing.hand.finger": "{hand} {finger}",
"contribution.translate.title": "Kérlek segíts az oldal lefordításában.",
"contribution.translate.desc": "Ha értesz angolul ( vagy németül vagy magyarul ) segíthetsz abban, hogy a felhasználók az oldalt a te nyelveden is elérjék és használni tudják. További részleteket az alábbi linken találsz."
}
{
"site.navigation.pricing": "Pricing",
"site.info.underDevelopement": "Under developement",
"site.info.mobileWarning": "It seems that you using a mobile device. The application only works on desktop device. To learn typing with 1ö fingers and to use the app you need a keyboard.",
"pricing.page.title": "Pricing",
"pricing.licence.mini": "Basic",
"pricing.licence.small": "Premium",
......@@ -9,14 +11,9 @@
"pricing.discount.limited": "Now, only for short time",
"pricing.benefit.1": "Write with ten fingers at once",
"pricing.callToAction": "Try it out now!",
"typing.showHands": "Show hands",
"typing.hideHands": "Hide hands",
"typing.hand.left": "left hand",
"typing.hand.right": "right hand",
"typing.finger.thumb": "thumb",
"typing.finger.index": "index finger",
"typing.finger.middle": "middle finger",
"typing.finger.ring": "ring finger",
"typing.finger.little": "pinky finger",
"typing.hand.finger": "{hand} {finger}"
"appStatistics.allKeyboards": "different keyboard layouts",
"appStatistics.allKeyboardLanguages": "available keyboard languages",
"appStatistics.allCharacters": "supported characters",
"appStatistics.allDeadKeys": "dead, hidden keys"
}
import { Link } from 'gatsby';
import { injectIntl, FormattedMessage } from 'gatsby-plugin-intl';
import React from 'react';
// @ts-ignore
import { injectIntl } from 'gatsby-plugin-intl';
import { Link } from 'gatsby';
import { IntlShape } from 'react-intl';
import AppStatistics from '../components/AppStatistics';
import Layout from '../components/Layout';
import SEO from '../components/seo';
......@@ -18,7 +17,7 @@ const IndexPage = ({ intl }: Props) => (
<h1>HomePage</h1>
<h3>
<i className="fa fa-home"></i>Under development
<FormattedMessage id="site.underDevelopement" />
</h3>
<p>
......@@ -26,8 +25,6 @@ const IndexPage = ({ intl }: Props) => (
<a href="https://github.com/manonet/typing/">Github repository</a>
</p>
<Link to="/typewriter/">Go to the Typewriter</Link>
<AppStatistics />
</Layout>
);
......
import { injectIntl } from 'gatsby-plugin-intl';
import React from 'react';
// @ts-ignore
import { injectIntl } from 'gatsby-plugin-intl';
import { IntlShape } from 'react-intl';
import Layout from '../components/Layout';
import SEO from '../components/seo';
import Typewriter from '../components/Typewriter';
import SEO from '../components/seo';
type Props = {
intl: IntlShape;
......@@ -45,7 +45,6 @@ class TypewriterPage extends React.Component<Props, State> {
<SEO
lang={intl.locale}
title={intl.formatMessage({ id: 'typewriter.page.title' })}
keywords={intl.formatMessage({ id: 'site.keywords' })}
/>
<Typewriter
isModalOpen={isModalOpen}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment