From f0e44f5f87fa68242224168b14136fd523ca7a17 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Fri, 22 May 2020 11:33:15 +0200 Subject: [PATCH 01/14] updated surname --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 20f738a..b652fb6 100644 --- a/readme.md +++ b/readme.md @@ -78,7 +78,7 @@ TYPEMILL is published under MIT licence. Please check the licence of the include ## Contributors & Supporters -* [Severo Juliano](https://github.com/iusvar) manages the internationalization i18n. +* [Severo Iuliano](https://github.com/iusvar) manages the internationalization i18n. * [Eziquel Bruni](https://github.com/EzequielBruni) edits the typemill documentation. * [Ricky](https://github.com/rbertram90) developed the discard functionality. * [vodaris](https://www.vodaris.de) sponsored the development of the search plugin. @@ -86,7 +86,7 @@ TYPEMILL is published under MIT licence. Please check the licence of the include * Dutch: [svanlaere](https://github.com/svanlaere) * French: [Olivier Crouzet]https://github.com/oliviercrouzet * German: [trendschau](https://github.com/trendschau) - * Italian: [Severo Juliano](https://github.com/iusvar) + * Italian: [Severo Iuliano](https://github.com/iusvar) * Russian: [Hide-me](https://github.com/hide-me) ## How to Contribute @@ -123,4 +123,4 @@ Donate: https://www.paypal.me/typemill ## Follow -Twitter: https://twitter.com/typemill \ No newline at end of file +Twitter: https://twitter.com/typemill From c20d58814d469d1fe2ea380dcd14304d7ec65a91 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Fri, 22 May 2020 11:45:18 +0200 Subject: [PATCH 02/14] updated link --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index b652fb6..94a4631 100644 --- a/readme.md +++ b/readme.md @@ -84,7 +84,7 @@ TYPEMILL is published under MIT licence. Please check the licence of the include * [vodaris](https://www.vodaris.de) sponsored the development of the search plugin. * Translations: * Dutch: [svanlaere](https://github.com/svanlaere) - * French: [Olivier Crouzet]https://github.com/oliviercrouzet + * French: [Olivier Crouzet](https://github.com/oliviercrouzet) * German: [trendschau](https://github.com/trendschau) * Italian: [Severo Iuliano](https://github.com/iusvar) * Russian: [Hide-me](https://github.com/hide-me) From 066ffddae1260e6a67c49bb3fe4063cb805e0ce9 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Fri, 22 May 2020 11:45:59 +0200 Subject: [PATCH 03/14] removed empty line --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 94a4631..f003ad8 100644 --- a/readme.md +++ b/readme.md @@ -123,4 +123,4 @@ Donate: https://www.paypal.me/typemill ## Follow -Twitter: https://twitter.com/typemill +Twitter: https://twitter.com/typemill \ No newline at end of file From 509d45fc2726655fa331d95b4d79bb57611e9809 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 22:52:08 +0200 Subject: [PATCH 04/14] update for metadata images and setup --- composer.lock | 20 ++++++++-------- system/author/languages/de.yaml | 34 +++++++++++++-------------- system/author/languages/en.yaml | 39 +++++++++++++++++-------------- system/author/languages/fr.yaml | 34 +++++++++++++-------------- system/author/languages/it.yaml | 41 ++++++++++++++++++--------------- 5 files changed, 89 insertions(+), 79 deletions(-) diff --git a/composer.lock b/composer.lock index 7976cb3..ad03965 100644 --- a/composer.lock +++ b/composer.lock @@ -686,16 +686,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", "shasum": "" }, "require": { @@ -707,7 +707,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -740,7 +740,7 @@ "polyfill", "portable" ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:14:59+00:00" }, { "name": "symfony/yaml", @@ -862,12 +862,12 @@ "source": { "type": "git", "url": "https://github.com/vlucas/valitron.git", - "reference": "43e9393009220353445dc5cbe6da1442d71d87ab" + "reference": "4af076d19f3cd4fd61f560cba115316834c7fe81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/valitron/zipball/43e9393009220353445dc5cbe6da1442d71d87ab", - "reference": "43e9393009220353445dc5cbe6da1442d71d87ab", + "url": "https://api.github.com/repos/vlucas/valitron/zipball/4af076d19f3cd4fd61f560cba115316834c7fe81", + "reference": "4af076d19f3cd4fd61f560cba115316834c7fe81", "shasum": "" }, "require": { @@ -903,7 +903,7 @@ "validation", "validator" ], - "time": "2020-03-05T19:31:19+00:00" + "time": "2020-05-14T14:50:07+00:00" } ], "packages-dev": [], diff --git a/system/author/languages/de.yaml b/system/author/languages/de.yaml index 9f47359..52d3abb 100644 --- a/system/author/languages/de.yaml +++ b/system/author/languages/de.yaml @@ -190,20 +190,20 @@ WRITING: Schreiben YEAR: Jahr YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: Du kannst das CSS des Themes hier überschreiben. -SW_SETUP_WELCOME: Setup Willkommen -SW_HURRA: Hurra -SW_YOUR_ACCOUNT: Dein Account wurde erstellt und du bist jetzt angemeldet. -SW_NEXT_STOP: Nächster Schritt: -SW_VISIT: Besuche die Autorenoberfläche und richte die Seite ein. Du kannst das System konfigurieren, Themes auswählen and Plugins hinzufügen. -SW_GET_HELP: Hilfe erhalten: -SW_IF_YOU_HAVE: Wenn du Fragen hast, lies bitte die -SW_DOCS: Dokumentation -SW_OR_OPEN: oder öffne ein neues Issue -SW_CODED: Entwickelt mit -SW_BY: von der -SW_COMMUNITY: Community -SW_TRENDSCHAU: Trendschau Digital -SW_CONFIGURE: Richte deine Seite ein. -SW_GIVE_YOUR_NEW: Gib deiner neuen Seite einen Namen, füge Autoren hinzu und wähle ein Copyright. -SW_CHOOSE_A_THEME: Richte ein Theme für deine Webseite ein. -SW_ADD_NEW_FEATURE: Füge mit Plugins neue Funktionen hinzu. +SETUP_WELCOME: Setup Willkommen +HURRA: Hurra +YOUR_ACCOUNT_HAS_BEEN_CREATED_AND_YOU_ARE_LOGGED_IN_NOW_: Dein Account wurde erstellt und du bist jetzt angemeldet. +NEXT_STEP: Nächster Schritt: +VISIT_THE_AUTHOR_PANEL_AND_SETUP_YOUR_NEW_WEBSITE__YOU_CAN_CONFIGURE_THE_SYSTEM__CHOOSE_THEMES_AND_ADD_PLUGINS_: Besuche die Autorenoberfläche und richte die Seite ein. Du kannst das System konfigurieren, Themes auswählen and Plugins hinzufügen. +GET_HELP: Hilfe erhalten +IF_YOU_HAVE_ANY_QUESTIONS__PLEASE_READ_THE: Wenn du Fragen hast, lies bitte die +DOCS: Dokumentation +OR_OPEN_A_NEW_ISSUE_ON: oder öffne ein neues Issue +CODED_WITH: Entwickelt mit +BY_THE: von der +COMMUNITY: Community +TRENDSCHAU_DIGITAL: Trendschau Digital +CONFIGURE_YOUR_WEBSITE: Richte deine Seite ein. +GIVE_YOUR_NEW_WEBSITE_A_NAME__ADD_THE_AUTHOR_AND_CHOOSE_A_COPYRIGHT_: Gib deiner neuen Seite einen Namen, füge Autoren hinzu und wähle ein Copyright. +CHOOSE_A_THEME_FOR_YOUR_WEBSITE_AND_CONFIGURE_THE_THEME_DETAILS_: Richte ein Theme für deine Webseite ein. +ADD_NEW_FEATURES_TO_YOUR_WEBSITE_WITH_PLUGINS_AND_CONFIGURE_THEM_: Füge mit Plugins neue Funktionen hinzu. diff --git a/system/author/languages/en.yaml b/system/author/languages/en.yaml index 9cfc493..215085a 100644 --- a/system/author/languages/en.yaml +++ b/system/author/languages/en.yaml @@ -15,6 +15,7 @@ ADD_ROW_ABOVE: add row above ADD_ROW_BELOW: add row below ALL_USERS: All users ALT_TEXT: Alt-Text +ALTERNATIVE_TEXT_FOR_THE_HERO_IMAGE: Alternative Text for the hero image AUTHOR: Author BACK_TO_STARTPAGE: back to startpage BOLD: bold @@ -78,6 +79,7 @@ GOOGLE_SITEMAP: Google Sitemap HEAD: Head HEADLINE_ANCHORS: Headline Anchors HEADLINE: Headline +HERO_IMAGE: Hero Image HIDE: Hide HIDE_PAGE_FROM_NAVIGATION: Hide page from navigation HOME: home @@ -87,6 +89,7 @@ HR: hr IF_NOT_FILLED__THE_DESCRIPTION_IS_EXTRACTED_FROM_CONTENT_: If not filled, the description is extracted from content. IMAGE: Image IMAGES: Images +IMAGE_URL__READ_ONLY_: Image URL (read only) ITALIAN: Italian ITALIC: italic LANGUAGE: Language @@ -103,6 +106,7 @@ LOGO: Logo LOGOUT: Logout MANUAL_DATE: Manual date MARKDOWN: markdown +MAXIMUM_SIZE_FOR_AN_IMAGE_IS_5_MB__HERO_IMAGES_ARE_NOT_SUPPORTED_BY_ALL_THEMES_: Maximum size for an image is 5 MB. Hero images are not supported by all themes. MENU: Menu META_DESCRIPTION: Meta description META: meta @@ -168,6 +172,7 @@ ULIST: ulist UNKNOWN: Unknown UPDATE_USER: Update User UPLOAD_FILE: Upload a file +UPLOAD_AN_IMAGE: upload an image UPLOAD: upload USE_2_TO_20_CHARACTERS: Use 2 to 20 characters. USE_2_TO_40_CHARACTERS: Use 2 to 40 characters. @@ -191,20 +196,20 @@ WRITING: Writing YEAR: Year YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: You can overwrite the theme-css with your own css here. -SW_SETUP_WELCOME: Setup Welcome -SW_HURRA: Hurra -SW_YOUR_ACCOUNT: Your account has been created and you are logged in now. -SW_NEXT_STOP: Next step: -SW_VISIT: Visit the author panel and setup your new website. You can configure the system, choose themes and add plugins. -SW_GET_HELP: Get help: -SW_IF_YOU_HAVE: If you have any questions, please read the -SW_DOCS: docs -SW_OR_OPEN: or open a new issue on -SW_CODED: Coded with -SW_BY: by the -SW_COMMUNITY: community -SW_TRENDSCHAU: Trendschau Digital -SW_CONFIGURE: Configure your website -SW_GIVE_YOUR_NEW: Give your new website a name, add the author and choose a copyright. -SW_CHOOSE_A_THEME: Choose a theme for your website and configure the theme details. -SW_ADD_NEW_FEATURE: Add new features to your website with plugins and configure them. +SETUP_WELCOME: Setup Welcome +HURRA: Hurra +YOUR_ACCOUNT_HAS_BEEN_CREATED_AND_YOU_ARE_LOGGED_IN_NOW_: Your account has been created and you are logged in now. +NEXT_STEP: Next step +VISIT_THE_AUTHOR_PANEL_AND_SETUP_YOUR_NEW_WEBSITE__YOU_CAN_CONFIGURE_THE_SYSTEM__CHOOSE_THEMES_AND_ADD_PLUGINS_: Visit the author panel and setup your new website. You can configure the system, choose themes and add plugins. +GET_HELP: Get help +IF_YOU_HAVE_ANY_QUESTIONS__PLEASE_READ_THE: If you have any questions, please read the +DOCS: docs +OR_OPEN_A_NEW_ISSUE_ON: or open a new issue on +CODED_WITH: Coded with +BY_THE: by the +COMMUNITY: community +TRENDSCHAU_DIGITAL: Trendschau Digital +CONFIGURE_YOUR_WEBSITE: Configure your website +GIVE_YOUR_NEW_WEBSITE_A_NAME__ADD_THE_AUTHOR_AND_CHOOSE_A_COPYRIGHT_: Give your new website a name, add the author and choose a copyright. +CHOOSE_A_THEME_FOR_YOUR_WEBSITE_AND_CONFIGURE_THE_THEME_DETAILS_: Choose a theme for your website and configure the theme details. +ADD_NEW_FEATURES_TO_YOUR_WEBSITE_WITH_PLUGINS_AND_CONFIGURE_THEM_: Add new features to your website with plugins and configure them. diff --git a/system/author/languages/fr.yaml b/system/author/languages/fr.yaml index 8a3d9c6..201df6c 100644 --- a/system/author/languages/fr.yaml +++ b/system/author/languages/fr.yaml @@ -189,20 +189,20 @@ WRITING: Rédaction YEAR: Année YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: Vous pouvez surcharger ici le css du thème avec vos propres styles. -SW_SETUP_WELCOME: Bienvenue dans l'installation -SW_HURRA: Hourrah -SW_YOUR_ACCOUNT: Votre compte a été créé et vous êtes maintenant connecté -SW_NEXT_STOP: Prochaine étape: -SW_VISIT: Visitez le volet Auteur et configurez votre nouveau site. Vous pouvez paramétrer le système, choisir un thème et ajouter des plugins. -SW_GET_HELP: Obtenir de l'aide: -SW_IF_YOU_HAVE: Pour toutes questions, veuillez consulter la -SW_DOCS: documentation -SW_OR_OPEN: ou ouvrir un nouveau bug sur -SW_CODED: Codé avec -SW_BY: par -SW_COMMUNITY: communauté -SW_TRENDSCHAU: Trendschau Digital -SW_CONFIGURE: Configurez votre site -SW_GIVE_YOUR_NEW: Donnez un nom à votre nouveau site, ajouter un auteur et choisissez un copyright. -SW_CHOOSE_A_THEME: Choisissez un thème pour votre site et configurez les details du thème. -SW_ADD_NEW_FEATURE: Ajoutez de nouvelles fonctionnalités à votre site grâce aux plugins et configurez-les. +SETUP_WELCOME: Bienvenue dans l'installation +HURRA: Hourrah +YOUR_ACCOUNT_HAS_BEEN_CREATED_AND_YOU_ARE_LOGGED_IN_NOW_: Votre compte a été créé et vous êtes maintenant connecté +NEXT_STEP: Prochaine étape: +VISIT_THE_AUTHOR_PANEL_AND_SETUP_YOUR_NEW_WEBSITE__YOU_CAN_CONFIGURE_THE_SYSTEM__CHOOSE_THEMES_AND_ADD_PLUGINS_: Visitez le volet Auteur et configurez votre nouveau site. Vous pouvez paramétrer le système, choisir un thème et ajouter des plugins. +GET_HELP: Obtenir de l'aide: +IF_YOU_HAVE_ANY_QUESTIONS__PLEASE_READ_THE: Pour toutes questions, veuillez consulter la +DOCS: documentation +OR_OPEN_A_NEW_ISSUE_ON: ou ouvrir un nouveau bug sur +CODED_WITH: Codé avec +BY_THE: par +COMMUNITY: communauté +TRENDSCHAU_DIGITAL: Trendschau Digital +CONFIGURE_YOUR_WEBSITE: Configurez votre site +GIVE_YOUR_NEW_WEBSITE_A_NAME__ADD_THE_AUTHOR_AND_CHOOSE_A_COPYRIGHT_: Donnez un nom à votre nouveau site, ajouter un auteur et choisissez un copyright. +CHOOSE_A_THEME_FOR_YOUR_WEBSITE_AND_CONFIGURE_THE_THEME_DETAILS_: Choisissez un thème pour votre site et configurez les details du thème. +ADD_NEW_FEATURES_TO_YOUR_WEBSITE_WITH_PLUGINS_AND_CONFIGURE_THEM_: Ajoutez de nouvelles fonctionnalités à votre site grâce aux plugins et configurez-les. diff --git a/system/author/languages/it.yaml b/system/author/languages/it.yaml index 1e5cc73..fd8008b 100644 --- a/system/author/languages/it.yaml +++ b/system/author/languages/it.yaml @@ -15,6 +15,7 @@ ADD_ROW_ABOVE: aggiungi la riga sopra ADD_ROW_BELOW: aggiungi la riga sotto ALL_USERS: Tutti gli utenti ALT_TEXT: Testo alternativo +ALTERNATIVE_TEXT_FOR_THE_HERO_IMAGE: Testo alternativo per l'immagine hero AUTHOR: Autore BACK_TO_STARTPAGE: torna alla pagina iniziale BOLD: grassetto @@ -78,6 +79,7 @@ GOOGLE_SITEMAP: Sitemap di Google HEAD: Intestazione HEADLINE_ANCHORS: Ancoraggi del titolo HEADLINE: Titolo +HERO_IMAGE: Immagine Hero HIDE: Nascondi HIDE_PAGE_FROM_NAVIGATION: Nasconde la pagina dalla navigazione HOME: home @@ -87,11 +89,12 @@ HR: Linea orizzontale IF_NOT_FILLED__THE_DESCRIPTION_IS_EXTRACTED_FROM_CONTENT_: Se non compilato, la descrizione viene estratta dal contenuto. IMAGE: Immagine IMAGES: Immagini +IMAGE_URL__READ_ONLY_: Immagine URL (sola lettura) ITALIAN: Italiano ITALIC: corsivo LANGUAGE: Lingua LANGUAGE_ADMIN: Lingua (admin-ui) -LANGUAGE_ATTR: Language Attribute (website) +LANGUAGE_ATTR: Attributo Lingua (sito) LAST_MODIFIED_LIVE__READONLY_: Ultima modifica (sola lettura) LAST_NAME: Cognome LEFT: Sinistra @@ -103,6 +106,7 @@ LOGO: Logo LOGOUT: Esci MANUAL_DATE: Data manuale MARKDOWN: Markdown +MAXIMUM_SIZE_FOR_AN_IMAGE_IS_5_MB__HERO_IMAGES_ARE_NOT_SUPPORTED_BY_ALL_THEMES_: La dimensione massima per un'immagine è di 5 MB. Le immagini hero non sono supportate da tutti i temi. MENU: Menu META_DESCRIPTION: Descrizione META: Metadati @@ -169,6 +173,7 @@ UNKNOWN: Ignoto UPDATE_USER: Aggiorna utente UPLOAD: carica UPLOAD_FILE: Carica un file +UPLOAD_AN_IMAGE: carica un'immagine USE_2_TO_20_CHARACTERS: Usa da 2 a 20 caratteri. USE_2_TO_40_CHARACTERS: Usa da 2 a 40 caratteri. USE_A_VALID_LANGUAGE_ATTRIBUTE: Use a valid language attribute @@ -191,20 +196,20 @@ WRITING: Scrittura YEAR: Anno YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: È possibile sovrascrivere il css del tema con il proprio CSS qui. -SW_SETUP_WELCOME: Benvenuto all'installazione -SW_HURRA: Evviva -SW_YOUR_ACCOUNT: Il tuo account è stato creato e ora sei connesso. -SW_NEXT_STOP: Prossimo passo: -SW_VISIT: Visita il pannello autore e configura il tuo nuovo sito. Puoi configurare il sistema, scegliere i temi e aggiungere plugin. -SW_GET_HELP: Chiedi aiuto: -SW_IF_YOU_HAVE: In caso di domande, si prega di leggere la -SW_DOCS: documentazione -SW_OR_OPEN: o aprire un nuovo problema su -SW_CODED: Codificato con -SW_BY: dalla -SW_COMMUNITY: comunità -SW_TRENDSCHAU: Trendschau Digital -SW_CONFIGURE: Configura il tuo sito -SW_GIVE_YOUR_NEW: Dai un nome al tuo nuovo sito, aggiungi l'autore e scegli un diritto d'autore. -SW_CHOOSE_A_THEME: Scegli un tema per il tuo sito e configura i dettagli del tema. -SW_ADD_NEW_FEATURE: Aggiungi nuove funzionalità al tuo sito mediante plugin e configurali. +SETUP_WELCOME: Benvenuto all'installazione +HURRA: Evviva +YOUR_ACCOUNT_HAS_BEEN_CREATED_AND_YOU_ARE_LOGGED_IN_NOW_: Il tuo account è stato creato e ora sei connesso. +NEXT_STEP: Prossimo passo +VISIT_THE_AUTHOR_PANEL_AND_SETUP_YOUR_NEW_WEBSITE__YOU_CAN_CONFIGURE_THE_SYSTEM__CHOOSE_THEMES_AND_ADD_PLUGINS_: Visita il pannello autore e configura il tuo nuovo sito. Puoi configurare il sistema, scegliere i temi e aggiungere plugin. +GET_HELP: Chiedi aiuto +IF_YOU_HAVE_ANY_QUESTIONS__PLEASE_READ_THE: In caso di domande, si prega di leggere la +DOCS: documentazione +OR_OPEN_A_NEW_ISSUE_ON: o aprire un nuovo problema su +CODED_WITH: Codificato con +BY_THE: dalla +COMMUNITY: comunità +TRENDSCHAU_DIGITAL: Trendschau Digital +CONFIGURE_YOUR_WEBSITE: Configura il tuo sito +GIVE_YOUR_NEW_WEBSITE_A_NAME__ADD_THE_AUTHOR_AND_CHOOSE_A_COPYRIGHT_: Dai un nome al tuo nuovo sito, aggiungi l'autore e scegli un diritto d'autore. +CHOOSE_A_THEME_FOR_YOUR_WEBSITE_AND_CONFIGURE_THE_THEME_DETAILS_: Scegli un tema per il tuo sito e configura i dettagli del tema. +ADD_NEW_FEATURES_TO_YOUR_WEBSITE_WITH_PLUGINS_AND_CONFIGURE_THEM_: Aggiungi nuove funzionalità al tuo sito mediante plugin e configurali. From 2de69bb8044559050e4511b3cc8b6fe3bbec37b9 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:00:07 +0200 Subject: [PATCH 05/14] changed position to file languages in the theme --- themes/typemill/languages/{ => admin}/de.yaml | 0 themes/typemill/languages/{ => admin}/en.yaml | 0 themes/typemill/languages/{ => admin}/fr.yaml | 0 themes/typemill/languages/{ => admin}/it.yaml | 0 themes/typemill/languages/{ => admin}/nl.yaml | 0 themes/typemill/languages/{ => admin}/ru.yaml | 0 themes/typemill/languages/user/en.yaml | 1 + themes/typemill/languages/user/it.yaml | 1 + 8 files changed, 2 insertions(+) rename themes/typemill/languages/{ => admin}/de.yaml (100%) rename themes/typemill/languages/{ => admin}/en.yaml (100%) rename themes/typemill/languages/{ => admin}/fr.yaml (100%) rename themes/typemill/languages/{ => admin}/it.yaml (100%) rename themes/typemill/languages/{ => admin}/nl.yaml (100%) rename themes/typemill/languages/{ => admin}/ru.yaml (100%) create mode 100644 themes/typemill/languages/user/en.yaml create mode 100644 themes/typemill/languages/user/it.yaml diff --git a/themes/typemill/languages/de.yaml b/themes/typemill/languages/admin/de.yaml similarity index 100% rename from themes/typemill/languages/de.yaml rename to themes/typemill/languages/admin/de.yaml diff --git a/themes/typemill/languages/en.yaml b/themes/typemill/languages/admin/en.yaml similarity index 100% rename from themes/typemill/languages/en.yaml rename to themes/typemill/languages/admin/en.yaml diff --git a/themes/typemill/languages/fr.yaml b/themes/typemill/languages/admin/fr.yaml similarity index 100% rename from themes/typemill/languages/fr.yaml rename to themes/typemill/languages/admin/fr.yaml diff --git a/themes/typemill/languages/it.yaml b/themes/typemill/languages/admin/it.yaml similarity index 100% rename from themes/typemill/languages/it.yaml rename to themes/typemill/languages/admin/it.yaml diff --git a/themes/typemill/languages/nl.yaml b/themes/typemill/languages/admin/nl.yaml similarity index 100% rename from themes/typemill/languages/nl.yaml rename to themes/typemill/languages/admin/nl.yaml diff --git a/themes/typemill/languages/ru.yaml b/themes/typemill/languages/admin/ru.yaml similarity index 100% rename from themes/typemill/languages/ru.yaml rename to themes/typemill/languages/admin/ru.yaml diff --git a/themes/typemill/languages/user/en.yaml b/themes/typemill/languages/user/en.yaml new file mode 100644 index 0000000..33806a3 --- /dev/null +++ b/themes/typemill/languages/user/en.yaml @@ -0,0 +1 @@ +# English diff --git a/themes/typemill/languages/user/it.yaml b/themes/typemill/languages/user/it.yaml new file mode 100644 index 0000000..5cef266 --- /dev/null +++ b/themes/typemill/languages/user/it.yaml @@ -0,0 +1 @@ +# Italiano From 70342171f1ac5fa17b80a805ee1695aa8e371f82 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:02:03 +0200 Subject: [PATCH 06/14] added translation class --- system/Translations.php | 89 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 system/Translations.php diff --git a/system/Translations.php b/system/Translations.php new file mode 100644 index 0000000..f8d00ba --- /dev/null +++ b/system/Translations.php @@ -0,0 +1,89 @@ +getYaml('settings', 'settings.yaml'); + + if($settings === FALSE){ + $language = \Typemill\Settings::whichLanguage(); + } else { + $language = $settings['language']; + } + + $theme = 'typemill'; + if($settings !== NULL){ + if(is_array($settings)){ + if (array_key_exists('theme', $settings)) { + $theme = $settings['theme']; + } + } + } + + // theme labels selected according to the environment: admin or user + $theme_labels = []; + $theme_language_folder = 'themes' . DS . $theme . DS . 'languages' . DS . $environment . DS; + $theme_language_file = $language . '.yaml'; + if (file_exists($theme_language_folder . $theme_language_file)) + { + $theme_labels = $yaml->getYaml($theme_language_folder, $theme_language_file); + } + + $system_labels = []; + $plugins_labels = []; + if($environment=='admin'){ + // system labels + $system_language_folder ='system' . DS . 'author' . DS . 'languages' . DS; + $system_language_file = $language . '.yaml'; + if (file_exists($system_language_folder . $system_language_file)) + { + $system_labels = $yaml->getYaml($system_language_folder, $system_language_file); + } + + // Next change, to provide labels for the admin and user environments. + // There may be plugins that only work in the user environment, + // only in the admin environment, or in both environments. + $plugin_labels = []; + if($settings !== NULL){ + if(is_array($settings)){ + if (array_key_exists('plugins', $settings)) { + if($settings['plugins'] !== NULL) { + foreach($settings['plugins'] as $plugin => $config){ + if($config['active']=='on'){ + $plugin_language_folder = 'plugins' . DS . $plugin . DS . 'languages' . DS; + $plugin_language_file = $language . '.yaml'; + if (file_exists($plugin_language_folder . $plugin_language_file)){ + $plugin_labels[$plugin] = $yaml->getYaml($plugin_language_folder, $plugin_language_file); + } + } + } + foreach($plugin_labels as $key => $value) { + $plugins_labels = array_merge($plugins_labels, $value); + } + } + } + } + } + } + + $labels = []; + if(is_array($plugins_labels)){ + $labels = array_merge($labels, $plugins_labels); + } + if(is_array($system_labels)){ + $labels = array_merge($labels, $system_labels); + } + if(is_array($theme_labels)){ + $labels = array_merge($labels, $theme_labels); + } + + return $labels; + } + +} From 56fa08d0c120cfff05f921f71c5458ec2ffeb329 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:03:28 +0200 Subject: [PATCH 07/14] load translation from class --- system/system.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/system/system.php b/system/system.php index da86c2d..742ee6e 100644 --- a/system/system.php +++ b/system/system.php @@ -203,9 +203,6 @@ $container['view'] = function ($container) $view->addExtension(new Typemill\Extensions\TwigMetaExtension()); $view->addExtension(new Typemill\Extensions\TwigPagelistExtension()); - // i18n - $view->addExtension(new Typemill\Extensions\TwigLanguageExtension( $container->get('settings')['labels'] )); - /* use {{ base_url() }} in twig templates */ $view['base_url'] = $container['request']->getUri()->getBaseUrl(); $view['current_url'] = $container['request']->getUri()->getPath(); @@ -220,6 +217,24 @@ $container['view'] = function ($container) /* add asset-function to all views */ $view->getEnvironment()->addGlobal('assets', $container->assets); + +/****************************** +* LOAD TRANSLATIONS * +******************************/ + $uri = $_SERVER['REQUEST_URI']; + if(isset($uri) && (strpos($uri,'/tm/') !== false OR strpos($uri,'/setup') !== false)) + { + // Admin environment labels + $labels = Typemill\Translations::loadTranslations('admin'); + } else { + // User environment labels + // For now it is useless, but it will prove useful in the future + $labels = Typemill\Translations::loadTranslations('user'); + } + $container['translations'] = $labels; + $view['translations'] = $labels; + $view->addExtension(new Typemill\Extensions\TwigLanguageExtension( $labels )); + return $view; }; From b637ea5965cf5f9534ab5bfedae73427321c3382 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:05:00 +0200 Subject: [PATCH 08/14] removed language management from settings class --- system/Settings.php | 75 --------------------------------------------- 1 file changed, 75 deletions(-) diff --git a/system/Settings.php b/system/Settings.php index ba541aa..aa9798d 100644 --- a/system/Settings.php +++ b/system/Settings.php @@ -38,22 +38,6 @@ class Settings } } - # let us load translations only for admin area to improve performance for frontend - $uri = $_SERVER['REQUEST_URI']; - if(isset($uri) && (strpos($uri,'/tm/') !== false OR strpos($uri,'/setup') !== false)) - { - # i18n - # load the strings of the set language - $language = $settings['language']; - $theme = $settings['theme']; - $plugins = []; - if(isset($settings['plugins'])) - { - $plugins = $settings['plugins']; - } - $settings['labels'] = self::getLanguageLabels($language, $theme, $plugins); - } - # We know the used theme now so create the theme path $settings['themePath'] = $settings['rootPath'] . $settings['themeFolder'] . DIRECTORY_SEPARATOR . $settings['theme']; @@ -109,65 +93,6 @@ class Settings } - # i18n - public static function getLanguageLabels($language, $theme, $plugins) - { - # if not present, set the English language - if( empty($language) ) - { - $language = 'en'; - } - - # loads the system strings of the set language - $yaml = new Models\WriteYaml(); - $system_labels = $yaml->getYaml('system' . DIRECTORY_SEPARATOR . 'author' . DIRECTORY_SEPARATOR . 'languages', $language . '.yaml'); - - # loads the theme strings of the set language - $theme_labels = []; - $theme_language_folder = 'themes' . DIRECTORY_SEPARATOR . $theme . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR; - $theme_language_file = $language . '.yaml'; - if (file_exists($theme_language_folder . $theme_language_file)) - { - $this_theme_labels = $yaml->getYaml($theme_language_folder, $theme_language_file); - if(is_array($this_theme_labels)) - { - $theme_labels = $this_theme_labels; - } - } - - # loads the plugins strings of the set language - $plugins_labels = []; - if(!empty($plugins)) - { - $plugin_labels = []; - foreach($plugins as $name => $value) - { - $plugin_language_folder = 'plugins' . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR; - $plugin_language_file = $language . '.yaml'; - - if (file_exists($plugin_language_folder . $plugin_language_file)) - { - $this_plugin_labels = $yaml->getYaml($plugin_language_folder, $plugin_language_file); - if(is_array($this_plugin_labels)) - { - $plugin_labels[$name] = $this_plugin_labels; - } - } - } - - foreach($plugin_labels as $key => $value) - { - $plugins_labels = array_merge($plugins_labels, $value); - } - } - - # Combines arrays of system languages, themes and plugins - $labels = array_merge($system_labels, $theme_labels, $plugins_labels); - - return $labels; - - } - public function whichLanguage() { # Check which languages are available From 7f8de77e238d0fcdc83b66daa6a787799588f78f Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:07:30 +0200 Subject: [PATCH 09/14] changed way of obtaining labels --- system/Controllers/SetupController.php | 29 ++------------------------ 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/system/Controllers/SetupController.php b/system/Controllers/SetupController.php index bd7f86d..e86ed78 100644 --- a/system/Controllers/SetupController.php +++ b/system/Controllers/SetupController.php @@ -52,31 +52,9 @@ class SetupController extends Controller $setuperrors = empty($systemcheck) ? false : 'Some system requirements for Typemill are missing.'; $systemcheck = empty($systemcheck) ? false : $systemcheck; - # Get the translated strings - $labels = $this->getSetupLabels(); - - return $this->render($response, 'auth/setup.twig', array( 'messages' => $setuperrors, 'systemcheck' => $systemcheck, 'labels' => $labels )); + return $this->render($response, 'auth/setup.twig', array( 'messages' => $setuperrors, 'systemcheck' => $systemcheck )); } - public function getSetupLabels() - { - # Check which languages are available - $langs = []; - $path = __DIR__ . '/../author/languages/*.yaml'; - foreach (glob($path) as $filename) { - $langs[] = basename($filename,'.yaml'); - } - - # Detect browser language - $accept_lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); - $lang = in_array($accept_lang, $langs) ? $accept_lang : 'en'; - - # At least in the setup phase noon there should be no plugins and the theme should be typemill - $labels = \Typemill\Settings::getLanguageLabels($lang,'typemill',[]); - - return $labels; - } - public function create($request, $response, $args) { @@ -122,9 +100,6 @@ class SetupController extends Controller /* store updated settings */ \Typemill\Settings::updateSettings(array('welcome' => false)); - # Get the translated strings - $labels = $this->getSetupLabels(); - - return $this->render($response, 'auth/welcome.twig', array( 'labels' => $labels )); + return $this->render($response, 'auth/welcome.twig', array()); } } \ No newline at end of file From 22aa0f03bdaf525689d25250c0ca72d2ddc6b0c7 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:09:12 +0200 Subject: [PATCH 10/14] removed translate array function --- system/Extensions/TwigLanguageExtension.php | 44 +-------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/system/Extensions/TwigLanguageExtension.php b/system/Extensions/TwigLanguageExtension.php index 3cd6eb2..c3f79d6 100644 --- a/system/Extensions/TwigLanguageExtension.php +++ b/system/Extensions/TwigLanguageExtension.php @@ -17,59 +17,17 @@ class TwigLanguageExtension extends \Twig_Extension { return [ new \Twig_SimpleFilter('__', [$this,'translate'] ), - new \Twig_SimpleFilter('ta', [$this,'translate_array'] ) ]; } public function getFunctions() { return [ - new \Twig_SimpleFunction('__', array($this, 'translate' )), - new \Twig_SimpleFunction('ta', [$this,'translate_array'] ) + new \Twig_SimpleFunction('__', array($this, 'translate' )) ]; } - public function translate_array( $label ) - { - /* In reality the function does not Translate an Array but a string, temporarily transformed into an array. - * I saw a filter/function with this name in Grav. - * Example: - - $label -> placeholder="Add Label for Start-Button" value="Start" - - after explode: - { - [0]=> string(13) " placeholder=" - [1]=> string(26) "Add Label for Start-Button" - [2]=> string(7) " value=" - [3]=> string(5) "Start" - [4]=> string(0) "" - } - - */ - $translated_label = ''; - $items = explode('"',$label); - foreach($items as $item){ - // skip empty string - if(!empty($item)){ - $pos = strpos($item, '='); - //skip string containing equal sign - if ($pos === false) { - // translate with previous function in this class - $translated = $this->translate($item); - // add the translated string - $translated_label .= '"'.$translated.'"'; - } else { - // adds the string containing the equal sign - $translated_label .= $item; - } - } - } - return $translated_label; - } - - public function translate( $label ) { // replaces spaces, dots, comma and dash with underscores From 960e23c3f84e931844b9f1f997df78a096768cf3 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:10:24 +0200 Subject: [PATCH 11/14] update for metadata images --- system/author/js/vue-shared.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/author/js/vue-shared.js b/system/author/js/vue-shared.js index 7d09441..b63a96f 100644 --- a/system/author/js/vue-shared.js +++ b/system/author/js/vue-shared.js @@ -11,13 +11,13 @@ Vue.component('component-image', { '
' + '
' + ' ' + - '

upload an image

'+ + '

{{ \'upload an image\'|translate }}

'+ '
' + '
' + - '' + + '' + '
' + '
' + - '' + + '' + '
' + '' + ' Date: Sun, 24 May 2020 23:11:47 +0200 Subject: [PATCH 12/14] added translation --- system/author/auth/setup.twig | 10 +++++----- system/author/auth/welcome.twig | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/system/author/auth/setup.twig b/system/author/auth/setup.twig index 5c897c1..5c1a156 100644 --- a/system/author/auth/setup.twig +++ b/system/author/auth/setup.twig @@ -1,5 +1,5 @@ {% extends 'layouts/layoutAuth.twig' %} -{% block title %}{{ labels['SETUP'] ? labels['SETUP'] : 'Setup' }}{% endblock %} +{% block title %}{{ __('Setup') }}{% endblock %} {% block content %} @@ -19,21 +19,21 @@
- + {% if errors.username %} {{ errors.username | first }} {% endif %}
- + {% if errors.email %} {{ errors.email | first }} {% endif %}
- + {% if errors.password %} {{ errors.password | first }} @@ -41,7 +41,7 @@
- + {{ csrf_field() | raw }} diff --git a/system/author/auth/welcome.twig b/system/author/auth/welcome.twig index 7644ac7..da0ed84 100644 --- a/system/author/auth/welcome.twig +++ b/system/author/auth/welcome.twig @@ -1,6 +1,6 @@ {% extends 'layouts/layoutAuth.twig' %} -{% block title %}{{ labels['SW_SETUP_WELCOME'] ? labels['SW_SETUP_WELCOME'] : 'Setup Welcome' }}{% endblock %} +{% block title %}{{ __('Setup Welcome') }}{% endblock %} {% block content %} @@ -8,37 +8,37 @@
-

{{ labels['SW_HURRA'] ? labels['SW_HURRA'] : 'Hurra' }}!

-

{{ labels['SW_YOUR_ACCOUNT'] ? labels['SW_YOUR_ACCOUNT'] : 'Your account has been created and you are logged in now.'}}

-

{{ labels['SW_NEXT_STOP'] ? labels['SW_NEXT_STOP'] : 'Next step:' }} {{ labels['SW_VISIT'] ? labels['SW_VISIT'] : 'Visit the author panel and setup your new website. You can configure the system, choose themes and add plugins.' }}

-

{{ labels['SW_GET_HELP'] ? labels['SW_GET_HELP'] : 'Get help:' }} {{ labels['SW_IF_YOU_HAVE'] ? labels['SW_IF_YOU_HAVE'] : 'If you have any questions, please read the' }} {{ labels['SW_DOCS'] ? labels['SW_DOCS'] : 'docs' }} {{ labels['SW_OR_OPEN'] ? labels['SW_OR_OPEN'] : 'or open a new issue on' }} {{ labels['GITHUB'] ? labels['GITHUB'] : 'github' }}.

-

{{ labels['SW_CODED'] ? labels['SW_CODED'] : 'Coded with' }} {{ labels['SW_BY'] ? labels['SW_BY'] : 'by the' }} {{ labels['SW_COMMUNITY'] ? labels['SW_COMMUNITY'] : 'community' }} & {{ labels['SW_TRENDSCHAU'] ? labels['SW_TRENDSCHAU'] : 'Trendschau Digital' }}.

+

{{ __('Hurra') }}!

+

{{ __('Your account has been created and you are logged in now.') }}

+

{{ __('Next step') }}: {{ __('Visit the author panel and setup your new website. You can configure the system, choose themes and add plugins.') }}

+

{{ __('Get help') }}: {{ __('If you have any questions, please read the') }} {{ __('docs') }} {{ __('or open a new issue on') }} {{ __('github') }}.

+

{{ __('Coded with') }} {{ __('by the') }} {{ __('community') }} & {{ __('Trendschau Digital') }}.

- {{ labels['SW_CONFIGURE'] ? labels['SW_CONFIGURE'] : 'Configure your website' }} + {{ __('Configure your website') }}
From 01480ae19b59b083d9ec90bad054a246d0dd15c6 Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:13:23 +0200 Subject: [PATCH 13/14] gets labels for vue enviroment --- system/author/layouts/layoutBlox.twig | 2 +- system/author/layouts/layoutEditor.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/author/layouts/layoutBlox.twig b/system/author/layouts/layoutBlox.twig index 6612992..6369e5d 100644 --- a/system/author/layouts/layoutBlox.twig +++ b/system/author/layouts/layoutBlox.twig @@ -205,7 +205,7 @@ diff --git a/system/author/layouts/layoutEditor.twig b/system/author/layouts/layoutEditor.twig index 0f04772..6ba924e 100644 --- a/system/author/layouts/layoutEditor.twig +++ b/system/author/layouts/layoutEditor.twig @@ -96,7 +96,7 @@ From 573047b2475f45084862174ef3de186a872d580d Mon Sep 17 00:00:00 2001 From: "severoiuliano@gmail.com" Date: Sun, 24 May 2020 23:14:30 +0200 Subject: [PATCH 14/14] removes translation in user enviroment --- themes/typemill/cover.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/typemill/cover.twig b/themes/typemill/cover.twig index 356644c..bc7954d 100644 --- a/themes/typemill/cover.twig +++ b/themes/typemill/cover.twig @@ -19,10 +19,10 @@ {{ content }}