diff --git a/CHANGELOG.md b/CHANGELOG.md index 293147f..01c3716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Basic support for json array values - Settings option to opt-out code assistance inside editor - Support key completion and annotation for Kotlin language +- Example locale files for all configuration options ### Changed - Update dependencies diff --git a/README.md b/README.md index 61966d5..953ea10 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ Most common use case is for translating Webapps or simple Java Applications. Tra - Select the created directory (optional: define the preferred locale to view) and press Ok - Translations can now be created / edited or deleted +Examples for the configuration can be found in the [/example](https://github.com/marhali/easy-i18n/tree/main/example) folder. + --- Plugin based on the [IntelliJ Platform Plugin Template][template]. diff --git a/example/json/locale-de.json b/example/json/locale-de.json new file mode 100644 index 0000000..d5507f9 --- /dev/null +++ b/example/json/locale-de.json @@ -0,0 +1,26 @@ +{ + "alpha": { + "first": "Beispiel Übersetzung", + "second": "Andere Übersetzung" + }, + "beta": { + "title": "Ein Titel", + "nested": { + "title": "Ein verschachtelter Titel" + } + }, + "gamma": { + "title": "Gamma Titel", + "array": { + "simple": [ + "Erstes Element", + "Zweites Element" + ], + "escaped": [ + "Erstes;Element", + "Zweites Element", + "Drittes;Element" + ] + } + } +} \ No newline at end of file diff --git a/example/json/locale-en.json b/example/json/locale-en.json new file mode 100644 index 0000000..b680645 --- /dev/null +++ b/example/json/locale-en.json @@ -0,0 +1,26 @@ +{ + "alpha": { + "first": "example translation", + "second": "another translation" + }, + "beta": { + "title": "some title", + "nested": { + "title": "some nested title" + } + }, + "gamma": { + "title": "gamma title", + "array": { + "simple": [ + "first element", + "second element" + ], + "escaped": [ + "first;element", + "second element", + "third;element" + ] + } + } +} \ No newline at end of file diff --git a/example/modularized-json/locale-de/account.json b/example/modularized-json/locale-de/account.json new file mode 100644 index 0000000..bcec282 --- /dev/null +++ b/example/modularized-json/locale-de/account.json @@ -0,0 +1,5 @@ +{ + "subscription": "Abonnement", + "support": "Unterstützung", + "delete": "Löschen" +} \ No newline at end of file diff --git a/example/modularized-json/locale-de/auth.json b/example/modularized-json/locale-de/auth.json new file mode 100644 index 0000000..e9476c0 --- /dev/null +++ b/example/modularized-json/locale-de/auth.json @@ -0,0 +1,10 @@ +{ + "title": [ + "Ein", + "array", + "Titel" + ], + "login": "Einloggen", + "logout": "Ausloggen", + "register": "Registrieren" +} \ No newline at end of file diff --git a/example/modularized-json/locale-de/user.json b/example/modularized-json/locale-de/user.json new file mode 100644 index 0000000..46bde56 --- /dev/null +++ b/example/modularized-json/locale-de/user.json @@ -0,0 +1,10 @@ +{ + "username": "Benutzername", + "email": "Email-Adresse", + "address": { + "zip": "Postleitzahl", + "city": "Ort", + "street": "Straße", + "number": "Hausnummer" + } +} \ No newline at end of file diff --git a/example/modularized-json/locale-en/account.json b/example/modularized-json/locale-en/account.json new file mode 100644 index 0000000..8f23bb1 --- /dev/null +++ b/example/modularized-json/locale-en/account.json @@ -0,0 +1,5 @@ +{ + "subscription": "Subscription", + "support": "Support", + "delete": "Delete" +} \ No newline at end of file diff --git a/example/modularized-json/locale-en/auth.json b/example/modularized-json/locale-en/auth.json new file mode 100644 index 0000000..5e7ff0d --- /dev/null +++ b/example/modularized-json/locale-en/auth.json @@ -0,0 +1,10 @@ +{ + "title": [ + "Some", + "array", + "title" + ], + "login": "Login", + "logout": "Logout", + "register": "Register" +} \ No newline at end of file diff --git a/example/modularized-json/locale-en/user.json b/example/modularized-json/locale-en/user.json new file mode 100644 index 0000000..6f2f670 --- /dev/null +++ b/example/modularized-json/locale-en/user.json @@ -0,0 +1,10 @@ +{ + "username": "Username", + "email": "Email Address", + "address": { + "zip": "ZIP code", + "city": "City", + "street": "Street", + "number": "House number" + } +} \ No newline at end of file diff --git a/example/resource-bundle/locale_de.properties b/example/resource-bundle/locale_de.properties new file mode 100644 index 0000000..f7c80e7 --- /dev/null +++ b/example/resource-bundle/locale_de.properties @@ -0,0 +1,6 @@ +account.subscription=Abonnement +auth.login=Einloggen +auth.logout=Ausloggen +auth.register=Registrieren +user.email=Email-Adresse +user.username=Benutzername \ No newline at end of file diff --git a/example/resource-bundle/locale_en.properties b/example/resource-bundle/locale_en.properties new file mode 100644 index 0000000..ca60875 --- /dev/null +++ b/example/resource-bundle/locale_en.properties @@ -0,0 +1,6 @@ +account.subscription=Subscription +auth.login=Login +auth.logout=Logout +auth.register=Register +user.email=Email Address +user.username=Username \ No newline at end of file