This topic was marked solved by Nao, on February 10th, 2014, 05:11 PM

CerealGuy

  • Posts: 343
users_online_today german language fix
« on February 9th, 2014, 04:57 PM »
Some small mistakes in german language file (mostly some missing spaces or switched letters):
Fixed ones:
Code: (OnlineToday-Admin.german.php) [Select]
<?php
// Important! Before editing these language files please read the text at the top of index.english.php.
// Don't forget to set the language file to UTF-8 format (without signature) before saving it.

$txt['uot'] = 'Benutzer online heute';
$txt['uot_type'] = 'Was sollen die User angezeigt bekommen?';
$txt['uot_today'] = 'Benutzer, die heute angemeldet waren (basierend auf Serverzeit)';
$txt['uot_24h'] = 'Benutzer, die in den letzten 24 Stunden angemeldet waren';
$txt['uot_7d'] = 'Benutzer, die in den letzten 7 Tagen angemeldet waren';

$txt['uot_whoview'] = 'Wer darf die Liste mit den Online-Benutzern sehen?';
$txt['uot_whoview_any'] = 'Alle';
$txt['uot_whoview_members'] = 'Alle angemeldeten Benutzer';
$txt['uot_whoview_staff'] = 'Administratoren und Global-Moderatoren';
$txt['uot_whoview_admin'] = 'Nur der Administrator';

$txt['uot_order'] = 'Wie soll die Benutzeranzeige sortiert werden?';
$txt['uot_order_name_asc'] = 'Nach Name, A-Z';
$txt['uot_order_name_desc'] = 'Nach Name, Z-A';
$txt['uot_order_time_asc'] = 'Nach der letzten Online-Zeit, aufsteigend';
$txt['uot_order_time_desc'] = 'Nach der letzten Online-Zeit, absteigend';

Code: (OnlineToday.german.php) [Select]
<?php

$txt
['users_online_today'] = 'Benutzer heute';
$txt['users_online_24h'] = 'Benutzer in den letzten 24 Stunden';
$txt['users_online_7d'] = 'Benutzer in den letzten 7 Tagen';
$txt['users_online_today_userhidden'] = '%1$s%2$s'// For i18n. It's not always possible to have all the combinations but between this and users/hidden combinations, it should cover everything.
$txt['users_online_today_users'] = array(=> '1 Benutzer''n' => '%s Benutzer');
$txt['users_online_today_hidden'] = ' inklusive %s versteckte'// doesn't matter how many are hidden, the same applies in English: 1 hidden, 10 hidden etc. You may add an array as needed.
$txt['users_online_today_none'] = 'Heute waren noch keine Benutzer online.';

Another question, why are the language files without an "?>" ?

Pandos

  • Living on the edge of Wedge
  • Posts: 635
Re: users_online_today german language fix
« Reply #1, on February 9th, 2014, 05:18 PM »
Thanks a lot. It's changed local and PR is on the way.

The closing tag of a PHP block at the end of a file is optional (and when I'm right, deprecated in PHP6), and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.
# dpkg-reconfigure brain
error: brain is not installed or configured

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: users_online_today german language fix
« Reply #2, on February 10th, 2014, 05:11 PM »
Nothing to add, except that technically, leaving out the closing tags also has some security advantages. They're limited, but all in all: there is *no* good reason to leave tags in, apart from "that's how tutorials do it". Even if you're unsure -- just don't add them at the end. Even SMF and ElkArte did the same.