Skip to content

Commit

Permalink
fix #2 - backend translation is broken
Browse files Browse the repository at this point in the history
- with Joomla 4.4.1 and 5.0.1 language translation files no longer support multilines
- added tests
- fixed this for the five languages
  . removed the CSS styling
  . reduced HTML and
  . used only one single line for the description
- used German quotation marks „”
- as admin login now requires locale, with doAdministratorLogin() the last usage of NPM module
  joomla-cypress is gone in testing and therefor the typescript declaration is deleted
  • Loading branch information
muhme committed Dec 20, 2023
1 parent cdded00 commit bc2e61d
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 244 deletions.
29 changes: 6 additions & 23 deletions src/language/de-DE/de-DE.mod_zitat_service_de.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,20 @@
; MIT License, Copyright (c) 2008 - 2023 Heiko Lübbe
; https://github.com/muhme/quote_joomla
;
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "
<style type='text/css'>
<!--
.zitat_service_de_main {border: 1px solid #208020; padding:5px; background-color:#ddffdd;}
.zitat_service_de_h1 {font-size:150%; color:#208020; padding:5px; margin:0;}
.zitat_service_de_p {padding:5px; margin:0;}
@media (prefers-color-scheme: dark) {
.zitat_service_de_main {border: 1px solid #888; background-color: #002200; color: #fff;}
.zitat_service_de_h1 {color: #fff;}
}
-->
</style>
<div class='zitat_service_de_main'>
<div style='float: right;'>&#127465;&#127466; &#127468;&#127463; &#127466;&#127480; &#127471;&#127477; &#127482;&#127462;</div>
<h1 class='zitat_service_de_h1'>zitat-service.de, Version 2.0.2</h1>
<p class='zitat_service_de_p'>Zeigt ein Zufalls-Zitat der Benutzer-Gemeinschaft <a href='https://www.zitat-service.de/de'>www.zitat-service.de/de</a> an.</p>
<p class='zitat_service_de_p'>Hilfe: <a href='https://github.com/muhme/quote_joomla/wiki/Hilfe'>github.com/muhme/quote_joomla/wiki/Hilfe</a></p>
</div>"
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "Zeigt ein zufälliges Zitat aus der zitat-service.de Nutzergemeinschaft in den folgenden Sprachen an: 🇩🇪 🇬🇧 🇪🇸 🇯🇵 🇺🇦.<br />Hilfe unter <a href='https://github.com/muhme/quote_joomla/wiki/Hilfe'>github.com/muhme/quote_joomla/wiki/Hilfe</a>"
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_LABEL = "Autor wählen"
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_DESC = "Wähle einen Autor aus der Liste (tippe die Angfangsbuchstaben des Nachnamens). Wähle \"*\", um Zitate aller Autoren anzuzeigen."
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_DESC = "Wähle einen Autor aus der Liste (tippe die Angfangsbuchstaben des Nachnamens). Wähle „*”, um Zitate aller Autoren anzuzeigen."
MOD_ZITAT_SERVICE_DE_FIELD_CATEGORY_LABEL = "Kategorie wählen"
MOD_ZITAT_SERVICE_DE_FIELD_CATEGORY_DESC = "Wähle eine Kategorie aus der Liste (tippe die Anfangsbuchstaben). Wähle \"*\", um Zitate aus allen Kategorien anzuzeigen."
MOD_ZITAT_SERVICE_DE_FIELD_CATEGORY_DESC = "Wähle eine Kategorie aus der Liste (tippe die Anfangsbuchstaben). Wähle „*”, um Zitate aus allen Kategorien anzuzeigen."
MOD_ZITAT_SERVICE_DE_FIELD_USER_LABEL = "Benutzer wählen"
MOD_ZITAT_SERVICE_DE_FIELD_USER_DESC = "Wähle einen Login-Namen aus der Liste (tippe die Anfangsbuchstaben). Wähle \"*\", um Zitate aus der ganzen Benutzer-Gemeinschaft anzuzeigen."
MOD_ZITAT_SERVICE_DE_FIELD_USER_DESC = "Wähle einen Login-Namen aus der Liste (tippe die Anfangsbuchstaben). Wähle „*”, um Zitate aus der ganzen Benutzer-Gemeinschaft anzuzeigen."
MOD_ZITAT_SERVICE_DE_FIELD_LANGUAGE_LABEL = "Sprache wählen"
MOD_ZITAT_SERVICE_DE_FIELD_LANGUAGE_DESC = "Wähle ein einzelne oder \"all\" für alle Sprachen. Bei \"frontend\" wird - wenn unterstützt - die Sprache des Browsers genutzt, sonst Englisch."
MOD_ZITAT_SERVICE_DE_FIELD_LANGUAGE_DESC = "Wähle ein einzelne oder all für alle Sprachen. Bei frontend wird - wenn unterstützt - die Sprache des Browsers genutzt, sonst Englisch."
MOD_ZITAT_SERVICE_DE_FIELD_TARGET_LABEL = "Vorgabe für HTML-Links"
MOD_ZITAT_SERVICE_DE_FIELD_TARGET_DESC = "Ohne Eingabe öffnen Links im gleichen Fenster/Tab. Sonst kann das target-Attribut von HTML-Links gesetzt werden."
MOD_ZITAT_SERVICE_DE_FIELD_SCRIPT_LABEL = "Abfragemethode"
MOD_ZITAT_SERVICE_DE_FIELD_SCRIPT_DESC = "Die Abfragemethode legt fest, wie die Zitate abgerufen werden sollen."
MOD_ZITAT_SERVICE_DE_FIELD_SCRIPT_0 = "Aus Joomla (langsamer)"
MOD_ZITAT_SERVICE_DE_FIELD_SCRIPT_1 = "Asynchron mit JavaScript im Web-Browser (empfohlen)"
MOD_ZITAT_SERVICE_DE_FIELD_HEIGHT_LABEL = "Höhe (CSS)"
MOD_ZITAT_SERVICE_DE_FIELD_HEIGHT_DESC = "Die minimale Höhe des Moduls, z.B. \"20ex\" oder \"200px\"."
MOD_ZITAT_SERVICE_DE_FIELD_HEIGHT_DESC = "Die minimale Höhe des Moduls, z.B. 20ex oder 200px."
19 changes: 1 addition & 18 deletions src/language/en-GB/en-GB.mod_zitat_service_de.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,7 @@
; MIT License, Copyright (c) 2008 - 2023 Heiko Lübbe
; https://github.com/muhme/quote_joomla
;
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "
<style type='text/css'>
<!--
.zitat_service_de_main {border: 1px solid #208020; padding:5px; background-color:#ddffdd;}
.zitat_service_de_h1 {font-size:150%; color:#208020; padding:5px; margin:0;}
.zitat_service_de_p {padding:5px; margin:0;}
@media (prefers-color-scheme: dark) {
.zitat_service_de_main {border: 1px solid #888; background-color: #002200; color: #fff;}
.zitat_service_de_h1 {color: #fff;}
}
-->
</style>
<div class='zitat_service_de_main'>
<div style='float: right;'>&#127465;&#127466; &#127468;&#127463; &#127466;&#127480; &#127471;&#127477; &#127482;&#127462;</div>
<h1 class='zitat_service_de_h1'>zitat-service.de, Version 2.0.2</h1>
<p class='zitat_service_de_p'>Displays a random quote from the user community at <a href='https://www.zitat-service.de/en'>www.zitat-service.de/en</a>.</p>
<p class='zitat_service_de_p'>Help: <a href='https://github.com/muhme/quote_joomla/wiki'>github.com/muhme/quote_joomla/wiki</a>.</p>
</div>"
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "Displays a random quote from the zitat-service.de user community in the following languages: 🇩🇪 🇬🇧 🇪🇸 🇯🇵 🇺🇦.<br /> See help at <a href='https://github.com/muhme/quote_joomla/wiki'>github.com/muhme/quote_joomla/wiki</a>."
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_LABEL = "Choose Author"
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_DESC = "Select an author from the list (type the initial letters of the surname). Select '*', to display quotes from all authors."
MOD_ZITAT_SERVICE_DE_FIELD_CATEGORY_LABEL = "Choose Category"
Expand Down
19 changes: 1 addition & 18 deletions src/language/es-ES/es-ES.mod_zitat_service_de.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,7 @@
; MIT License, Copyright (c) 2008 - 2023 Heiko Lübbe
; https://github.com/muhme/quote_joomla
;
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "
<style type='text/css'>
<!--
.zitat_service_de_main {border: 1px solid #208020; padding:5px; background-color:#ddffdd;}
.zitat_service_de_h1 {font-size:150%; color:#208020; padding:5px; margin:0;}
.zitat_service_de_p {padding:5px; margin:0;}
@media (prefers-color-scheme: dark) {
.zitat_service_de_main {border: 1px solid #888; background-color: #002200; color: #fff;}
.zitat_service_de_h1 {color: #fff;}
}
-->
</style>
<div class='zitat_service_de_main'>
<div style='float: right;'>&#127465;&#127466; &#127468;&#127463; &#127466;&#127480; &#127471;&#127477; &#127482;&#127462;</div>
<h1 class='zitat_service_de_h1'>zitat-service.de, Versión 2.0.2</h1>
<p class='zitat_service_de_p'>Muestra una cita aleatoria de la comunidad de usuarios en <a href='https://www.zitat-service.de/es'>www.zitat-service.de/es</a>.</p>
<p class='zitat_service_de_p'>Ayuda: <a href='https://github.com/muhme/quote_joomla/wiki/Ayuda'>github.com/muhme/quote_joomla/wiki/Ayuda</a>.</p>
</div>"
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "Muestra una cita aleatoria de la comunidad de usuarios de zitat-service.de en los siguientes idiomas: 🇩🇪 🇬🇧 🇪🇸 🇯🇵 🇺🇦.<br />Ver ayuda en <a href='https://github.com/muhme/quote_joomla/wiki/Ayuda'>github.com/muhme/quote_joomla/wiki/Ayuda</a>."
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_LABEL = "Elegir Autor"
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_DESC = "Selecciona un autor de la lista (escribe las letras iniciales del apellido). Selecciona '*', para mostrar citas de todos los autores."
MOD_ZITAT_SERVICE_DE_FIELD_CATEGORY_LABEL = "Elegir Categoría"
Expand Down
19 changes: 1 addition & 18 deletions src/language/ja-JP/ja-JP.mod_zitat_service_de.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,7 @@
; MIT License, Copyright (c) 2008 - 2023 Heiko Lübbe
; https://github.com/muhme/quote_joomla
;
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "
<style type='text/css'>
<!--
.zitat_service_de_main {border: 1px solid #208020; padding:5px; background-color:#ddffdd;}
.zitat_service_de_h1 {font-size:150%; color:#208020; padding:5px; margin:0;}
.zitat_service_de_p {padding:5px; margin:0;}
@media (prefers-color-scheme: dark) {
.zitat_service_de_main {border: 1px solid #888; background-color: #002200; color: #fff;}
.zitat_service_de_h1 {color: #fff;}
}
-->
</style>
<div class='zitat_service_de_main'>
<div style='float: right;'>&#127465;&#127466; &#127468;&#127463; &#127466;&#127480; &#127471;&#127477; &#127482;&#127462;</div>
<h1 class='zitat_service_de_h1'>zitat-service.de、バージョン2.0.2</h1>
<p class='zitat_service_de_p'><a href='https://www.zitat-service.de/ja'>www.zitat-service.de/ja</a>のユーザーコミュニティからランダムな引用を表示します。</p>
<p class='zitat_service_de_p'>助けてくれ:<a href='https://github.com/muhme/quote_joomla/wiki/ヘルプ'>github.com/muhme/quote_joomla/wiki/ヘルプ</a></p>
</div>"
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "zitat-service.de ユーザーコミュニティからのランダムな引用を以下の言語で表示します: 🇩🇪 🇬🇧 🇪🇸 🇯🇵 🇺🇦.<br /><a href='https://github.com/muhme/quote_joomla/wiki/ヘルプ'>github.com/muhme/quote_joomla/wiki/ヘルプ</a>をご覧くださいのヘルプを参照。"
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_LABEL = "著者を選択"
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_DESC = "リストから著者を選択してください(姓の頭文字を入力)。'*'を選択すると、すべての著者の引用を表示します。"
MOD_ZITAT_SERVICE_DE_FIELD_CATEGORY_LABEL = "カテゴリを選択"
Expand Down
19 changes: 1 addition & 18 deletions src/language/uk-UA/uk-UA.mod_zitat_service_de.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,7 @@
; MIT License, Copyright (c) 2008 - 2023 Heiko Lübbe
; https://github.com/muhme/quote_joomla
;
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "
<style type='text/css'>
<!--
.zitat_service_de_main {border: 1px solid #208020; padding:5px; background-color:#ddffdd;}
.zitat_service_de_h1 {font-size:150%; color:#208020; padding:5px; margin:0;}
.zitat_service_de_p {padding:5px; margin:0;}
@media (prefers-color-scheme: dark) {
.zitat_service_de_main {border: 1px solid #888; background-color: #002200; color: #fff;}
.zitat_service_de_h1 {color: #fff;}
}
-->
</style>
<div class='zitat_service_de_main'>
<div style='float: right;'>&#127465;&#127466; &#127468;&#127463; &#127466;&#127480; &#127471;&#127477; &#127482;&#127462;</div>
<h1 class='zitat_service_de_h1'>zitat-service.de, Версія 2.0.2</h1>
<p class='zitat_service_de_p'>Відображає випадковий цитат зі спільноти користувачів <a href='https://www.zitat-service.de/uk'>www.zitat-service.de/uk</a>.</p>
<p class='zitat_service_de_p'>Допомога: <a href='https://github.com/muhme/quote_joomla/wiki/Допомога'>github.com/muhme/quote_joomla/wiki/Допомога</a>.</p>
</div>"
MOD_ZITAT_SERVICE_DE_XML_DESCRIPTION = "Відображає випадкову цитату зі спільноти користувачів zitat-service.de наступними мовами: 🇩🇪 🇬🇧 🇪🇸 🇯🇵 🇺🇦.<br />довідку за адресою <a href='https://github.com/muhme/quote_joomla/wiki/Допомога'>github.com/muhme/quote_joomla/wiki/Допомога</a>."
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_LABEL = "Вибрати автора"
MOD_ZITAT_SERVICE_DE_FIELD_AUTHOR_DESC = "Виберіть автора зі списку (введіть початкові літери прізвища). Виберіть '*', щоб відобразити цитати всіх авторів."
MOD_ZITAT_SERVICE_DE_FIELD_CATEGORY_LABEL = "Вибрати категорію"
Expand Down
6 changes: 4 additions & 2 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ For an overview of the module and its features, please refer to the main [../REA

### NPM Package joomla-cypress

As a base for the Cypress test automation in Joomla 4 and Joomla 5 the npm package [joomla-projects/joomla-cypress](https://github.com/joomla-projects/joomla-cypress/tree/develop) in development branch is used. Currently my fork is used until all the fixes are packed in next version. If you wish to run Cypress on local host machine you have to install the dependencies:
As a base for the Cypress installation in Joomla 4 and Joomla 5 the npm package [joomla-projects/joomla-cypress](https://github.com/joomla-projects/joomla-cypress/tree/develop) in development branch is used. Currently my fork is used until all the fixes are packed in next version. If you wish to run Cypress on local host machine you have to install the dependencies:
```
host$ npm i
```

Joomla 3 is not supported, installation and test is Cypress 'native' implemented and switched via environment variable `JOOMLA_VERSION`.

In the meantime (since the admin login now requires a locale) the package `joomla-cypress` is no longer used in the tests.

### 1st Preparing with the Installation

As preparation for the end-to-end tests you can use automated Joomla and module installation.
Expand Down Expand Up @@ -58,7 +60,7 @@ host$ scripts/install.sh

### 2nd Testing

There is the end-to-end test suite `test.cy.js` with actual 66 tests for the different four module and three advanced options in the five supported languages. You can run with script e.g. for Joomla 5:
There is the end-to-end test suite `test.cy.js` with actual 76 tests for the backend translation, the different four module and three advanced options in the five supported languages. You can run with script e.g. for Joomla 5:
```
host$ scripts/test.sh 5
```
Expand Down
Loading

0 comments on commit bc2e61d

Please sign in to comment.