WüSpace Email Signature Generator
This is a simple tool to generate a WüSpace email signature. It is accessible at https://signature-generator.wuespace.de .
Development
Prerequisites
- Node.js (>= 16.0.0)
Setup
- Clone the repository
- Install dependencies:
npm ci
- Start the development server:
npm start
- Open the app in your browser: http://localhost:3000
- Make changes to the code and see the changes in the browser
- When you are done, build the app:
npm run build
- The built app is now in the
build
folder
Localization
This project uses react-intl
for localization.
Adding strings
- Use the string in your source code (e.g., using
<FormattedMessage id="myString" defaultMessage="Hello World" />
) - Run
npm run i18n:extract
. This will extract all strings from the source code and add them to thelang/en.json
file.
Translating strings
Translate the strings in the lang
folder. You can use the en.json
file as a
template.
The project also includes a project file for BabelEdit, which you can use to translate the strings.
Compiling translations
Run npm run i18n:compile
. This will compile the translations into the
src/locales
folder (which doesn’t get committed to the repository).
Adding a new language
- Add the language to the
Locale
type insrc/contexts/language-context.tsx
- Copy the
en.json
file inlang
to your corresponding language code (e.g.,de.json
for German) - Run
npm run i18n:compile
to compile the translations - Add the language to the
MESSAGES: Record<Locale, any>
object insrc/App.tsx
- Add corresponding language options to the
LanguageSelector
component insrc/components/LanguageSelector.tsx
License
This project is licensed under the MIT License – see the LICENSE file for details.