mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
Unit.pm: narrow no-break space for symbols
git-svn-id: https://svn.fhem.de/fhem/trunk@12673 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6071b44344
commit
e8179ea19f
@ -434,7 +434,6 @@ my $rtype_base = {
|
|||||||
},
|
},
|
||||||
format => '%.2f',
|
format => '%.2f',
|
||||||
scope => '^[0-9]*(?:\.[0-9]*)?$',
|
scope => '^[0-9]*(?:\.[0-9]*)?$',
|
||||||
tmpl => '%value%' . chr(0x202F) . '%symbol%',
|
|
||||||
},
|
},
|
||||||
|
|
||||||
25 => {
|
25 => {
|
||||||
@ -1239,7 +1238,6 @@ my $rtypes = {
|
|||||||
de => 'Prozent',
|
de => 'Prozent',
|
||||||
en => 'percent',
|
en => 'percent',
|
||||||
},
|
},
|
||||||
tmpl => '%value%' . chr(0x202F) . '%symbol%',
|
|
||||||
scope => { min => 0, max => 100 },
|
scope => { min => 0, max => 100 },
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1323,8 +1321,6 @@ my $rtypes = {
|
|||||||
de => 'Grad Celsius',
|
de => 'Grad Celsius',
|
||||||
en => 'Degrees Celsius',
|
en => 'Degrees Celsius',
|
||||||
},
|
},
|
||||||
|
|
||||||
tmpl => '%value%' . chr(0x202F) . '%symbol%',
|
|
||||||
scope => { min => -273.15 },
|
scope => { min => -273.15 },
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1340,7 +1336,6 @@ my $rtypes = {
|
|||||||
de => 'Grad Fahrenheit',
|
de => 'Grad Fahrenheit',
|
||||||
en => 'Degrees Fahrenheit',
|
en => 'Degrees Fahrenheit',
|
||||||
},
|
},
|
||||||
tmpl => '%value%' . chr(0x202F) . '%symbol%',
|
|
||||||
scope => { min => -459.67 },
|
scope => { min => -459.67 },
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1686,7 +1681,7 @@ my $rtypes = {
|
|||||||
ref_base => 15,
|
ref_base => 15,
|
||||||
ref => 'mi',
|
ref => 'mi',
|
||||||
ref_t => 'hr',
|
ref_t => 'hr',
|
||||||
tmpl => '%value%' . chr(0x202F) . 'mph',
|
tmpl => '%value%' . chr(0x00A0) . 'mph',
|
||||||
tmpl_long => {
|
tmpl_long => {
|
||||||
de => '%value%' . chr(0x00A0) . '%txt% pro %txt_t%',
|
de => '%value%' . chr(0x00A0) . '%txt% pro %txt_t%',
|
||||||
en => '%value%' . chr(0x00A0) . '%txt% per %txt_t%',
|
en => '%value%' . chr(0x00A0) . '%txt% per %txt_t%',
|
||||||
@ -2600,7 +2595,8 @@ sub replaceTemplate ($$$$;$) {
|
|||||||
&& $desc->{scale_txt_long_cu} );
|
&& $desc->{scale_txt_long_cu} );
|
||||||
|
|
||||||
# short
|
# short
|
||||||
$txt = '%value%' . chr(0x202F) . '%suffix%';
|
$txt = '%value%' . chr(0x00A0) . '%suffix%' if ( !$desc->{symbol} );
|
||||||
|
$txt = '%value%' . chr(0x202F) . '%symbol%' if ( $desc->{symbol} );
|
||||||
$txt = $desc->{tmpl} if ( $desc->{tmpl} );
|
$txt = $desc->{tmpl} if ( $desc->{tmpl} );
|
||||||
if ( $r && $reading && $r->{$reading} ) {
|
if ( $r && $reading && $r->{$reading} ) {
|
||||||
foreach my $k ( keys %{ $r->{$reading} } ) {
|
foreach my $k ( keys %{ $r->{$reading} } ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user