Skip to content

Commit 796f4ab

Browse files
committed
refactor: translations cleanup
1 parent 34dfae4 commit 796f4ab

32 files changed

+151
-73
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ This is a log of major user-visible changes in each phpMyFAQ release.
3333
- improved online update feature (Thorsten)
3434
- updated Spanish translation (Thorsten)
3535
- updated Polish translation (Thorsten)
36+
- updated French translation (Thorsten)
3637
- updated Japanese translation (Kamo Tomoyuki)
3738
- updated to PHPUnit v12 (Thorsten)
3839
- migrated codebase to use PHP 8.3 language features (Thorsten)

phpmyfaq/admin/assets/src/user/user-list.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@ export const handleUserList = (): void => {
5151
}
5252

5353
if (deleteButtons) {
54-
deleteButtons.forEach((button) => {
55-
button.addEventListener('click', (event) => {
54+
deleteButtons.forEach((button: Element): void => {
55+
button.addEventListener('click', (event: Event): void => {
5656
event.preventDefault();
5757

58-
const deleteModal = new Modal(document.getElementById('pmf-modal-user-confirm-delete') as HTMLElement);
58+
const modalElement = document.getElementById('pmf-modal-user-confirm-delete') as HTMLElement;
59+
if (!modalElement) {
60+
pushErrorNotification('Fehler: Löschdialog nicht gefunden.');
61+
return;
62+
}
63+
const deleteModal = Modal.getOrCreateInstance(modalElement);
5964
deleteModal.show();
6065
const usernameDelete = document.getElementById('pmf-username-delete') as HTMLElement;
6166
usernameDelete.innerText = button.getAttribute('data-username')!;
@@ -66,9 +71,9 @@ export const handleUserList = (): void => {
6671
});
6772
});
6873

69-
const deleteUserConfirm = document.getElementById('pmf-delete-user-yes');
74+
const deleteUserConfirm = document.getElementById('pmf-delete-user-yes') as HTMLElement;
7075
if (deleteUserConfirm) {
71-
deleteUserConfirm.addEventListener('click', async (event) => {
76+
deleteUserConfirm.addEventListener('click', async (event: PointerEvent): Promise<void> => {
7277
event.preventDefault();
7378
const source = document.getElementById('source_page') as HTMLInputElement;
7479
if (source.value === 'user-list') {

phpmyfaq/src/phpMyFAQ/Administration/Backup.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ public function parseBackupFile(string $filePath, string $currentVersion): Backu
343343

344344
if (
345345
Strings::substr(
346-
string: $line,
347-
start: 0,
348-
length: 2,
349-
) !== '--'
346+
string: $line,
347+
start: 0,
348+
length: 2,
349+
) !== '--'
350350
&& $line !== ''
351351
) {
352352
$queries[] = trim(Strings::substr(

phpmyfaq/translations/language_ar.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,6 @@
538538
$PMF_LANG['ad_export_download_view'] = 'تحميل أو فتحها مباشرة ؟';
539539
$PMF_LANG['ad_export_download'] = 'تحميل';
540540
$PMF_LANG['ad_export_view'] = 'view in-line';
541-
$PMF_LANG['ad_export_gen_xhtml'] = ' XHTML إنشاء ملف ';
542-
$PMF_LANG['ad_export_gen_docbook'] = 'Docbook إنشاء ملف ';
543541
$PMF_LANG['ad_news_data'] = 'بيانات الأخبار';
544542
$PMF_LANG['ad_news_author_name'] = 'اسم الكاتب :';
545543
$PMF_LANG['ad_news_author_email'] = 'البريد الإلكتروني للكاتب :';

phpmyfaq/translations/language_bn.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@
667667
$PMF_LANG['ad_export_download'] = 'download';
668668
$PMF_LANG['ad_export_view'] = 'view in-line';
669669
$PMF_LANG['ad_export_gen_xhtml'] = 'Make XHTML file';
670-
$PMF_LANG['ad_export_gen_docbook'] = 'Make Docbook file';
671670

672671
// added v2.0.0 - 2006-07-22 by Matteo
673672
$PMF_LANG['ad_news_data'] = 'News data';

phpmyfaq/translations/language_bs.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,6 @@
662662
$PMF_LANG['ad_export_download_view'] = 'Preuzmite ili pogledajte in-line?';
663663
$PMF_LANG['ad_export_download'] = 'preuzmi';
664664
$PMF_LANG['ad_export_view'] = 'pogledaj in-line';
665-
$PMF_LANG['ad_export_gen_xhtml'] = 'Napravi XHTML fajl';
666-
$PMF_LANG['ad_export_gen_docbook'] = 'Napravi Docbook fajl';
667665

668666
// added v2.0.0 - 2006-07-22 by Matteo
669667
$PMF_LANG['ad_news_data'] = 'Podaci novosti';

phpmyfaq/translations/language_cs.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,6 @@
547547
$PMF_LANG['ad_export_download_view'] = 'Stáhnout nebo zobrazit?';
548548
$PMF_LANG['ad_export_download'] = 'stáhnout';
549549
$PMF_LANG['ad_export_view'] = 'zobrazit';
550-
$PMF_LANG['ad_export_gen_xhtml'] = 'Vytvořit XHTML soubor';
551-
$PMF_LANG['ad_export_gen_docbook'] = 'Vytvořit Docbook soubor';
552550
$PMF_LANG['ad_news_data'] = 'Novinky';
553551
$PMF_LANG['ad_news_author_name'] = 'Jméno autora:';
554552
$PMF_LANG['ad_news_author_email'] = 'Email autora:';

phpmyfaq/translations/language_da.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,6 @@
543543
$PMF_LANG['ad_export_download_view'] = 'Download or view in-line?';
544544
$PMF_LANG['ad_export_download'] = 'download';
545545
$PMF_LANG['ad_export_view'] = 'view in-line';
546-
$PMF_LANG['ad_export_gen_xhtml'] = 'Lav XHTML-fil';
547-
$PMF_LANG['ad_export_gen_docbook'] = 'Lav Docbook-fil';
548546
$PMF_LANG['ad_news_data'] = 'News data';
549547
$PMF_LANG['ad_news_author_name'] = 'Forfatter:';
550548
$PMF_LANG['ad_news_author_email'] = 'Forfatter e-mail:';

phpmyfaq/translations/language_el.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,6 @@
549549
$PMF_LANG['ad_export_download_view'] = 'Λήψη ή επί τόπου εμφάνιση?';
550550
$PMF_LANG['ad_export_download'] = 'λήψη';
551551
$PMF_LANG['ad_export_view'] = 'επί τόπου εμφάνιση';
552-
$PMF_LANG['ad_export_gen_xhtml'] = 'Δημιουργία αρχείου XHTML';
553-
$PMF_LANG['ad_export_gen_docbook'] = 'Δημιουργία αρχείου Docbook';
554552
$PMF_LANG['ad_news_data'] = 'Στοιχεία ειδήσεων';
555553
$PMF_LANG['ad_news_author_name'] = 'Όνομα συγγραφέα:';
556554
$PMF_LANG['ad_news_author_email'] = 'Διεύθυνση e-mail συγγραφέα';

phpmyfaq/translations/language_es.php

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@
229229
$PMF_LANG['ad_entry_del_3'] = 'debería ser eliminado?';
230230
$PMF_LANG['ad_entry_delsuc'] = 'Entrada de la FAQ eliminado correctamente.';
231231
$PMF_LANG['ad_entry_delfail'] = 'Entrada de la FAQ no ha sido eliminada!';
232-
$PMF_LANG['ad_entry_back'] = "Volver";
233232

234233
// Gestión de noticias
235234
$PMF_LANG['ad_news_header'] = 'Cabecera';
@@ -306,7 +305,6 @@
306305
$PMF_LANG['ad_adus_adduser'] = 'Añadir usuario';
307306
$PMF_LANG['ad_adus_name'] = 'Nombre';
308307
$PMF_LANG['ad_adus_password'] = 'Contraseña';
309-
$PMF_LANG['ad_adus_contraseña'] = 'Contraseña';
310308
$PMF_LANG['ad_adus_add'] = 'Añadir';
311309
$PMF_LANG['ad_adus_suc'] = 'Usuario añadido correctamente.';
312310
$PMF_LANG['ad_adus_edit'] = 'Editar perfil';
@@ -397,11 +395,9 @@
397395
$PMF_LANG['ad_csv_process'] = 'Ejecutando consultas...';
398396
$PMF_LANG['ad_csv_of'] = 'de';
399397
$PMF_LANG['ad_csv_suc'] = 'fueron correctas.';
400-
$PMF_LANG['ad_csv_respaldo'] = 'Copia de seguridad';
401398
$PMF_LANG['ad_csv_rest'] = 'Restaurar un backup';
402399

403400
// Añadido v0.8 - 25.05.2001 - Bastian - Admin
404-
$PMF_LANG['ad_menu_respaldo'] = 'Backup';
405401
$PMF_LANG['ad_logout'] = 'Sesión terminada correctamente.';
406402
$PMF_LANG["ad_news_add"] = "Añadir noticias";
407403
$PMF_LANG['ad_news_edit'] = 'Editar noticias';
@@ -648,8 +644,6 @@
648644
$PMF_LANG['ad_export_download_view'] = '¿Descargar o ver en línea?';
649645
$PMF_LANG['ad_export_download'] = 'Descargar';
650646
$PMF_LANG['ad_export_view'] = 'ver en línea';
651-
$PMF_LANG['ad_export_gen_xhtml'] = 'Exportar como archivo XHTML';
652-
$PMF_LANG['ad_export_gen_docbook'] = 'Crear un archivo DocBook XML';
653647

654648
// added v2.0.0 - 2006-07-22 by Matteo
655649
$PMF_LANG['ad_news_data'] = 'Mensaje';
@@ -1199,7 +1193,6 @@
11991193
$PMF_LANG['ad_group_rights'] = 'Permisos de grupo';
12001194

12011195
// añadido v3.0.0-alpha.3 - 2018-09-20 por Timo
1202-
$PMF_LANG['ad_menu_section_administration'] = "Secciones";
12031196
$PMF_LANG['permission::viewadminlink'] = 'Ver enlace a la administración';
12041197

12051198
// añadido v3.0.0-beta.3 - 2019-09-22 por Thorsten
@@ -1457,4 +1450,85 @@
14571450
$PMF_LANG['msgCompletionPercentage'] = 'Porcentaje de finalización';
14581451
$PMF_LANG['msgInstalledNewerThanAvailable'] = 'La versión instalada es más reciente que la última versión disponible.';
14591452

1453+
// Traducciones faltantes - añadido 2025-12-02
1454+
// Interfaz de administración
1455+
$PMF_LANG['ad_add_user_change_password'] = 'El usuario debe cambiar la contraseña después del primer inicio de sesión';
1456+
$PMF_LANG['ad_categ_save_order'] = 'El nuevo orden se guardó correctamente.';
1457+
$PMF_LANG['ad_entry_not_visibility'] = 'no publicado';
1458+
$PMF_LANG['ad_es_create_import_success'] = 'La importación fue exitosa.';
1459+
$PMF_LANG['ad_menu_backup'] = 'Copia de seguridad';
1460+
$PMF_LANG['ad_quick_sub_category'] = 'Añadir nueva subcategoría';
1461+
$PMF_LANG['ad_user_is_visible'] = 'Visible';
1462+
$PMF_LANG['ad_xml_gen'] = 'Crear exportación XML';
1463+
1464+
// Diseño y metadatos
1465+
$PMF_LANG['layoutControlCenter'] = 'Diseño';
1466+
$PMF_LANG['msgAdminWarningDevelopmentVersion'] = 'phpMyFAQ está actualmente en desarrollo (%s). Y por lo tanto no está listo para producción. Por favor <a target="_blank" href="%s" class="alert-link">reporte todos los problemas en GitHub</a>. ¡Muchas gracias!';
1467+
$PMF_LANG['msgBackup'] = 'Copia de seguridad';
1468+
$PMF_LANG['msgCategoryMetaDesc'] = 'Vista general de todas las categorías y temas | Vista general de categorías de %s';
1469+
$PMF_LANG['msgGlossaryMetaDesc'] = 'En el glosario de %s encontrará explicaciones de todos los términos técnicos importantes sobre el tema';
1470+
$PMF_LANG['msgOpenQuestionsMetaDesc'] = 'Preguntas abiertas esperando respuestas | %s';
1471+
$PMF_LANG['msgOverviewMetaDesc'] = 'Vea una descripción general de todos los temas importantes | Descripción general de FAQ de %s';
1472+
$PMF_LANG['msgQuestionMetaDesc'] = 'Agregar una nueva pregunta | %s';
1473+
$PMF_LANG['msgSitemapMetaDesc'] = 'Encuentre las FAQs que está buscando en la descripción general de todas las entradas | Mapa del sitio - %s';
1474+
1475+
// Autenticación de dos factores
1476+
$PMF_LANG['msgConfirmTwofactorConfig'] = '¿Está seguro de que desea eliminar su configuración actual de autenticación de dos factores?';
1477+
$PMF_LANG['msgGravatarNotConnected'] = 'Gravatar no está habilitado actualmente.';
1478+
$PMF_LANG['msgRemoveTwofactorConfigSuccessful'] = 'La eliminación de la configuración actual de 2 factores fue exitosa.';
1479+
1480+
// Errores y mensajes
1481+
$PMF_LANG['msgError'] = 'Ocurrió un error.';
1482+
$PMF_LANG['msgNoQuestionAndAnswer'] = 'No se encontró pregunta y respuesta.';
1483+
$PMF_LANG['msgNotInMaintenanceMode'] = 'La FAQ no está en modo de mantenimiento.';
1484+
1485+
// Exportación de sesiones
1486+
$PMF_LANG['msgExportSessions'] = 'Exportar sesiones';
1487+
$PMF_LANG['msgExportSessionsAsCSV'] = 'Exportar sesiones como archivo CSV';
1488+
$PMF_LANG['msgExportSessionsFrom'] = 'Desde';
1489+
$PMF_LANG['msgExportSessionsTo'] = 'Hasta';
1490+
1491+
// Metadatos de FAQ
1492+
$PMF_LANG['msgFAQMetaData'] = 'Metadatos de FAQ';
1493+
1494+
// Formularios
1495+
$PMF_LANG['msgFormDisabledDueToMissingCategories'] = 'No puede usar este formulario debido a la falta de categorías configuradas. Por favor informe al <a class="alert-link" href="./contact.html">administrador</a>.';
1496+
$PMF_LANG['msgFormsAddTranslationSuccessful'] = 'La nueva traducción se guardó correctamente.';
1497+
$PMF_LANG['msgFormsDeleteTranslationSuccessful'] = 'La traducción se eliminó correctamente.';
1498+
$PMF_LANG['msgFormsEditTranslationSuccessful'] = 'La traducción se guardó correctamente.';
1499+
$PMF_LANG['msgHintDeactivateForms'] = 'Los formularios se pueden desactivar completamente en la <a class="alert-link" href="./configuration">administración</a>.';
1500+
1501+
// API y tokens
1502+
$PMF_LANG['msgGenerateApiClientToken'] = 'Generar token de cliente API';
1503+
1504+
// Importación
1505+
$PMF_LANG['msgImportCSVFileBody'] = 'Puede importar un archivo CSV con sus datos de registro y la estructura dada (ver arriba) aquí.';
1506+
$PMF_LANG['msgImportRecordsColumnStructure'] = 'El archivo CSV que se va a importar debe contener las siguientes columnas en este orden, sin encabezados de columna. Cada fila está destinada a definir una entrada de FAQ. Todas las celdas en columnas marcadas con un asterisco * deben contener un valor.';
1507+
1508+
// Enlaces y compartir
1509+
$PMF_LANG['msgLinkToFAQ'] = 'Enlace a la FAQ';
1510+
$PMF_LANG['msgShareText'] = 'Descubrí un artículo de FAQ interesante para ti:';
1511+
$PMF_LANG['msgShareViaWhatsapp'] = 'Enviar a un amigo por WhatsApp';
1512+
1513+
// Sesión y autenticación
1514+
$PMF_LANG['msgNoLogMeOut'] = 'No, cerrar sesión';
1515+
$PMF_LANG['msgSessionExpiringSoon'] = 'La sesión expirará pronto';
1516+
$PMF_LANG['msgYesKeepMeLoggedIn'] = 'Sí, mantenerme conectado';
1517+
1518+
// Filtros de FAQ
1519+
$PMF_LANG['msgOnlyInactiveFAQs'] = 'Solo FAQs inactivas';
1520+
$PMF_LANG['msgOnlyNewFAQs'] = 'Solo FAQs nuevas';
1521+
$PMF_LANG['msgTrendingFAQs'] = 'FAQs en tendencia';
1522+
1523+
// Palabras clave
1524+
$PMF_LANG['msgSeparateKeywordsWithCommas'] = 'Las palabras clave múltiples deben estar separadas por comas.';
1525+
1526+
// SERP (Search Engine Result Page)
1527+
$PMF_LANG['msgSerp'] = 'SERP es la abreviatura de Search Engine Result Page. Aquí puede definir el título y la descripción para el SERP.';
1528+
$PMF_LANG['msgSerpDescription'] = 'Descripción SERP';
1529+
$PMF_LANG['msgSerpTitle'] = 'Título SERP';
1530+
1531+
// Permisos
1532+
$PMF_LANG['permission::forms_edit'] = 'Editar formularios';
1533+
14601534
return $PMF_LANG;

0 commit comments

Comments
 (0)