Fixed handling locale directories with a large number of entries

This commit is contained in:
Klaus Schmidinger 2007-08-19 16:04:22 +02:00
parent 69db18ef8f
commit c9ccd0ae1d
4 changed files with 13 additions and 7 deletions

View File

@ -2062,6 +2062,7 @@ Anssi Hannula <anssi.hannula@gmail.com>
for suggesting to make the "Setup/OSD/Language" menu only show those languages
that actually have a locale
for suggesting to use setenv() instead of setlocale() to set the language for gettext()
for fixing handling locale directories with a large number of entries
Antti Hartikainen <ami+vdr@ah.fi>
for updating 'S13E' in 'sources.conf'

View File

@ -5379,3 +5379,8 @@ Video Disk Recorder Revision History
vdr.mo. Text files for plugins are now named "vdr-name.mo", when "name" is the
name of the plugin. The "newplugin" script has been changed accordingly, and
plugin authors should change their Makefiles, too.
2007-08-19: Version 1.5.9
- Fixed handling locale directories with a large number of entries (thanks to
Anssi Hannula).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.297 2007/08/12 20:38:10 kls Exp $
* $Id: config.h 1.298 2007/08/19 16:02:50 kls Exp $
*/
#ifndef __CONFIG_H
@ -22,13 +22,13 @@
// VDR's own version number:
#define VDRVERSION "1.5.8"
#define VDRVERSNUM 10508 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.5.9"
#define VDRVERSNUM 10509 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
#define APIVERSION "1.5.8"
#define APIVERSNUM 10508 // Version * 10000 + Major * 100 + Minor
#define APIVERSION "1.5.9"
#define APIVERSNUM 10509 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to

4
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: i18n.c 1.312 2007/08/19 14:10:46 kls Exp $
* $Id: i18n.c 1.313 2007/08/19 16:03:03 kls Exp $
*
*
*/
@ -112,7 +112,7 @@ void I18nInitialize(void)
for (int i = 0; i < Locales.Size(); i++) {
cString FileName = cString::sprintf("%s/%s/LC_MESSAGES/vdr.mo", I18nLocaleDir, Locales[i]);
if (access(FileName, F_OK) == 0) { // found a locale with VDR texts
if (i < I18N_MAX_LANGUAGES - 1) {
if (NumLocales < I18N_MAX_LANGUAGES - 1) {
SetEnvLanguage(Locales[i]);
NumLocales++;
if (strstr(OldLocale, Locales[i]) == OldLocale)