mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
98_help.pm: support for german
git-svn-id: https://svn.fhem.de/fhem/trunk@8035 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ba76cb5106
commit
d0c7e6b060
@ -1,4 +1,4 @@
|
||||
# $Id$
|
||||
# $Id: 98_help.pm 8032 2015-02-18 18:36:37Z betateilchen $
|
||||
#
|
||||
package main;
|
||||
use strict;
|
||||
@ -13,7 +13,12 @@ sub help_Initialize($$) {
|
||||
}
|
||||
|
||||
sub CommandHelp {
|
||||
my ($cl, $mod) = @_;
|
||||
my ($cl, $arg) = @_;
|
||||
|
||||
my ($mod,$lang) = split(" ",$arg);
|
||||
|
||||
$lang //= "";
|
||||
$lang = (lc($lang) eq 'de') ? '_DE' : '';
|
||||
|
||||
if($mod) {
|
||||
$mod = lc($mod);
|
||||
@ -37,9 +42,9 @@ sub CommandHelp {
|
||||
my ($err,@text) = FileRead({FileName => $mods{$mod}, ForceType => 'file'});
|
||||
return $err if $err;
|
||||
foreach my $l (@text) {
|
||||
if($l =~ m/^=begin html$/) {
|
||||
if($l =~ m/^=begin html$lang$/) {
|
||||
$skip = 0;
|
||||
} elsif($l =~ m/^=end html$/) {
|
||||
} elsif($l =~ m/^=end html$lang$/) {
|
||||
$skip = 1;
|
||||
} elsif(!$skip) {
|
||||
$output .= $l;
|
||||
@ -97,13 +102,15 @@ sub CommandHelp {
|
||||
<a name="help"></a>
|
||||
<h3>?, help</h3>
|
||||
<ul>
|
||||
<code>? [<moduleName>]</code><br/>
|
||||
<code>help [<moduleName>]</code><br/>
|
||||
<code>? [<moduleName>] [de]</code><br/>
|
||||
<code>help [<moduleName>] [de]</code><br/>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>returns a list of available commands, when called without a
|
||||
moduleName</li>
|
||||
<li>returns a module dependent helptext, same as in commandref</li>
|
||||
<li>Returns a list of available commands, when called without a
|
||||
moduleName.</li>
|
||||
<li>Returns a module dependent helptext, same as in commandref.</li>
|
||||
<li>When called with de as last parameter, module dependent help will be shown in German.<br/>
|
||||
Please be aware: Not every modules provides a German documentation.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@ -114,12 +121,16 @@ sub CommandHelp {
|
||||
<a name="help"></a>
|
||||
<h3>?, help</h3>
|
||||
<ul>
|
||||
<code>? [<moduleName>]</code><br/>
|
||||
<code>help [<moduleName>]</code><br/>
|
||||
<code>? [<moduleName>] [de]</code><br/>
|
||||
<code>help [<moduleName>] [de]</code><br/>
|
||||
<br>
|
||||
Liefert eine Liste aller Befehle mit einer Kurzbeschreibung zurück.
|
||||
Falls moduleName spezifiziert ist, wird die modul-spezifische Hilfe
|
||||
aus commandref zurückgeliefert.
|
||||
<ul>
|
||||
<li>Liefert eine Liste aller Befehle mit einer Kurzbeschreibung zurück.</li>
|
||||
<li>Falls moduleName spezifiziert ist, wird die modul-spezifische Hilfe
|
||||
aus commandref zurückgeliefert.</li>
|
||||
<li>Wird die modulspezifische Hilfe mit Parameter de aufgerufen, wird nach der deutschen Doku gesucht.<br/>
|
||||
Eine deutsche Hilfe ist allerdings nicht in jedem Modul verfügbar!</li>
|
||||
</ul>
|
||||
</ul>
|
||||
=end html_DE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user