rewritten: public interface in TemplatesFunctions::Locale

added a default parameter bool try_default_too = true to some methods: Get(), IsKey()
           added more methods for accessing by an internal index



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@854 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-06-27 23:21:43 +00:00
parent b8ff5d4cfc
commit 403cca5aad
4 changed files with 221 additions and 96 deletions

View File

@@ -686,8 +686,6 @@ using namespace TemplatesFunctions;
// !! IMPROVE ME
// we need such a html filter for each language (orphans are different in each language)
void Templates::SetHtmlFilter()
{
using namespace TemplatesFunctions;
@@ -704,14 +702,11 @@ using namespace TemplatesFunctions;
for(size_t i=0 ; i<locale.Size() ; ++i)
{
if( locale.IsKeyLang(L"html_lang_attr_value", i) &&
locale.IsKeyLangList(L"language_orphans", i) )
if( locale.IsKeyByIndex(L"html_lang_attr_value", i, false) &&
locale.IsListByIndex(L"language_orphans", i, false) )
{
// !! FIX ME
// this is not the proper index
// we should use locale.GetByIndex() instead
html_filter.AssignOrphans(locale.Get(L"html_lang_attr_value", i),
locale.GetList(L"language_orphans", i));
html_filter.AssignOrphans(locale.GetByIndex(L"html_lang_attr_value", i, false),
locale.GetListByIndex(L"language_orphans", i, false));
}
}
}