Issue with spanish and serbian translations

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Issue with spanish and serbian translations
Date: 2007-04-30 11:49:38
Message-ID: 4635D7D2.8010709@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

I've worked on an issue reported by Diego Gil. There's no spanish and
serbian options in the combo box of the options's dialog.

I've looked at this issue a bit. The problem seems related to
pgAdmin3::OnInit method in src/pgAdmin3.cpp. Here is the specific part :

while (true)
{
langInfo=wxLocale::GetLanguageInfo(langNo);
if (!langInfo)
break;

if (englishName == langInfo->Description &&
(langInfo->CanonicalName == wxT("en_US") ||
(!langInfo->CanonicalName.IsEmpty() &&
wxDir::Exists(i18nPath + wxT("/") + langInfo->CanonicalName))))
{
existingLangs.Add(langNo);
existingLangNames.Add(translatedName);
langCount++;
}
langNo++;
}

I tried with the change on the patch attached. Now, I see the spanish
option, but the serbian one is still missing. And start time is quite
longer.

I also took a look at the internat sample from wxWidgets. They use an
array to list all translations available... :
static const wxLanguage langIds[] =
{
wxLANGUAGE_DEFAULT,
wxLANGUAGE_FRENCH,
wxLANGUAGE_GERMAN,
wxLANGUAGE_RUSSIAN,
wxLANGUAGE_BULGARIAN,
wxLANGUAGE_CZECH,
wxLANGUAGE_POLISH,
wxLANGUAGE_SWEDISH,
#if wxUSE_UNICODE || defined(__WXMOTIF__)
wxLANGUAGE_JAPANESE,
#endif
#if wxUSE_UNICODE
wxLANGUAGE_GEORGIAN,
wxLANGUAGE_ENGLISH,
wxLANGUAGE_ENGLISH_US,
wxLANGUAGE_ARABIC,
wxLANGUAGE_ARABIC_EGYPT
#endif
};

I wonder if we can do the same.

If we prefer to get a dynamic list, I think it would be better to get
the list of the i18n's subdirectories and use wxLocale::FindLanguageInfo
with each subdirectories' titles.

Some advices would be really appreciated.

Regards.

--
Guillaume.
http://www.postgresqlfr.org
http://docs.postgresqlfr.org

Attachment Content-Type Size
pgAdmin3.patch text/x-diff 776 bytes

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2007-04-30 12:09:51 SVN Commit by dpage: r6240 - in trunk/pgadmin3: . pgadmin/frm pgadmin/include/frm
Previous Message svn 2007-04-28 23:05:48 SVN Commit by guillaume: r6239 - trunk/pgadmin3/i18n/fr_FR