LanguageCode.
if ( it != others.end() )
return it;
-#warning Support sub-locales like el_GR
-
// not found: Remember a new code
CodeMap::value_type nval( code_r, std::string() );
public:
typedef Selection ResType;
- public:
- /** Ctor */
- SelectionImplIf() : ResObjectImplIf ()
- {}
- /** Dtor. Makes this an abstract class. */
- virtual ~SelectionImplIf() = 0;
-
public:
/** */
- virtual TranslatedText summary() const = 0;
+ virtual TranslatedText summary() const PURE_VIRTUAL;
/** */
- virtual TranslatedText description() const = 0;
+ virtual TranslatedText description() const PURE_VIRTUAL;
/** */
- virtual Label category() const = 0;
+ virtual Label category() const PURE_VIRTUAL;
/** */
- virtual bool visible() const = 0;
-
+ virtual bool visible() const PURE_VIRTUAL;
+
/** */
- virtual Label order() const = 0;
+ virtual Label order() const PURE_VIRTUAL;
#if 0
+ // NOTE LangCode id zypp:Locale
virtual std::list<std::string> suggests() const;
virtual std::list<std::string> recommends() const;
virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
};
///////////////////////////////////////////////////////////////////
- /* Implementation of pure virtual dtor is required! */
- inline SelectionImplIf::~SelectionImplIf()
- {}
-
-
/////////////////////////////////////////////////////////////////
} // namespace detail
///////////////////////////////////////////////////////////////////
{
if ( tag.name == "Sum" )
{
- selImpl->_summary.setText(tag.value, LanguageCode(tag.modifier));
+ selImpl->_summary.setText(tag.value, Locale(tag.modifier));
}
else if ( tag.name == "Ver" )
{
selImpl->_order = tag.value;
}
}
-
+
void PatternTagFileParser::consume( const MultiTag &tag )
{
if ( tag.name == "Req" )
{
if ( tag.name == "Sum" )
{
- selImpl->_summary.setText(tag.value, LanguageCode(tag.modifier));
+ selImpl->_summary.setText(tag.value, Locale(tag.modifier));
}
else if ( tag.name == "Ver" )
{
selImpl->_order = tag.value;
}
}
-
+
void SelectionTagFileParser::consume( const MultiTag &tag )
{
if ( tag.name == "Req" )
}
else if ( tag.name == "Ins" )
{
- selImpl->_inspacks[LanguageCode(tag.modifier)] = tag.values;
+ selImpl->_inspacks[Locale(tag.modifier)] = tag.values;
}
}
CapFactory _f;
Dependencies _deps;
- for (std::list<std::string>::const_iterator it = selImpl->_inspacks[LanguageCode()].begin(); it != selImpl->_inspacks[LanguageCode()].end(); it++)
+ for (std::list<std::string>::const_iterator it = selImpl->_inspacks[Locale()].begin(); it != selImpl->_inspacks[Locale()].end(); it++)
{
Capability _cap = _f.parse( ResTraits<Package>::kind, *it);
_deps[Dep::RECOMMENDS].insert(_cap);
}
-
+
for (std::list<std::string>::const_iterator it = selImpl->_recommends.begin(); it != selImpl->_recommends.end(); it++)
{
Capability _cap = _f.parse( ResTraits<Selection>::kind, *it );
std::list<std::string> _pkgrecommends;
std::list<std::string> _pkgrequires;
std::list<std::string> _supported_locales;
- std::map< LanguageCode, std::list<std::string> > _insnotify;
- std::map< LanguageCode, std::list<std::string> > _delnotify;
-
+ std::map< Locale, std::list<std::string> > _insnotify;
+ std::map< Locale, std::list<std::string> > _delnotify;
+
};
///////////////////////////////////////////////////////////////////
std::list<std::string> _provides;
std::list<std::string> _obsoletes;
std::list<std::string> _supported_locales;
- std::map< LanguageCode, std::list<std::string> > _insnotify;
- std::map< LanguageCode, std::list<std::string> > _delnotify;
- std::map< LanguageCode, std::list<std::string> > _inspacks;
- std::map< LanguageCode, std::list<std::string> > _delpacks;
-
+ std::map< Locale, std::list<std::string> > _insnotify;
+ std::map< Locale, std::list<std::string> > _delnotify;
+ std::map< Locale, std::list<std::string> > _inspacks;
+ std::map< Locale, std::list<std::string> > _delpacks;
+
};
///////////////////////////////////////////////////////////////////
#include "zypp/base/PtrTypes.h"
#include "zypp/ResPool.h"
+#include "zypp/ui/Selectable.h"
///////////////////////////////////////////////////////////////////
namespace zypp