From d3d3be1442aea552f22cb283fa42a68f2e447725 Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Sat, 11 Jul 2020 14:48:31 +0200 Subject: [PATCH] I18N: README.md language variants (v0.1.2) * update contents inside README.md * provide language variant (english, german) * document translation handling * installation: download via git Signed-off-by: Ralf Zerres --- README.md | 154 +++++++++++++++------ advotracker/src/locales/advotracker.json | 15 ++ locales/german/README.md | 166 +++++++++++++++++++++++ 3 files changed, 292 insertions(+), 43 deletions(-) create mode 100644 locales/german/README.md diff --git a/README.md b/README.md index 88a9ec7..a0f0882 100755 --- a/README.md +++ b/README.md @@ -1,78 +1,145 @@ - + -# AdvoTracker Hotline tool für Advokaten +## About -`AdvoTracker` unterstützt Anwälte bei der Erfassung von Mandatsdaten zu einer Online-Beratung. +`AdvoTracker` supports lawyers to capture relevant data encountered during an online +legal advice. -Das Tool wurde als multi-Pattform Anwendung konzipiert. +The application components are implemented using the programming language *Rust*. +The graphical user interface (GUI) uses the class-lib *OrbTk*, which is natively +encoded in *Rust* as well. -Als Programmiersprache wird *Rust* verwendet. Die Implementierung der -GUI Elemente erfolgt mit der Klassenbibliothek *OrbTk*. +`AdvoTracker` can be deployed on every target operating system that is officialy +supported by the `OrbTK` toolkit. Currently included are: -Als Dokumentationsquellen wird auf die offiziellen Projektseiten [Rust Book][^1] und [OrbTk][^2] verwiesen. + * macOS + * Linux + * openBSD + * Redox OS + * Web-Browser + * Windows -# Internationalisierung +Porting to and in activ development are: -Alle Dialoge und Meldungen verwenden für die Ausgabe von Texten, die vom Anwender -gewählte Sprache. Sie kann über eine Umgebungsvariable ausgewählt und angepasst -weren (default: LANG = en_US.UTF8 ). + * Android + * iOS + * ubuntu Touch -Die übersetzten Sprachtexte finden sich im Quell-Code Unterverzeichnis 'locales' +Reference is made to the official project pages of [Rust Book][^1] and [OrbTk][^2] +as documentation sources. + +## Internationalization + +Dialogs and messages generated inside the application will respect the system language +of the active user. This is adaptable via the environment variable +(default: LANG = en_US.UTF8 ). + +Within the source code you can find translated constants in the subdirectory 'locales' (/advotracker/src/locales/advotracker.json). -Für jeden unterstützen Sprach-String existiert ein Block mit der generischen -Nachrichten Kennung, gefolgt von spachspezifischen Übersetzungszeilen. -Die Übersetzungszeilen werden mit dem ISO Code der jeweiligen Sprache identifiziert. +For every supported language-string, you will find a block starting with the +generic message code, followed by the target language translation. Translation lines +are identified by its ISO Code (e.g. de_DE.UTF8, es_ES.UTF8). -# Installation +## Installation from source code -## Quell-Code +You can either download the `Advotracker` source code as a Zip-File or using `git` +from projects repositoy URL. -Sie können den Quell-Code von `Advotracker` unter folgender URL als Zip-Datei, -oder unter Verwendung von `git` herunterladen. - -Der Quell-Code ist in drei Submodule untergliedert: +The source code is subdiveded in three submodules: * advotracker * advotrackerd * advotracker-db -Da derzeit ein signiertes Softwarezertifikat einer Microsoft Zertifizierungsstelle -verwendet wird, kann git die Gültigkeit dieses Zertifikats nicht gegen die -offiziellen CA-Listen prüfen. Bitte gehen sie wie folgt vor: +Currently the given WEB-URL certificate is signed by a Microsoft CA. +Since this CA can't be verified from offical CA-lists you have to proceed as follows: ```sh - $ git -c http.https://gitea.networkx.de:50443.sslverify=false \ - clone --recurses-submodules --jobs=10 \ - https://gitea.networkx.de:50443/rzerres/advotracker +$ cd +$ git -c http.https://gitea.networkx.de:50443.sslverify=false \ + clone --recurses-submodules --jobs=10 \ + https://gitea.networkx.de:50443/rzerres/advotracker ``` +To compile the target binary code, you have to use rusts toolchain. +If this isn't already installed on your development system, please go ahead +and either use the official supported installation tool from the rust communtiy +([rustup][^3]). As an alternitiv, you can download and install the compiler package +using your systems package manager. -Für die Erstellung des ausführbaren Programm-Codes wird die Rust Toolchain-Umgebung -verwendet. Sollten diese noch nicht auf Ihrem Entwicklungssystem installiert sein, -verwenden sie entweder den von der Rust-Entwicklergemeinde bereitgestellten -Toolchain-Installer [rustup][^3], oder greifen auf Installationspakete des -Paketmanagers auf ihrem Betriebssystem zurück. +### native operating system binaries -- ** Kompilieren - -Ein für das Zielsystem passendes binary wird durch folgenden Aufruf erzeugt: +A binary compatible with your target operating system will be compiled +with the following command: ```sh - $ cargo build --release -``` -- ** Installation +$ cd +$ cargo build --release +``** +The toolchain also allows to cross-compile for other operating systems. Please +consult the rust documentation for further instructions. -Die Toolchain unsterstützt auch die Installation der ausführbaren Programme: +### web-browser application + +- **prerequistit** + +To run as a browser, electron or cordova app, you have to install cargo-node: ```sh - $ cargo install +cargo install -f cargo-node ``` -Zusätzlich kopieren sie bitte noch den Ordner mit den Ressourcen in das -Zielverzeichnis (enthält fonts, images und stylesheets). +cargo-node will require a working version of `npm` (>=v6.9.0). +You may download [Node.js][^4], which includes npm as well. + +- **Start as browser app** + +You can run `Advotracker` as a web-browser app with the following call. +Once the app is running, you can connect to it opening the given URL +in you Web-Browser. + +```sh +cargo node run --target browser advotracker +``` + +- **Start as electron app** + +```sh +cargo node run --target electron advotracker +``` + +- **Start as android app** + +```sh +cargo node run --target android advotracker +``` + +## Build and run documentation + +You can build and view the latest documentation by executing the following command: + +```sh +cargo doc --no-deps --open +``` +This will render the web-pages, collecting the documentation paragraphs in the +source-code. When finished, it will open a new tab in your web browser +presenting the documentation. + +## Installation + +To install the compiled binary you can use rust package manager `cargo` as well. + +```sh +cd +$ cargo install +``` + +In addition, you will need to copy the resource folder into your target directory. +This will provide the access to used fonts, images und stylesheets. +>>>>>>> 58affe6... I18N: README.md language variants (v0.1.2) --- @@ -82,7 +149,7 @@ This work is licensed under a [Creative Common License 4.0][License-CC_BY] ![Creative Common Logo][Logo-CC_BY] -© 2020 Ralf Zerres, Networkx GmbH +© 2020 Ralf Zerres, Networkx GmbH --- @@ -91,3 +158,4 @@ Foodnotes [^1]: Rust Book: https://doc.rust-lang.org/book/ [^2]: OrbTK GUI: https://gitlab.redox-os.org/redox-os/orbtk [^3]: Rustup: https://rustup.rs/ +[^4]: Node.js: https://nodejs.org/dist/v10.16.3/ diff --git a/advotracker/src/locales/advotracker.json b/advotracker/src/locales/advotracker.json index 13051bc..8dfca22 100644 --- a/advotracker/src/locales/advotracker.json +++ b/advotracker/src/locales/advotracker.json @@ -100,6 +100,11 @@ "de": "Die Versicherungsscheinnummber ist ungültig", "en": "The given policy number is invalid" }, + "policy.validation.new": { + "de_DE.UTF-8": "Neue Prüfung", + "de": "Neue Prüfung", + "en": "New validation" + }, "policy.validation.success": { "de_DE.UTF-8": "Die Versicherungsscheinnummber ist gültig", "de": "Die Versicherungsscheinnummber ist gültig", @@ -115,6 +120,16 @@ "de": "Die Prüfung der Versicherungsscheinnummber wurde beendet", "en": "Validation of the policy number finished" }, + "policy.validation.to_short": { + "de_DE.UTF-8": "Die Nummer ist zu kurz", + "de": "Die Nummer ist zu kurz", + "en": "Policy number is to short" + }, + "policy.validation.to_long": { + "de_DE.UTF-8": "Die Nummer ist zu lang", + "de": "Die Nummer ist zu lang", + "en": "Policy number is to long" + }, "state.started": { "de_DE.UTF-8": "gestartet", "de": "gestartet", diff --git a/locales/german/README.md b/locales/german/README.md new file mode 100644 index 0000000..bf4a8b8 --- /dev/null +++ b/locales/german/README.md @@ -0,0 +1,166 @@ + + + + + + +

+ English | + Englisch + +

+ + +# AdvoTracker Hotline Tools für Advokaten + +`AdvoTracker` unterstützt Anwälte bei der Erfassung von Mandatsdaten zu einer Online-Beratung. + +Die Anwendungskomonenten sind in der Programmiersprache *Rust* implementiert. +Die graphischen Benutzerschnittstelle (GUI) verwendet die Klassenbibliothek *OrbTk*, die +ebenfalls in *Rust* entwickelt wird. + +Die Anwendung ist auf allen durch das Toolkit unterstützen Pattformen ablauffähig. +Hierzu zählen derzeit: + + * macOS + * Linux + * openBSD + * Redox OS + * Web-Browser + * Windows + +In Entwicklung befinden sich native Portierungen auf folgende Systeme: + + * Android + * iOS + * ubuntu Touch + +Als Dokumentationsquellen wird auf die offiziellen Projektseiten [Rust Book][^1] und [OrbTk][^2] verwiesen. + +# Internationalisierung + +Alle Dialoge und Meldungen verwenden für die Ausgabe von Texten, die vom Anwender +gewählte Sprache. Sie kann über eine Umgebungsvariable ausgewählt und angepasst +werden (default: LANG = en_US.UTF8 ). + +Die übersetzten Sprachtexte finden sich im Quell-Code Unterverzeichnis 'locales' +(/advotracker/src/locales/advotracker.json). +Für jeden unterstützen Sprach-String existiert ein Block mit der generischen +Nachrichten Kennung, gefolgt von spachspezifischen Übersetzungszeilen. +Die Übersetzungszeilen werden mit dem ISO Code der jeweiligen Sprache identifiziert. + +# Installation aus dem Quell-Code + +Sie können den Quell-Code von `Advotracker` unter folgender URL als Zip-Datei, +oder unter Verwendung von `git` herunterladen. + +Der Quell-Code ist in drei Submodule untergliedert: + +* advotracker +* advotrackerd +* advotracker-db + +Da derzeit ein signiertes Softwarezertifikat einer Microsoft Zertifizierungsstelle +verwendet wird, kann git die Gültigkeit dieses Zertifikats nicht gegen die +offiziellen CA-Listen prüfen. Bitte gehen sie wie folgt vor: + +```sh +$ cd +$ git -c http.https://gitea.networkx.de:50443.sslverify=false \ + clone --recurses-submodules --jobs=10 \ + https://gitea.networkx.de:50443/rzerres/advotracker +``` + +Für die Erstellung des ausführbaren Programm-Codes wird die Rust Toolchain-Umgebung +verwendet. Sollten diese noch nicht auf Ihrem Entwicklungssystem installiert sein, +verwenden sie entweder den von der Rust-Entwicklergemeinde bereitgestellten +Toolchain-Installer [rustup][^3], oder greifen auf Installationspakete des +Paketmanagers auf ihrem Betriebssystem zurück. + +## native Anwendung für das Ziel-System + +Ein für das Zielsystem passendes binary wird durch folgenden Aufruf erzeugt: + +```sh +$ cd +$ cargo build --release +``` +Die Toolchain unterstützt auch die Erstellung von binaries für andere Ziel-Systeme (cross-compile). +Bitte lesen sie hierzu in der `Rust` Dokumentation für weiterführende Instruktionen. + +### Web-Browser Anwendung + +Um `Advotracker` als Web Applikation zu starten (web-browser, electron, cordova), +muss zunächst das crate `cargo-node` installiert werden: + +```sh +cargo install -f cargo-node +``` + +`cargo-node` benötigt seinerseits eine Version von `npm` (>=v6.9.0), dem +Node Paketmanager. Im Downlaod von `[Node.js][^4]` ist npm enthalten. + +- **Browser App** + +Mit dem nachfolgend angeführten Befehl wird `Advotracker` als WEB-Browser App gestartete. +Verbinden Sie sich anschließend mit Angabe der definierten URL in Ihrem Browser-Fenster +mit der App. + +```sh +cargo node run --target browser advotracker +``` + +- **Electron App** + +```sh +cargo node run --target electron advotracker +``` + +- **Android App** + +```sh +cargo node run --target android advotracker +``` + +## Erstellen der Dokumentation + +Die aktuelle Dokumentation wird mit dem nachfolgenden Befehl erzeugt: + +```sh +cargo doc --no-deps --open +``` + +Die Dokumentationspassagen werden aus dem Quellcode extrahiert, und als WEB Seiten +aufbereitet. Ist die Erstellung abgeschlossen, wird ein neuer Tabulator mit den +Dokumentationsseiten in Ihrem WEB-Browser geöffnet. + +## Installation + +Die Toolchain unterstützt die Installation der ausführbaren Programme: + +```sh +cd +$ cargo install +``` + +Zusätzlich kopieren sie bitte noch den Ordner mit den Ressourcen in das +Zielverzeichnis (enthält fonts, images und stylesheets). + +--- + +[Logo-CC_BY]: https://i.creativecommons.org/l/by/4.0/88x31.png "Creative Common Logo" +[License-CC_BY]: https://creativecommons.org/licenses/by/4.0/legalcode "Creative Common License" +Diese Dokument ist lizensiert unter der [Creative Common License 4.0][License-CC_BY] + +![Creative Common Logo][Logo-CC_BY] + +© 2020 Ralf Zerres, Networkx GmbH + +--- + +Fussnoten + +[^1]: Rust Book: https://doc.rust-lang.org/book/ +[^2]: OrbTK GUI: https://gitlab.redox-os.org/redox-os/orbtk +[^3]: Rustup: https://rustup.rs/ +[^4]: Node.js: https://nodejs.org/dist/v10.16.3/