From 344b168c9b6166b83adf11c0eb635bd6cb5606d7 Mon Sep 17 00:00:00 2001
From: Jean-Christian Denis
Date: Mon, 27 Sep 2021 00:32:16 +0200
Subject: [PATCH] Fix translations and help. Step1. Thx Pierre Van Glabeke for
tips
---
_config.php | 6 +-
index.php | 26 ++--
js/translater.js | 4 +-
locales/fr/help/translater.config.html | 106 +++++++++++++++
locales/fr/help/translater.html | 177 -------------------------
locales/fr/help/translater.index.html | 32 +++++
locales/fr/help/translater.lang.html | 53 ++++++++
locales/fr/help/translater.module.html | 24 ++++
locales/fr/help/translater.type.html | 24 ++++
locales/fr/main.po | 16 ++-
locales/fr/resources.php | 4 +-
11 files changed, 273 insertions(+), 199 deletions(-)
create mode 100644 locales/fr/help/translater.config.html
delete mode 100644 locales/fr/help/translater.html
create mode 100644 locales/fr/help/translater.index.html
create mode 100644 locales/fr/help/translater.lang.html
create mode 100644 locales/fr/help/translater.module.html
create mode 100644 locales/fr/help/translater.type.html
diff --git a/_config.php b/_config.php
index e2d3250..183850c 100644
--- a/_config.php
+++ b/_config.php
@@ -57,7 +57,7 @@ __('Write informations about author in files') . '
' .
form::field('parse_userinfo', 65, 255, $translater->parse_userinfo) . '
' . sprintf(
- __('Following informations can be used: %s '), implode(', ', $translater::$allowed_user_informations)) . '
+ __('Following informations can be used: %s'), implode(', ', $translater::$allowed_user_informations)) . '
@@ -92,4 +92,6 @@ __('Enable menu on plugins page') . '
-';
\ No newline at end of file
+';
+
+dcPage::helpBlock('translater.config');
\ No newline at end of file
diff --git a/index.php b/index.php
index 16129f5..2cd0b83 100644
--- a/index.php
+++ b/index.php
@@ -174,9 +174,9 @@ echo
dcPage::jsPageTabs() .
dcPage::cssLoad(dcPage::getPF('translater/css/translater.css')) .
dcpage::jsJson('translater', [
- 'title_add' => __('Use this text'),
- 'image_field' => dcPage::getPF('translater/img/field.png'),
- 'image_toggle' => dcPage::getPF('translater/img/toggle.png')
+ 'title_add_detail' => __('Use this text'),
+ 'image_field' => dcPage::getPF('translater/img/field.png'),
+ 'image_toggle' => dcPage::getPF('translater/img/toggle.png')
]) .
dcPage::jsLoad(dcPage::getPF('translater/js/translater.js')) .
@@ -235,9 +235,9 @@ if (empty($module) && $type != '') {
echo '
- ' . $type .' list
+ ' . sprintf(__('Modules list of type "%s"'), $type) .'
- ' . __('Name') . ' |
+ ' . __('Module') . ' |
' . __('Languages') . ' |
' . __('Id') . ' |
' . __('Version') . ' |
@@ -250,6 +250,8 @@ if (empty($module) && $type != '') {
}
echo '';
+ dcPage::helpBlock('translater.type');
+
} elseif (!empty($module) && empty($lang)) {
$codes = $module->getUsedLangs();
$backups = $module->getBackups();
@@ -272,7 +274,7 @@ if (empty($module) && $type != '') {
'' .
'' . __('Existing languages translations') .'' .
'' .
- '' . __('Languages') . ' | ' .
+ '' . __('Language') . ' | ' .
'' . __('Code') . ' | ' .
'' . __('Backups') . ' | ' .
'' . __('Last backup') . ' | ' .
@@ -332,7 +334,7 @@ if (empty($module) && $type != '') {
'' .
'' . __('Existing languages backups') . '' .
'' .
- '' . __('Name') . ' | ' .
+ '' . __('Language') . ' | ' .
'' . __('Code') . ' | ' .
'' . __('Date') . ' | ' .
'' . __('File') . ' | ' .
@@ -401,7 +403,7 @@ if (empty($module) && $type != '') {
} else {
echo
'' .
- form::combo(['from'], array_merge(['-' => ''], $codes)) . ' (' . __('Optionnal') . ')
';
+ form::combo(['from'], array_merge(['-' => ''], $codes)) . ' (' . __('optionnal') . ')';
}
echo '
' .
@@ -429,6 +431,8 @@ if (empty($module) && $type != '') {
echo '';
+ dcPage::helpBlock('translater.module');
+
} elseif (!empty($lang)) {
$lines = $lang->getMessages();
@@ -563,6 +567,8 @@ if (empty($module) && $type != '') {
'
' .
'';
+ dcPage::helpBlock('translater.lang');
+
} else {
$line = '%s';
echo '' . __('Translate your Dotclear plugins and themes') . '
' .
@@ -579,8 +585,8 @@ if (empty($module) && $type != '') {
$type == 'theme' ? ' class="active"' : '',
__('Translate themes'))
);
+
+ dcPage::helpBlock('translater.index');
}
-dcPage::helpBlock('translater');
-
echo '